ApsaraVideo VOD provides the live-to-VOD feature for you to synchronously record live streams as on-demand videos. Then, you can perform video processing, such as transcoding, content moderation, and smart thumbnail generation. You can also produce video content by using the online editing feature, and accelerate content distribution by using Alibaba Cloud CDN. This topic describes three use scenarios of the live-to-VOD feature.
Prerequisites
ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.
ApsaraVideo Live is activated. For more information, see Activate ApsaraVideo Live and purchase resource plans.
A Live-to-VOD configuration is added. For more information, see Store recordings in ApsaraVideo VOD.
Terms
Term | Description |
Live-to-VOD | You can apply the Live-to-VOD feature to various business scenarios by using it together with other features of ApsaraVideo VOD, such as transcoding, online editing, AI processing, and event notification. |
Transcoding template group | After a video recorded from a live stream is stored in ApsaraVideo VOD, ApsaraVideo VOD uses this template group to transcode the video. |
Merging and transcoding template group | After multiple videos recorded from a live stream are stored in ApsaraVideo VOD, ApsaraVideo VOD uses this template group to merge the videos and transcode the merged video. |
Storage only | After one or more videos recorded from a live stream are stored in ApsaraVideo VOD, ApsaraVideo VOD performs no subsequent operation on the videos. To achieve this purpose, you need to specify the built-in No Transcoding template group when you configure the Live-to-VOD settings. |
Merging only | After multiple videos recorded from a live stream are stored in ApsaraVideo VOD, ApsaraVideo VOD merges the videos and performs no subsequent operation. To achieve this purpose, you need to specify the built-in No Transcoding template group when you configure the Live-to-VOD settings. |
Recording cycle | A recording cycle is the duration of a recording. For example, if you want to play the recordings of a live stream on demand that lasts for 3 hours before the live stream ends, you can set the recording cycle to an hour. This way, an hour after the live stream starts, a recording of the content of this one hour is generated and can be played on demand. |
Practice 1: Live-to-VOD + Automatic transcoding + CDN acceleration
After a live stream is recorded, the recordings are transcoded and delivered to CDN for acceleration immediately. Users can play the videos on demand.
This practice is applicable to most live streaming scenarios where you do not need to process the recordings.
Flowchart:
Start stream ingest.
When a recording cycle is reached, the recorded video is automatically stored in ApsaraVideo VOD.
After the video is stored, a unique ID is generated for the video in ApsaraVideo VOD. The video information is sent to you by using the AddLiveRecordVideoComplete callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
ApsaraVideo VOD detects the ID of the transcoding template group in the Live-to-VOD configuration that you specify, and then transcodes the recorded video based on configurations of the template group.
After a snapshot is taken, a single video is transcoded, or all videos are transcoded, a callback is sent to you. Callbacks are sent without a time sequence. You can update the video status based on the video ID in the callbacks. After the transcoding is complete, the video can be played. The transcoding callback message contains the playback URL. You can also obtain the playback URL by specifying the video ID when you call the GetPlayInfo operation. The playback URL is accelerated by CDN.
Practice 2: Live-to-VOD + Storage only in ApsaraVideo VOD + Manual transcoding + CDN acceleration
You may sometimes want to store recorded videos in ApsaraVideo VOD without subsequent transcoding. In this case, you can specify the storage only template group when you configure the Live-to-VOD settings. If you want to transcode the recorded videos at a later time, you can manually trigger transcoding. This practice can work with the online editing feature of ApsaraVideo VOD for better effects.
The storage only template group is the built-in No Transcoding template group in ApsaraVideo VOD. This template group is automatically generated after you enable the VOD bucket.
This practice is applicable to scenarios where you want to process the recorded videos after a live stream ends, such as editing the recorded videos of sports matches and games. After the content processing is complete, you can initiate transcoding as needed. After the transcoding is complete, ApsaraVideo VOD automatically performs CDN acceleration for the transcoded videos.
Flowchart:
Start stream ingest.
When a recording cycle is reached, the recorded video is automatically stored in ApsaraVideo VOD.
After the video is stored, a unique ID is generated for the video in ApsaraVideo VOD. The video information is sent to you by using the AddLiveRecordVideoComplete callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
Manually trigger transcoding by calling the SubmitTranscodeJobs operation. Before you trigger transcoding, you can also perform other operations such as online editing on the recorded video.
After a snapshot is taken, a single video is transcoded, or all videos are transcoded, a callback is sent to you. Callbacks are sent without a time sequence. You can update the video status based on the video ID in the callbacks. After the transcoding is complete, the video can be played. The transcoding callback message contains the playback URL. You can also obtain the playback URL by specifying the video ID when you call the GetPlayInfo operation. The playback URL is accelerated by CDN.
Practice 3: Live-to-VOD + Automatic merging of videos generated in different recording cycles
You may sometimes want to merge videos generated in different recording cycles and then process the merged video. For example, if the recording cycle is 20 minutes and a live stream lasts for an hour, three videos are generated. ApsaraVideo VOD can automatically merge the recorded videos. When you configure the Live-to-VOD settings, you can enable automatic merging and specify the merging and transcoding template group. You can also specify the merging only template group and manually trigger transcoding at a later time. The differences between the two methods are similar to the differences between the previous two practices. If live streaming is interrupted for longer than the specified timeout period, ApsaraVideo VOD automatically merges the recorded videos that are generated for the live stream and processes the merged video based on the transcoding configuration. You can specify the interruption timeout period for live streams in ApsaraVideo Live.
Automatic merging is not supported for live streams that are interrupted for longer than 3 minutes.
Merging + Automatic transcoding
This practice is applicable to scenarios where you want all recorded videos to be automatically merged and then transcoded after a live stream ends, such as sports matches and online teaching courses.
Flowchart:
Start stream ingest.
When a recording cycle is reached, the recorded video is automatically stored in ApsaraVideo VOD.
After the video is stored, a unique ID is generated for the video in ApsaraVideo VOD. The video information is sent to you by using the AddLiveRecordVideoComplete callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
Live streaming is interrupted for longer than the specified timeout period, or you manually interrupt live streaming.
ApsaraVideo VOD receives a message that indicates the end of live streaming from ApsaraVideo Live.
ApsaraVideo VOD detects the merging configuration in the live-to-VOD settings that you specify and determines whether to trigger automatic merging. If automatic merging is required, ApsaraVideo VOD uses the specified merging and transcoding template group to merge the recorded videos and transcode the merged video.
After video merging starts, a unique ID is generated for the merged video in ApsaraVideo VOD. The video information is sent to you by using the LiveRecordVideoComposeStart callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
After video merging is complete, ApsaraVideo VOD notifies you of the merging status by using the FileUploadComplete callback.
After a snapshot is taken, a single video is transcoded, or all videos are transcoded, a callback is sent to you. Callbacks are sent without a time sequence. You can update the video status based on the video ID in the callbacks. After the transcoding is complete, the video can be played. The transcoding callback message contains the playback URL. You can also obtain the playback URL by specifying the video ID when you call the GetPlayInfo operation. The playback URL is accelerated by CDN.
Merging + Manual transcoding
When you configure the Live-to-VOD settings, you can enable automatic merging and specify the merging only template group. You can manually trigger transcoding at a later time.
This practice is applicable to scenarios where you want all recorded videos to be automatically merged but not to be transcoded after a live stream ends. You can process the merged video by using features such as online editing before you manually transcode the video. For example, you can insert ads into the video or cut the content played during the half-time in a sports match.
Flowchart:
Start stream ingest.
When a recording cycle is reached, the recorded video is automatically stored in ApsaraVideo VOD.
After the video is stored, a unique ID is generated for the video in ApsaraVideo VOD. The video information is sent to you by using the AddLiveRecordVideoComplete callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
Live streaming is interrupted for longer than the specified timeout period, or you manually interrupt live streaming.
ApsaraVideo VOD receives a message that indicates the end of live streaming from ApsaraVideo Live.
ApsaraVideo VOD detects the merging configuration in the live-to-VOD settings that you specify and determines whether to trigger automatic merging. If automatic merging is required, ApsaraVideo VOD uses the specified merging and transcoding template group to merge the recorded videos and transcode the merged video.
After video merging starts, a unique ID is generated for the merged video in ApsaraVideo VOD. The video information is sent to you by using the LiveRecordVideoComposeStart callback that contains live streaming-related parameters such as DomainName, AppName, and StreamName. After you receive the callback, you can record the video information and use the video ID as an index to update the subsequent video status.
After video merging is complete, ApsaraVideo VOD notifies you of the merging status by using the FileUploadComplete callback. In this case, the merged video is ready. You can perform subsequent operations on the video. For example, you can trigger transcoding for the video.
Manually trigger transcoding by calling the SubmitTranscodeJobs operation. Before you trigger transcoding, you can also perform other operations such as online editing on the recorded video.
After a snapshot is taken, a single video is transcoded, or all videos are transcoded, a callback is sent to you. Callbacks are sent without a time sequence. You can update the video status based on the video ID in the callbacks. After the transcoding is complete, the video can be played. The transcoding callback message contains the playback URL. You can also obtain the playback URL by specifying the video ID when you call the GetPlayInfo operation. The playback URL is accelerated by CDN.