TranscodeMedia
https://rtc-api.zego.im/
When users perform CDN recording, they can store the recorded media files on CDN servers and use this interface to perform on-demand transcoding on the media files, changing properties such as the source file's encoding format, resolution, and bitrate for playback on different terminals and network environments.
Before using this interface for the first time, please confirm whether CDN recording service has been activated. If not, please go to the ZEGOCLOUD Console to activate it yourself, for details, please refer to Console - Service Configuration - CDN, or contact ZEGOCLOUD Technical Support to activate it and configure the callback address. After the media file transcoding is completed, it will be notified through the on-demand transcoding completion callback.
Developers can view the transcoding task status, file playback URL and other detailed information through the on-demand transcoding completion callback or the query media file task interface.
Request
Query Parameters
- FileID parameter of the recording file generation callback, only when the CDN vendor is Tencent will this parameter be called back.
- file_id parameter of the media file merge completion callback.
- FileId parameter of the search media interface.
- 360p
- 540p
- 720p
- 360p: Container format MP4, video encoding H.264, bitrate 400 kbps, frame rate 25 fps, audio encoding AAC.
- 540p: Container format MP4, video encoding H.264, bitrate 1000 kbps, frame rate 25 fps, audio encoding AAC.
- 720p: Container format MP4, video encoding H.264, bitrate 1800 kbps, frame rate 25 fps, audio encoding AAC.
Possible values: [TranscodeMedia]
Interface prototype parameters
https://rtc-api.zego.im?Action=TranscodeMedia
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.
💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.
💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
Possible values: [Tencent]
CDN vendor name.
Currently only supports Tencent: Tencent Cloud.
Source file ID that needs transcoding, which can be obtained 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.
Possible values: [360p, 540p, 720p]
Resolution of the transcoded media file, the following values are available:
Note
If you need to customize file transcoding parameters, please contact ZEGOCLOUD Technical Support to configure custom templates. For common transcoding specifications, the parameters corresponding to the default transcoding templates for each resolution are as follows:
Responses
- 200
- application/json
