logo
Video Call
Server API
Stream Mixing and Transcoding APIs
On this page

Single Stream Transcoding Stopped Callback


Description

When developers need to understand the single stream transcoding tasks of the current App, they can refer to Callback Configuration Description to configure related callback interfaces. After initiating a Stop Single Stream Transcoding request, they can view the result of stopping the transcoding task through this callback.

Callback instructions

  • Request method: POST.
Note

The callback data format is JSON. You need to perform UrlDecode decoding on it.

  • Request URL: Please contact ZEGOCLOUD Technical Support to configure the callback URL.
  • Transfer protocol: HTTPS/HTTP. HTTPS is recommended.

Callback parameters

Common parametersTypeDescription
EventStringCallback event. This callback returns transcode_stop.
AppidStringUnique identifier of the App.
TimestampStringServer current time, Unix timestamp.
NonceStringRandom number.
SignatureStringVerification string. For details, see Verification instructions.
Business parametersTypeDescription
TaskIdStringUnique identifier ID of the single stream transcoding task.
UserIdStringUser ID of the user who initiated the stop transcoding task, customized by the developer.
SequenceIntSequence number of stopping the transcoding task.
StatusString

Status of the transcoding task. The return value is TranscodeStopped: The transcoding task has been stopped.

StopReasonInt

Reason for stopping the transcoding task:

  • 0: Actively terminated by the user.
  • 1: Task exception, automatically terminated.

Data example

{
    "Event": "transcode_stop",
    "Appid": "111111",
    "Timestamp": "timestamp",
    "Nonce": "nonce",
    "Signature": "signature",
    "TaskId": "2222",
    "UserId": "2222",
    "Sequence": 0,
    "Status": "TranscodeStarted",
    "StopReason": 0
}

Return response

Return HTTP status code 2XX (e.g., 200) indicates success, and other responses indicate failure.

Callback retry strategy

If the ZEGO server does not receive a response, or the received HTTP status code is not 2XX (e.g., 200), it will attempt to retry, up to 5 retries. The interval between each retry request and the previous request is 2s, 4s, 8s, 16s, and 32s respectively. If the 5th retry still fails, no more retries will be made, and the callback will be lost.

Previous

Single Stream Transcoding Started Callback

Next

Recording File Generated Callback

On this page

Back to top