Template ID | Capability |
10101 | Chinese speech recognition |
10102 | English speech recognition |
10103 | Chinese speech to Chinese and English text |
10104 | English speech to English and Chinese text |
{"InputInfo": {"Type": "COS","CosInputInfo": {"Bucket": "facedetectioncos-1251132611","Region": "ap-guangzhou","Object": "/video/123.mp4"}},"ScheduleId": 20073,"Action": "ProcessMedia","Version": "2019-06-12"}
SubtitleTemplate
to the VTT file generated in step 1 or step 2. For details, see Data Types.{"MediaProcessTask": {"TranscodeTaskSet": [{"Definition": 206390,"OverrideParameter": {"Container": "mp4","RemoveVideo": 0,"RemoveAudio": 0,"VideoTemplate": {"Codec": "libx264","Fps": 30,"Bitrate": 2346,"ResolutionAdaptive": "close","Width": 1920,"Height": 0,"Gop": 0,"FillType": "black"},"AudioTemplate": {"Codec": "libmp3lame","Bitrate": 0,"SampleRate": 32000,"AudioChannel": 2},"SubtitleTemplate": {"Path": "https://lily-1256342427.cos.ap-nanjing.myqcloud.com/mps_autotest/subtitle/1.vtt","StreamIndex": 2,"FontType": "simkai.ttf","FontSize": "10px","FontColor": "0xFFFFFF","FontAlpha": 0.9}}}]},"InputInfo": {"Type": "URL","UrlInputInfo": {"Url": "https://lily-1256342427.cos.ap-nanjing.myqcloud.com/mps_autotest/subtitle/123.mkv"}},"OutputStorage": {"Type": "COS","CosOutputStorage": {"Bucket": "lily-1256342427","Region": "ap-nanjing"}},"OutputDir": "/mps_autotest/output2/","Action": "ProcessMedia","Version": "2019-06-12"}
{"Url": "http://5000-wenzhen.liveplay.myqcloud.com/live/123.flv","AiRecognitionTask": {"Definition": 10101},"OutputStorage": {"CosOutputStorage": {"Bucket": "6c0f30dfvodgzp251000800-10022853","Region": "ap-guangzhou-2"},"Type": "COS"},"OutputDir": "/6c0f30dfvodgzp251000800/0d1409d34565514956657373652/","TaskNotifyConfig": {"NotifyType": "URL","NotifyUrl": "http://xxxx.qq.com/callback/qtatest/?token=xxxxxx"},"Action": "ProcessLiveStream","Version": "2019-06-12"}
For example, suppose the stream ID is5000_test
.Original stream (with no subtitles)http://5000.liveplay.myqcloud.com/live/5000_test.flvChinese speech to Chinese text subtitleshttp://5000.liveplay.myqcloud.com/live/5000_test_chs2chs.flvChinese speech to Chinese and English text subtitleshttp://5000.liveplay.myqcloud.com/live/5000_test_chs2chseng.flvChinese speech to English text subtitleshttp://5000.liveplay.myqcloud.com/live/5000_test_chs2eng.flvEnglish speech to English text subtitleshttp://5000.liveplay.myqcloud.com/live/5000_test_eng2eng.flvEnglish speech to English and Chinese text subtitleshttp://5000.liveplay.myqcloud.com/live/5000_test_eng2chseng.flv
Was this page helpful?