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

MediaThumbnails

GET

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

This interface is used to initiate screenshot processing tasks for on-demand audio and video media (such as CDN recorded files), including "time point screenshot" and "time interval screenshot".

  • Time point screenshot: After the file starts playing, screenshots will be taken at the set time points.
  • Time interval screenshot: After the file starts playing, screenshots will be taken repeatedly according to the set time interval until the file playback ends.
    Call frequency limit
    All rooms under the same AppID are limited to 20 times/second

Request

Query Parameters

    Action stringrequired

    Possible values: [MediaThumbnails]

    Interface prototype parameters

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

    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.

    Vendor stringrequired

    Possible values: [Tencent, Huawei]

    Corresponding CDN vendor:

    • Tencent: Tencent Cloud.
    • Huawei: Huawei Cloud.

    FileId stringrequired

    Unique file identifier. The unique identifiers for recording files are different for each CDN vendor:

    • Tencent Cloud: FileID.
    • Huawei Cloud: ObsObject.
    You can obtain it through the following methods:

    Note

    ZEGOCLOUD will not verify whether the "FileId file passed in actually exists", please pay attention to fill in the correct FileId; if an incorrect FileId is passed in, the Code in the response parameter will be 1000.

    Type stringrequired

    Possible values: [SnapshotByTimeOffset, SampleSnapshot]

    Screenshot method.

    • Time point screenshot: SnapshotByTimeOffset.
    • Time interval screenshot: SampleSnapshot.
    Definition number

    Screenshot template ID, please contact ZEGOCLOUD Technical Support to obtain.
    Only valid and required when Vendor is set to Tencent, invalid when set to Huawei.

    ExtTimeOffsetSet number[]

    Time points for screenshots, in seconds.
    Required when Type is set to SnapshotByTimeOffset.

    Interval number

    Time interval for continuous screenshots, in seconds.
    Only valid and required when Vendor is set to Huawei, invalid when set to Tencent.

Responses

Success
Schema
    Code int32

    Return codes. 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.
    41003File does not exist.Please confirm if the file format, file ID, etc. are correct.
    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

    Globally unique task ID for on-demand thumbnail task

    RequestId string

    Unique request ID. If you need ZEGOCLOUD Technical Support to locate problems, you need to provide this RequestId

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

    Globally unique task ID for on-demand thumbnail task

Previous

TranscodeMedia

Next

StartCensorAudioV2

On this page

Back to top