Applicable Input Source | Transcoding Type | Description |
Video | Standard video transcoding | It can reduce the video bitrate and change the parameters of the original bitrate stream such as the encoding standard, resolution, and frame rate, thereby adapting to playback on different terminals and in different network environments. |
| TSC transcoding | Top speed codec (TSC) transcoding is an "upgraded" feature of standard video transcoding. It can perform adaptive optimization processing on different types of videos, delivering higher-definition viewing experiences to users with lower bandwidth consumption. While maintaining or even enhancing the image quality, it reduces bandwidth costs by more than 50%. |
| Adaptive bitrate stream for videos | Convert the input source video file into multiple bitrate streams suitable for playback in different scenarios, allowing users to select a video with a suitable bitrate for playback based on their network conditions, thereby enhancing the user experience. |
| Remux | It can change the encapsulation format of the source video file. |
Audio | Standard audio transcoding | It can reduce the audio bitrate and change parameters such as the encoding standard, sampling rate, and sound channel, thereby adapting to playback on different terminals and in different network environments. |
| TSC transcoding for audio | TSC transcoding for audio is an "upgraded" feature of standard audio transcoding. It can perform adaptive optimization processing on different types of audio, delivering higher-definition listening experiences to users with lower bandwidth consumption. |
| Adaptive bitrate stream for audio | It can convert the input source audio file into multiple bitrate streams suitable for playback in different scenarios, thereby adapting to different network conditions and enhancing the user experience. |






{"InputInfo": {"Type": "URL","UrlInputInfo": {"Url": "https://test-1234567.cos.ap-guangzhou.myqcloud.com/video/test.mp4"// Replace it with the video URL to be processed.}},"OutputStorage": {"Type": "cos","CosOutputStorage": {"Bucket": "test-1234567","Region": "ap-guangzhou"}},"MediaProcessTask": {"TranscodeTaskSet": [{"Definition": 100800//100800 is the preset template ID for video transcoding. It can be replaced with your custom audio/video transcoding template ID.}]}}
{"InputInfo": {"Type": "COS","CosInputInfo": {"Bucket": "test-1234567","Region": "ap-guangzhou","Object": "/video/123.mp4"}},"OutputStorage": {"Type": "cos","CosOutputStorage": {"Bucket": "test-1234567","Region": "ap-guangzhou"}},"ScheduleId": 12345 //Replace it with a custom orchestration ID. 12345 is a sample code and has no practical significance.}

StdExtInfo.Parameter Name | Requirement | Type | Remarks |
enable_mute_audio | Optional. | Int | It is enabled, silence packets will be supplemented. The default value is 0. 0: Do not enable. 1: Fill with silence packets when audio frames are discontinuous. 2: On the basis of 1, supplement silence packets for cases where there is no audio at the end. |
"StdExtInfo" : "{\\"audio_info\\":{\\"enable_mute_audio\\":1}}"
Parameter Name | Requirement | Type | Remarks |
appid | Optional. | String | Cloud account ID. |
bucket | Required | String | Bucket name. |
region | Required | String | Bucket region name. |
headers | Optional. | JSON structure | It is of type JSON structure, indicating the headers carried when you upload files. Example: "headers": { "agent" : "tencent", "used" : "for-test" } |
token | Optional. | String | Upload and download using the temporary token method. |
id | Optional. | String | User SecretID. |
key | Optional. | String | User SecretKey. |
host | Optional. | String | host |
access_point | Optional. | string | aws_vpc type is required. |
storage_type | Optional. | String | "aws_s3": AWS S3. "aws_vpc": AWS private cloud. "oss": Alibaba Cloud OSS. |
"StdExtInfo" : "{\\"cos_info\\":{\\"storage_type\\":\\"oss\\",\\"bucket\\":\\"test-test\\",\\"region\\":\\"cn-shenzhen\\",\\"id\\":\\"abcdefghijk\\",\\"key\\":\\"lmnopqrstuvwxyz\\"}}"


TaskNotifyConfig parameter. After the task processing is completed, the task result will be callback through the configured callback information. You can parse the event notification result through ParseNotification.TaskId returned by ProcessMedia (for example, 24000022-WorkflowTask-b20a8exxxxxxx1tt110253) to query task results.



{"InputInfo": {"Type": "URL","UrlInputInfo": {"Url": "https://test-1234567.cos.ap-guangzhou.myqcloud.com/video/test.mp4" // Replace it with the video URL to be processed.}},"OutputStorage": {"Type": "cos","CosOutputStorage": {"Bucket": "test-1234567","Region": "ap-guangzhou"}},"MediaProcessTask": {"TranscodeTaskSet": [{"Definition": 100800,//100800 is the preset template ID for video transcoding. It can be replaced with your custom audio/video transcoding template ID."WatermarkSet": [{"Definition": 12345//Replace it with a watermark template ID. 12345 is a sample code and has no practical significance.}]}]}}





Basic Parameter | Source Video Dimensions | Support selecting preset dimensions or manually entering dimensions. If you manually enter dimensions, the range is [0, 4096]. Note: When you select or enter dimensions, ensure that the dimensions are consistent with the source video dimensions. Incorrect settings may cause subtitle rendering exceptions, impacting the final effect. |
| Font | Support selecting a system preset font. |
| Font Size | Support setting the font size in px, with a range of [1, 4096]. Enter a positive integer. Support manually entering a value in the subtitle style settings area or selecting and then dragging subtitles in the preview area on the left side to resize subtitles. |
| Font Color | Support setting the font color and font color transparency. You can specify the A value in RGBA or HSLA to set the font color transparency. Value range: 0 to 1. 0 means completely transparent, and 1 means completely opaque. |
| Subtitle Position | Support setting the subtitle position in px or %. You can manually enter values in the style settings area or select and then drag subtitles in the preview area on the left side to adjust the position. Note: When you adjust the subtitle or background position, make sure that it is completely within the screen view area. Otherwise, the effect may not be as expected. |
Subtitle Background | Background Color | Support setting the subtitle background color and background color transparency. You can specify the A value in RGBA or HSLA to set the color transparency. Value range: 0 to 1. 0 means completely transparent, and 1 means completely opaque. |
| Subtitle Background Height | Support setting the subtitle background height/width in px. Be careful not to exceed the source video height/width when you enter values. Support manually entering values in the subtitle style settings area or selecting and then dragging the subtitle background in the preview area on the left side to resize the subtitle background. |
| Subtitle Background Width | |
| Background Position | Support setting the subtitle background position in px or %. You can manually enter values in the style settings area or select and then drag the subtitle background in the preview area on the left side to adjust the position. Note: When you adjust the subtitle or background position, make sure that it is completely within the screen view area. Otherwise, the effect may not be as expected. |
Arrangement | Line Spacing | Support setting the line spacing in px, with a range of [0, 1000]. |
| Alignment Mode | Support two modes: top alignment and bottom alignment. Top alignment: For a single-line subtitle, the subtitle is at the position of the first line of multi-line subtitles. The top position of subtitles is fixed, and the bottom position changes according to the number of lines. Bottom alignment: For a single-line subtitle, the subtitle is at the position of the last line of multi-line subtitles. The bottom position of subtitles is fixed, and the top position changes according to the number of lines. |
Text Stroke | Color | Support setting the text stroke color and stroke color transparency. You can specify the A value in RGBA or HSLA to set the color transparency. Value range: 0 to 1. 0 means completely transparent, and 1 means completely opaque. |
| Thickness | Support setting the text stroke thickness in px, with a range of [0, 1000]. |
Text Shadow | Color | Support setting the text shadow color and shadow color transparency. You can specify the A value in RGBA or HSLA to set the color transparency. Value range: 0 to 1. 0 means completely transparent, and 1 means completely opaque. |
| Shadow Width | Support setting the shadow width in px, with a range of [0, 1000]. |
{"MediaProcessTask": {"TranscodeTaskSet": [{"Definition": 100040, //Transcoding template ID. It should be replaced with the ID of the transcoding template you need."OverrideParameter": { //Overwriting parameters that are used for flexibly overwriting some parameters in the transcoding template."SubtitleTemplate": { //Subtitle embedment configurations."Path": "https://test-1234567.cos.ap-nanjing.myqcloud.com/mps_autotest/subtitle/1.vtt", //Subtitle file path."StreamIndex": 2,"FontType": "simkai.ttf","FontSize": "10px","FontColor": "0xFFFFFF","FontAlpha": 0.9}}}]},"InputInfo": { //Input video information."Type": "URL","UrlInputInfo": {"Url": "https://test-1234567.cos.ap-nanjing.myqcloud.com/mps_autotest/subtitle/123.mkv"}},"OutputStorage": { //Output bucket."Type": "COS","CosOutputStorage": {"Bucket": "test-1234567","Region": "ap-nanjing"}},"OutputDir": "/mps_autotest/output2/", //Output path."Action": "ProcessMedia","Version": "2019-06-12"}
EnhanceConfig parameter during transcoding template creation:
{"Container": "mp4","Name": "test","VideoTemplate": { //Video transcoding parameter configuration."Codec": "h264","Fps": 50,"Bitrate": 5000,"Width": 0,"Height": 0,"Gop": 0},"AudioTemplate": { //Audio transcoding parameter configuration."Codec": "aac","Bitrate": 60},"EnhanceConfig": { //Enhancement parameter configuration."VideoEnhance": { //Video enhancement configuration."FrameRate": { //Frame interpolation."Switch": "ON","Fps": 50},"SuperResolution": { //Super resolution."Switch": "ON","Type": "lq"}},"AudioEnhance": { //Audio enhancement configuration."Denoise": { //Audio denoising."Switch": "ON"}}}}
StdExtInfo. For details, see the section Appendix: Additional Parameters for Transcoding-Related APIs above.{"InputInfo": { //Enter video information."Type": "COS","CosInputInfo": {"Bucket": "test-1234567","Region": "ap-guangzhou","Object": "/test/subtitleinput/test.mp4"}},"OutputStorage": { //Output bucket."Type": "COS","CosOutputStorage": {"Bucket": "cg-1308104797","Region": "ap-guangzhou"}},"OutputDir": "/yunaMPStest/abroutput/", ////Output path."MediaProcessTask": {"AdaptiveDynamicStreamingTaskSet": [ //Adaptive bitrate stream configuration.{"Definition": 1414064, //Adaptive bitrate stream template ID."AddOnSubtitles": [ //External subtitle configuration.{"Type": "subtitle-stream","Subtitle": {"Type": "COS","CosInputInfo": {"Bucket": "test-1234567","Region": "ap-guangzhou","Object": "/test/subtitleinput/chs.srt"}},"SubtitleName": "chs"},{"Type": "subtitle-stream","Subtitle": {"Type": "COS","CosInputInfo": {"Bucket": "test-1234567","Region": "ap-guangzhou","Object": "/test/subtitleinput/cht.srt"}},"SubtitleName": "cht"},{"Type": "subtitle-stream","Subtitle": {"Type": "COS","CosInputInfo": {"Bucket": "test-1234567","Region": "ap-guangzhou","Object": "/test/subtitleinput/eng.srt"}},"SubtitleName": "eng"}]}]}}



Feedback