Polyv Help Center

Help Center

Material Library Video Transcoding/Review Status Callback Notification

Updated: 2026-07-16 10:11:20

Purpose

After a user uploads a video to the material library, the video goes through two asynchronous processing stages: "Transcoding → Review". When this callback is enabled, the server will send a notification via POST to the interface address configured by the customer in "Callback Settings" when a material library video succeeds/fails in transcoding or passes/fails review. This allows the customer to track material processing progress and perform subsequent actions (typical scenario: before selecting a material for pseudo-live streaming, confirm the video has completed transcoding and passed review).

Callback Failure Retry

  • If the interface does not return an HTTP status 200, the customer is considered to have failed processing this callback. In case of failure, the callback will be retried 3 times.

Callback Parameter Description

  • Request Method: POST
  • Content-Type: application/json

Note: The signature sign and timestamp timestamp are submitted with the BODY and will not appear in the URL query parameters (unlike some callbacks on this site where the signature is placed in the query; please refer to the BODY when integrating).

Event Type Description

The values of the event field are as follows:

event value Meaning Trigger Condition
transcode_success Transcoding Successful Material library video transcoding processing completed (enters pending review or normal available state)
transcode_fail Transcoding Failed Material library video transcoding failed
audit_pass Review Passed Material library video review passed (including direct pass for users exempt from review)
audit_fail Review Failed Material library video review failed

Transcoding and review are two independent stages: If the video requires review, transcode_success will be pushed first after transcoding is complete, and audit_pass / audit_fail will be pushed separately after the review is complete.

BODY Parameters

Parameter Name Type and Range Description
materialId string Material ID
event string Callback event, see "Event Type Description" above for values
title string Material name
duration integer Video duration, in seconds
remark string Reason for failure/rejection. Only carried by transcode_fail, audit_fail; empty string for success events
timestamp string 13-digit millisecond timestamp
sign string Signature, used to verify the authenticity of the callback. See "Signature Rules" below for generation rules

Signature Rules

To prevent callback requests from being forged, please ensure to verify the correctness of sign.

  • Signature concatenation method: sign = encrypt(appSecret + timestamp)
  • encrypt depends on the account's "Callback Signature Encryption Method" setting:
    • Default is MD5: sign = MD5(appSecret + timestamp) (32-bit lowercase)
    • If set to SHA256: sign = SHA256(appSecret + timestamp)
  • appSecret is the account's developer secret, timestamp is the timestamp in this callback's BODY.
  • Verification: Extract timestamp from the BODY, calculate the local signature using the same concatenation and encryption method, and compare it with sign in the BODY. If they match, the request is legitimate.

Callback Data Example

Example request URL: https://www.example.com/xxx/callback (sign, timestamp are in the BODY below)

Example request body (body parameter: application/json)

Transcoding Successful (transcode_success, success events have remark as empty)

{
  "materialId": "1a2b3c4d5e6f",
  "event": "transcode_success",
  "title": "产品介绍视频.mp4",
  "duration": 62,
  "remark": "",
  "timestamp": "1701964858687",
  "sign": "d5079f2e8ba19e49bfd3d9575866d80f"
}

Transcoding Failed (transcode_fail, remark carries the failure reason)

{
  "materialId": "1a2b3c4d5e6f",
  "event": "transcode_fail",
  "title": "产品介绍视频.mp4",
  "duration": 0,
  "remark": "转码失败,请检查视频格式或重新上传",
  "timestamp": "1701964858687",
  "sign": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
}

Review Passed (audit_pass) has the same structure as transcoding successful, with event being audit_pass; Review Failed (audit_fail) has the same structure as transcoding failed, with event being audit_fail and remark carrying the failure reason.

How to Configure

Configure via the backend:

Log in to your account - Go to [Cloud Live] - Click [Development Settings] - Click [Callback Settings] - Material Library Video Transcoding/Review Status Callback

Note: The submitted interface address must start with http:// or https://.

Business Notes

  • Status Stages: Material library video processing proceeds as 转码 → 审核. After transcoding succeeds (transcode_success), the video file is generated; if the account has content review enabled, the video must wait for the review result (audit_pass / audit_fail).
  • Availability for Pseudo-Live Streaming, etc.: If used for scenarios like pseudo-live streaming material selection, it is recommended to use receipt of audit_pass (review passed, or this event directly passed for accounts exempt from review) as the final basis for video availability; receiving only transcode_success does not mean the review has been passed.
  • Callback Address Not Configured: If this callback address is not configured in "Callback Settings", no notifications will be pushed (and no error will occur).
联系客服,在线咨询