The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.

Streaming and Playback Related

Last updated: 2025-03-17 15:18:08

Is There a Capacity Limit On the Number of Online Users in a Live Stream?

By default, Tencent Cloud Streaming Services (CSS) does not limit the number of online users watching live streams. Anyone can watch the live stream as long as network and other conditions permit. If the user configures a bandwidth limit, when there are too many viewers and the bandwidth limit is exceeded, new users cannot watch the live stream. In this case, the number of online users is limited.

How to Use Playback Transcoding?

Considering different network factors to meet your needs of different bitrates and resolutions, you can go to Transcode Configuration to set transcode templates with different bitrates and resolutions. For more information about transcoding, see Live Stream Remuxing and Transcoding.

Raw, High-Definition, Standard Definition Scenarios

In business playback scenarios, three bitrates are generally used: raw, high-definition, and standard definition.
The original stream has the same bitrate and resolution as the streaming.
For HD stream, it is recommended to use a bitrate of 2000 kbps and a resolution of 1080p.
For SD stream, it is recommended to use a bitrate of 1000 kbps and a resolution of 720p.

How Can I Use Time Shift For Replay?

If you want to review wonderful content from a past period, you can use the time shift feature, which currently only supports the HLS protocol. For detailed introductions and activation methods of time shift, see Live Streaming Time Shift.

How to Use HTTPS For Playback?

If your playback domain needs to support HTTPS, you need to prepare valid certificate content and private key content and go to Domain Name Management, select Playback Domain Management > Advanced Configuration > HTTPS Configuration to add the configuration. After successful addition, there will be an effective time (2 hours). After it takes effect, your live stream can support HTTPS protocol playback.

How to Use Overseas Acceleration Nodes For Playback?

Tencent Cloud CDN nodes are not only spread across mainland China, but also cover all continents worldwide, providing extensive and stable coverage. If your users are located in Hong Kong (China), Macao (China), Taiwan (China) or other regions overseas, you can select Global Acceleration or Hong Kong/Macao/Taiwan (China Region) and other regions when configuring the domain name in Domain Management to obtain support from overseas node coverage.
Note:
Global acceleration for CSS currently supports only the HTTP-FLV and HLS protocols.

How Can I Enable Hotlink Protection?

To prevent illegal users from stealing your playback URL and playing it elsewhere, causing traffic loss, it is highly recommended that you add hotlink protection to the playback address to prevent unnecessary losses caused by hotlinking. The playback hotlink protection of CSS is mainly controlled by four parameter values: txTime, key (hash key), txSecret, and validity time.
Hotlink Protection Parameter
Description
Supplementary Notes
txTime
Validity time of the playback URL
In the format of hexadecimal UNIX time.
If the current value of txTime is greater than the current request time, playback can proceed normally; otherwise, playback will be rejected by the backend.
key
Key for MD5 calculation method
It can be customized, and two keys for primary and secondary can be set.
When your primary key is accidentally leaked, you can use the secondary key to splice the playback URL and change the value of the primary key at the same time.
txSecret
Encryption parameter in the playback URL
The value is obtained by performing MD5 encryption algorithm on the string spliced in sequence by key, StreamName and txTime.
txSecret = MD5 (key + StreamName + txTime).
Effective Time
Validity time of address
The effective time setting must be greater than 0.
If txTime is set to the current time and the effective time is set to 300s, the expiration time of the playback URL is the current time + 300s.

Hotlink Protection Calculation

Hotlink protection calculation requires three parameters: key (a random string), StreamName (stream name), and txTime (in hexadecimal format). Assume that the key you set is somestring, the stream name (StreamName) is test, and txTime is 5c2acacc (January 1, 2019, 10:05:00). The high-definition bitrate is: 900kbps, and the transcoding template name is: 900. Original stream playback address:
txSecret = MD5(somestringtest5c2acacc) = b77e812107e1d8b8f247885a46e1bd34
http://domain/live/test.flv?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34
http://domain/live/test.m3u8?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34
HD stream playback address
txSecret = MD5(somestringtest_9005c2acacc) = 4beae959b16c77da6a65c7edda1dfefe
http://domain/live/test_900.flv?txTime=5c2acacc&txSecret=4beae959b16c77da6a65c7edda1dfefe
http://domain/live/test_900.m3u8?txTime=5c2acacc&txSecret=4beae959b16c77da6a65c7edda1dfefe

Enable Playback Hotlink Protection

2. Select a playback domain or click Manage in the corresponding row to enter the domain details page.
3. Select <Access Control>, click Edit.
4. Set Playback Authentication to enabled and click Save.
Note:
Playback authentication settings take effect 30 minutes after successful configuration.
HTTP-FLV: The URL being played can still play normally after the txTime expires. Re-requesting playback after the txTime expires will be rejected.
HLS: Since HLS is a short link, it will continuously request m3u8 to obtain the latest ts segment. Suppose you set the txTime value to the current time + 10 minutes, then the HLS playback URL request will be rejected after 10 minutes. To address this issue, you can dynamically update the HLS request address on the business side or set a longer expiration time for the HLS playback address.

Are There Any Requirements For the Format of the Master Key in the Playback Authentication Configuration? Is There a Limit On the Validity Time?

In the authentication configuration, the primary Key value only supports uppercase letters, lowercase letters and digits, with a maximum length of 256 bits. A random combination of letters and digits is acceptable. It is recommended that the effective time duration be set to the length of a live stream.

How to Get the Recording File After Live Stream Recording?

Recording files are automatically stored in the Video on Demand system after being generated. There are the following ways to obtain recording files: