Based on its playback control capability, VOD can add access controls of "playback time constraint" and "syncing playback progress" to VOD files to implement pseudo-live streaming. This allows you to distribute VOD videos as live streams at the scheduled time, thus saving costs and avoid the risks associated with live streaming.
Low development costs
To convert a VOD video to a common live stream for delivery, you need to use OBS to publish the video to the live streaming platform and deal with the compatibility issues by yourself. This incurs high development costs. VOD can implement pseudo-live streaming automatically for you. You only need to enable transcoding and hotlink protection.
Low compliance risks
You can moderate and edit VOD files in advance to avoid the risk of non-compliance.
Ease of use and flexibility
No live streaming rooms are needed and any videos can be used for pseudo-live streaming.
There is no upper limit on concurrency. You can specify a start time for pseudo-live streaming and share the playback URL beforehand.
This feature is mainly used in scenarios where videos need to be recorded beforehand and viewed by users concurrently at a preset time. Viewers can get the playback URL in advance but cannot watch the video before the preset time.
In pseudo-live streaming, viewers cannot change the playback speed. It is commonly used to stream online classes, concerts, and TV shows.
Because pseudo-live streaming is essentially on-demand delivery, it lacks some capabilities of a real live stream:
You cannot collect statistics for a pseudo-live streaming session.
There is no clear indication of the start and end of a pseudo-live streaming session.
You cannot pause/terminate an ongoing pseudo-live streaming session.
You cannot block a pseudo-live streaming URL that has been distributed.
You cannot dynamically change the video content (such as real-time transcoding and watermarking).
Allowed watch time: A video URL can be provided to viewers in advance, but the content is not accessible before the specified start time or after the specified end time.
Synced viewing: During a pseudo-live streaming session, all viewers watch synchronously with the same progress (there may be a difference of a few minutes).
You have activated CSS and VOD.
Step 1. Upload a video to VOD
1. Log in to the VOD console and select Application Management on the left sidebar.
2. Select the target application.
Step 2. Transcode the video to HLS
Step 3. Enable key hotlink protection
1. Hotlink protection is required for pseudo-live streaming. To enable hotlink protection, go to the VOD console. Click Application Management on the left sidebar and select the target application. Go to Distribution and Playback > Domain Name, find your domain, and click Set on the right.
2. Under the Access Control tab, enable referer hotlink protection or key hotlink protection.
3. For details on how to configure hotlink protection, see Setting Hotlink Protection. After the configuration, save the key for calculating the hotlink protection signature.
Step 4. Calculate the hotlink protection signature
Signature calculation formula
sign = md5(KEY + Dir + t + plive + exper + rlimit + us)
Compared with standard key hotlink protection, hotlink protection for pseudo-live streaming has an additional parameter
plive, which is also included in the signature calculation formula.
The key you set when enabling key hotlink protection.
The part of the original video URL with the filename
The expiration timestamp (1517400000) converted to hexadecimal.
The start time (UTC+8) of the pseudo-live streaming session, in Unix timestamp format. For example,
1577808000 means 00:00:00 on January 1, 2020.
The preview duration.
0 means no limit will be set.
The number of IP addresses allowed to play the video.
0 means no limit will be set.
The generated random string.
Suppose you have a video stored in VOD, and the URL of its HLS-format file (not the original video URL) is
http://1250000000.vod2.myqcloud.com/vodtranscq125000000/12345678/v.f240.m3u8. The other parameters are as follows:
Hotlink protection key:
Expiration time (
5e5a8a80 (March 1, 2020 00:00:00).
Start time (
5e344f00 (February 1, 2020 00:00:00).
Preview duration (
0 (no limit).
Maximum number of IP addresses allowed (
0 (no limit).
Random string (
sign = md5(11111111/vodtranscq125000000/12345678/5e5a8a805e344f0000test) = 0af5018df88c00e6629e0fb8939277dd
2. Add the signature generated to the query string of the HLS URL to get the final hotlink protection URL:
The parameters in the query string must be in the same order as when
sign is calculated, which is
Watching Pseudo-Live Streaming
Open the above hotlink protection URL in a player that supports HLS playback (such as Safari, VLC, and PotPlayer) to watch pseudo-live streaming.
Chrome does not support HLS playback. You need to install a plugin.