By default, CSS does not limit the number of online viewers for a live stream as long as the network and other conditions permit. However, if you have configured a bandwidth limit, new viewers cannot watch the live stream if there are so many existing viewers that the bandwidth limit is exceeded. In this case, the number of online viewers is limited.
You can go to Live Transcoding to configure transcoding templates with different bitrates and resolutions for different network conditions. For more information on transcoding, see Live Remuxing and Transcoding.
Streams of original definition, HD, and SD streams are commonly used in business scenarios.
You can use the time shifting feature to play back highlights. The feature only supports the HLS protocol for the time being. For more information on time shifting and how to activate it, see CSS Time Shifting.
To make your playback domain support HTTPS, you should prepare a valid certificate and a valid private key, go to Domain Management, find the desired playback domain name, click Manage, and select Advanced Configuration > HTTPS Configuration to add a configuration. After the configuration is successfully added, it will take effect in 2 hours, and then, your stream can be played back using the HTTPS protocol.
CSS provides stable CDN nodes across the Chinese mainland and around the world. If your end users are located outside the Chinese mainland, you can select Global or Outside Chinese mainland for Acceleration Region when configuring domains in Domain Management.
You are strongly advised to enable hotlink protection for your playback URLs to prevent unauthorized users from using your playback URLs, which would consume your Tencent Cloud traffic and cause losses. CSS hotlink protection for playback URLs is controlled by
key (hash key),
txSecret, and validity period.
|Hotlink Protection Parameter||Description||Remarks|
|txTime||Expiration time of the playback URL||It is a hexadecimal Unix time.
|key||MD5 key||You can customize this parameter, and you can set a primary and a backup key.
If your primary key is disclosed, you can use the backup key to splice playback URLs and change the value of the primary key.
|txSecret||Encryption parameter in the playback URL||The value of this parameter is calculated based on
|Validity period||Authentication validity period||It must be greater than 0.
If you set
The calculation of a hotlink protection URL requires three parameters:
key (a random string),
StreamName (stream name), and
txTime (in hexadecimal format).
Assume that you set
key to somestring,
StreamName to test,
txTime to 5c2acacc (2019-01-01 10:05:00), the HD bitrate to 900 Kbps, and the name of the transcoding template to 900.
The playback URL of the original stream is:
txSecret = MD5(somestringtest5c2acacc) = b77e812107e1d8b8f247885a46e1bd34 http://domain/live/test.flv?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34 http://domain/live/test.m3u8?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34
The playback URL of the HD stream is:
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
- It takes 30 minutes for the configuration to take effect.
- HTTP-FLV: after the
txTimeof the URL is reached, ongoing playback will continue, but new requests for playback via the URL will be rejected.
- HLS: as HLS breaks a stream into short chunks, it keeps requesting M3U8 files to get the latest TS segments. Assume that you set
txTimeto the current time and the validity period to 10 minutes, then an HLS playback URL request sent 10 minutes after the current time will be rejected. To avoid this, you can update the HLS request URL dynamically on the server or set a greater expiration time point.
The primary key can contain only letters and digits, with up to 256 characters. For details, please see Playback Authentication Configuration.
We recommend that you set its validity period to the duration of a live streaming session.
Setting a push URL validity period is for authentication and protection. A permanently valid push URL can hardly prevent unauthorized push and may result in business losses.
There is no limit on the validity period of a push address, which can be set according to your business needs. You can also splice addresses to generate a push URL with a longer validity period. For more information about splicing rules, see How to Splice a Push URL.
We do not recommend you set a very long validity period for the push URL, which may cause an error to occur and failed authentication to be reported when the URL is used.
Under normal circumstances, playback of an FLV stream pushed over the RTMP protocol has a latency of around 2–3 seconds. A higher latency generally means that there is a problem. For more information on troubleshooting, see High Latency.
No. You can set it only before pushing the stream according to the upload speed of the network. Besides, setting it too high may cause dropped frames and stuttering.
Live push and playback are bound with stream IDs, so you do not need to delete rooms. If you are using the IM service and want to delete IM rooms to avoid reaching the upper limit of room number, please see Disbanding a Group.
If you are using the channel mode, you can call the
DeleteLVBChannel API and pass in IDs of live streaming channels to delete them in batches.
Channel mode is a legacy mode which is no longer updated or maintained.
This API is used to disable a stream when porn detection is performed. For example, if a live stream is detected to contain pornographic or terroristic content, you can interrupt or disable this stream at any time.
The background audio playback feature is provided by devices. You can develop this feature according to the actual business logic. As long as the live stream is not interrupted, its audio can be played back in the background.
Make sure your current certificate type is Nginx as CSS uses Nginx for encryption.
An authentication-enabled playback URL will become invalid after authentication is disabled, even when its expiration time is not reached.
CSS sets an upper limit on the total number of requests sent by all
SecretId under an account. After the limit is reached, new requests will not be responded.
For example, an upper limit of 200 requests per second indicates that Tencent Cloud server can receive up to 200 requests sent by all
SecretId under your account within 1s. The 200 requests can be sent by one or more customers, and can be used to query one or more streams.
It may be that there is a problem with your current push URL. We recommend you use the TCToolkit App to test whether the URL works normally. For more information on troubleshooting, see Troubleshooting Push Failure.
Maybe the current frame rate is too high. A frame rate higher than 15 fps is enough to ensure smooth video playback. You’re advised to set a lower frame rate.
The system will interrupt a stream when exceptions occur on the push device.
Such exceptions may be application crash, mobile phone shutdown and other external reasons, which cause no data of the stream to be collected in the backend within 70s, and then the system will interrupt the stream.
The API key is used for authentication of legacy APIs, which have been upgraded to v3.0 at the official website. You can get the
Secretkey on the API Key Management page to use API 3.0.
As H.265 is not as compatible as H.264, if a player doesn't support H.265 and the playback fails, you can configure a transcoding template to transcode the video to H.264 for playback.
M3U8 files are named automatically based on stream names. Stream names do not support Chinese characters.
You can get the number of online viewers by calling the DescribeStreamPlayInfoList API, but the result may not be 100% accurate. For example, if 3 users use the same IP address for playback at the same time, they will be counted as 1 viewer. Note that the data returned by this API is relevant only if your playback protocol is RTMP or FLV, not if it is HLS.
Backup streams are enabled by default with CSS. If you push two streams using the same stream name at the same time, during playback, only the first stream will be visible. If this stream is interrupted, the second stream will become visible.