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

DescribeMediaTask

GET

https://rtc-api.zego.im/

This interface is used to query the detailed information of merge media files, start on-demand transcoding and start media thumbnails tasks, as a supplement to media file merge completion callback and on-demand transcoding completion callback.

This interface supports querying the progress of "merge tasks", "transcoding tasks" and "thumbnail tasks"; after task completion, you can also get the playback URL of merged files or transcoded files through this interface.

Call frequency limit
All rooms under the same AppID are limited to 20 times/second

Request

Query Parameters

    Action stringrequired

    Possible values: [DescribeMediaTask]

    Interface prototype parameters

    https://rtc-api.zego.im?Action=DescribeMediaTask

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    TaskId stringrequired

    The task ID to query, which is the TaskId carried in the Data of the response parameters of the merge media files, start on-demand transcoding and start media thumbnails interfaces.

    Vendor stringrequired

    Possible values: [Tencent, Huawei]

    Possible values and corresponding CDN vendors:

    • Tencent: Tencent Cloud.
    • Huawei: Huawei Cloud.
    Note: Currently, Huawei Cloud only supports querying thumbnail tasks, and does not support querying merge tasks and transcoding tasks for now.

Responses

Success
Schema
    Code int32

    Only the return codes related to interface business logic are listed here. For the complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSolution
    0Request successful.-
    2Input parameter error.-
    3Related permissions not activated.Please contact ZEGOCLOUD Technical Support.
    4CDN type mismatch.Please check the parameters.
    5Configuration error.Please contact ZEGOCLOUD Technical Support.
    6Request too frequent.Please try again later.
    7Authentication failed.Please check if the authentication parameters are correct.
    1000Request failed.Please contact ZEGOCLOUD Technical Support.
    Message string

    Operation result description

    RequestId string

    Request ID returned by ZEGOCLOUD server

    Data object
    Response data
    Tencent object
    Tencent Cloud return content (returned when Vendor is Tencent)
    TaskId string

    The queried task ID

    Event string

    Task event type, return values are:

    • compose: Media file merge
    • transcode: Media file on-demand transcoding
    • SnapshotByTimeOffset: Time point thumbnail task
    • SampleSnapshot: Time interval thumbnail task
    Status string

    Task status:

    • WAITING: Waiting
    • PROCESSING: Processing
    • FINISH: Completed
    • FAIL: Failed
    FileId string

    File ID after media file merge or transcoding, same as the FileId carried in the Data of the response parameters of the search media interface

    ReplayUrl string

    Playback URL of the file after media file merge or transcoding, not exceeding 1024 bytes

    RequestId string

    Unique request ID returned by the CDN vendor corresponding to the Vendor parameter value in the request (i.e., Tencent Cloud), which needs to be provided when locating problems

    Message string

    Error message for failed media file task

    ThumbnailsUrl string[]

    File links generated by on-demand thumbnail task

    Huawei object
    Huawei Cloud return content (returned when Vendor is Huawei)
    TaskId string

    The queried task ID

    Status string

    Task status:

    • NO_TASK: Task does not exist
    • WAITING: Waiting to process
    • PROCESSING: Processing
    • SUCCEEDED: Completed
    • FAILED: Failed
    • CANCELED: Task canceled
    CreateTime string

    Task start time, UTC time of the cloud vendor server

    EndTime string

    Task end time, UTC time of the cloud vendor server

    FileName string[]

    Files generated by on-demand thumbnail task

Previous

Merge Media Files

Next

TranscodeMedia

On this page

Back to top