After you create a transcoding template and bind it with a playback domain name, you need to add the transcoding template name after the
StreamName of the live stream with the transcoding configuration in the format of
StreamName_transcoding template name. For details, see Playback Configuration.
If you run a large number of live streaming rooms, it is impossible to manually generate a push and playback URL for each host. In such cases, you can use the server to automatically splice the addresses. Any URL that meets Tencent Cloud standards can be used for push. A standard push URL consists of four parts, as shown below:
liveby default and is customizable.
5867D600means that the URL expires at 00:00:00, January 1, 2017. The validity period should neither be too short nor too long. Most of our clients set
txTimeto a point 24 hours or longer from the current time. If the validity period is too short, after a host is disconnected due to network problems during a live broadcast, it may be impossible to resume the push due to expiration of the push URL.
txSecretsignature serves to prevent attackers from forging a backend to generate push URLs. For the calculation method, see Best Practice - Hotlink Protection URL Calculation.
A playback URL consists of a playback protocol prefix, domain name (
domain), application name (
AppName), stream name (
StreamName), playback protocol suffix, authentication key, and other custom parameters. Below are a few examples.
webrtc://domain/AppName/StreamName?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time) http://domain/AppName/StreamName.flv?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time) rtmp://domain/AppName/StreamName?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time) http://domain/AppName/StreamName.m3u8?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time)
|Playback Protocol||Playback Prefix||Notes|
||We recommend WebRTC most as it has the best instant streaming performance and supports ultra-high concurrency.|
||We recommend HTTP-FLV as it has good instant streaming performance and supports high concurrency.|
||We do not recommend RTMP as it has poor instant streaming performance and does not support high concurrency.|
||We recommend HLS for mobile clients and for the Safari browser on macOS.|
liveby default and customizable.
Go to Domain Management of the CSS console, select a pre-configured push domain name, and click Manage > Push Configuration to display the Push Address Sample Code (for both PHP and Java) that demonstrates how to generate a hotlink protection address. For detailed directions, please see Push Configuration.