Template 10 Preview Image | Template 30 Preview Image |
| |
Template 40 Preview Image | Template 310 Preview Image |
| |
Template 410 Preview Image | Template 510 Preview Image |
| |
Template 610 Preview Image | |
| |
https://live.tencentcloudapi.com/?Action=CreateCommonMixStream&MixStreamSessionId=test_room&MixStreamTemplateId=20&OutputParams.OutputStreamName=test_stream1&InputStreamList.0.InputStreamName=test_stream1&InputStreamList.0.LayoutParams.ImageLayer=1&InputStreamList.1.InputStreamName=test_stream2&InputStreamList.1.LayoutParams.ImageLayer=2&<Common request parameters>
{"Response": {"RequestId": "e8fa8015-0892-40d5-95c4-12a4bc06ed31"}}
https://live.tencentcloudapi.com/?Action=CreateCommonMixStream&MixStreamSessionId=test_room&MixStreamTemplateId=390&OutputParams.OutputStreamName=test_stream2&InputStreamList.0.InputStreamName=test_stream1&InputStreamList.0.LayoutParams.ImageLayer=1&InputStreamList.0.LayoutParams.InputType=3&InputStreamList.0.LayoutParams.ImageWidth=1920 (canvas width)&InputStreamList.0.LayoutParams.ImageHeight=1080 (canvas height)&InputStreamList.0.LayoutParams.Color=0x000000&InputStreamList.1.InputStreamName=test_stream2&InputStreamList.1.LayoutParams.ImageLayer=2&InputStreamList.2.InputStreamName=test_stream3&InputStreamList.2.LayoutParams.ImageLayer=3&<Common request parameters>
{"Response": {"RequestId": "9d8d5837-2273-4936-8661-781aeab9bc9c"}}
LocationX
and LocationY
represent the absolute pixel distance between the top-left corner of the small image and that of the background image.https://live.tencentcloudapi.com/?Action=CreateCommonMixStream&MixStreamSessionId=test_room&OutputParams.OutputStreamName=test_stream2&InputStreamList.0.InputStreamName=test_stream1&InputStreamList.0.LayoutParams.ImageLayer=1&InputStreamList.0.LayoutParams.InputType=3&InputStreamList.0.LayoutParams.ImageWidth = 1920&InputStreamList.0.LayoutParams.ImageHeight= 1080&InputStreamList.0.LayoutParams.Color=0x000000&InputStreamList.1.InputStreamName=test_stream2&InputStreamList.1.LayoutParams.ImageLayer=2&InputStreamList.1.LayoutParams.ImageWidth = 640&InputStreamList.1.LayoutParams.ImageHeight= 360&InputStreamList.1.LayoutParams.LocationX= 50&InputStreamList.1.LayoutParams.LocationY= 720&InputStreamList.2.InputStreamName=test_stream3&InputStreamList.2.LayoutParams.ImageLayer=3&InputStreamList.2.LayoutParams.ImageWidth = 640&InputStreamList.2.LayoutParams.ImageHeight= 360&InputStreamList.2.LayoutParams.LocationX= 740&InputStreamList.2.LayoutParams.LocationY= 720&<Common request parameters>
{"Response": {"RequestId": "8c443359-ba07-4b81-add8-a6ff54f9bf54"}}
https://live.tencentcloudapi.com/?Action=CancelCommonMixStream&MixStreamSessionId=test_room
{"Response": {"RequestId": "3c140219-cfe9-470e-b241-907877d6fb03"}}
err_code [ $code ],msg [ $message ]
in Message
and prompted as an InvalidParameter
error. The causes of specific codes are as detailed below:Error Code | Reason | Troubleshooting |
-1 | An error occurred while parsing the input parameters | Check whether the JSON format of the request body is correct. Check whether `InputStreamList` is empty. |
-2 | Incorrect input parameter | Check whether the image parameter is too large. |
-3 | The number of streams is incorrect | Check whether the number of input streams is within the range of [1,16]. |
-4 | Incorrect stream parameter | Check whether the length/width of the input/output stream are within the range of (0,3000). Check whether the number of input streams is within the range of (0,16]. Check whether the input stream carries `LayoutParams`. Check whether `InputType` is supported (valid values: 0, 2, 3, 4, 5). Check whether the stream ID length is within the range of (1,80). |
-11 | Layer error | Check whether the number of layers is the same as the number of input streams. Check whether the layer ID is duplicate. Check whether the layer ID is within the range of (0,16]. |
-20 | The input parameter does not match the API | Check whether the number of input streams matches the template ID. Check whether the color parameter is correct. |
-21 | The number of input streams for stream mix is incorrect | Check whether there are at least two input streams. |
-28 | Failed to get the background length/width | Check whether the canvas length and width are set when setting the canvas. Check whether the background stream exists (stream mix needs to start 5 seconds after push starts). |
-29 | Incorrect cropping parameter | Check whether the cropping position is out of the stream length/width range. |
-33 | Incorrect watermark image ID | Check whether the input image ID is set. |
-34 | Failed to get the URL of the watermark image | Check whether the image has been successfully uploaded and whether the URL has been generated. |
-111 | The `OutputStreamName` parameter does not match `OutputStreamType` | If `OutputStreamType` is set to `0`, `OutputStreamName` should be in `InputStreamList`. If `OutputStreamType` is set to `1`, `OutputStreamName` should not be in `InputStreamList`. |
-300 | The output stream ID has already been used | Check whether the current output stream belongs to another stream mix task. |
-505 | Failed to find the input stream in `upload` | Check whether stream mix is initiated 5 seconds after the push and whether the stream can be played back. |
-507 | Failed to query the stream length/width parameters | Check whether the canvas length and width are set. Check whether the push succeeds. We recommend you start stream mix 5 seconds after push starts. |
-508 | Incorrect output stream ID | Check whether different output stream IDs are used by the same `MixStreamSessionId`. |
-10031 | Failed to trigger stream mix | We recommend you start stream mix 5 seconds after push starts. |
-30300-31001-31002 | The `sessionid` does not exist when stream mix is canceled | Check whether the `MixStreamSessionId` exists. |
-31003 | The output stream ID does not match that in `session` | Check the output stream ID entered when stream mix is canceled. |
-31004 | The output stream bitrate is invalid | Check whether the output stream bitrate is within the range of [1,50000]. |
Others | - |
Was this page helpful?