All Products
Search
Document Center

ApsaraVideo VOD:Live to VOD

Last Updated:Feb 27, 2026

ApsaraVideo VOD records live streams as on-demand videos in real time. Once recorded, you can transcode to multiple formats, moderate content, generate smart thumbnails, edit clips with online editing, and accelerate delivery through Alibaba Cloud CDN.

This topic covers three practices for using Live to VOD.

ResourceLink
PrerequisitesActivate ApsaraVideo VOD
Live-to-VOD configurationStore recordings in ApsaraVideo VOD
API referenceGetPlayInfo, SubmitTranscodeJobs

Key concepts

TermDescription
Live to VODRecords a live stream into ApsaraVideo VOD, where VOD features such as transcoding, online editing, AI processing, and event notifications are available for the recorded video.
Transcoding template groupDefines how ApsaraVideo VOD transcodes a recorded video after it is stored.
Merging and transcoding template groupDefines how ApsaraVideo VOD merges multiple recorded videos from a single live stream and transcodes the merged result.
Storage onlyStores recorded videos without post-processing. Specify the built-in No Transcoding template group in your Live-to-VOD configuration.
Merging onlyMerges multiple recorded videos without transcoding. Specify the built-in No Transcoding template group in your Live-to-VOD configuration.
Recording cycleThe duration of each recording segment. For example, a 3-hour live stream with a 1-hour recording cycle generates three separate recordings. The first recording becomes available for on-demand playback one hour after the stream starts.

Prerequisites

Before you begin, ensure that you have completed the following:

Practice 1: Automatic transcoding + CDN acceleration

After a live stream is recorded, the recordings are transcoded and delivered through CDN immediately. Users can play the videos on demand as soon as transcoding completes.

When to use: Most live streaming scenarios where recordings require no manual editing before publication.

Flowchart:

image

How it works

  1. Start stream ingest.

  2. When a recording cycle completes, ApsaraVideo VOD automatically stores the recorded video.

  3. ApsaraVideo VOD generates a unique video ID and sends you the AddLiveRecordVideoComplete callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  4. ApsaraVideo VOD reads the transcoding template group from your Live-to-VOD configuration and begins transcoding the recorded video.

  5. Callbacks are sent when each processing step completes (snapshot taken, single video transcoded, or all videos transcoded). These callbacks arrive in no guaranteed order. The transcoding callback includes the CDN-accelerated playback URL. You can also call the GetPlayInfo operation with the video ID to retrieve the playback URL.

Practice 2: Storage only + Manual transcoding

Store recorded videos in ApsaraVideo VOD without automatic transcoding. Trigger transcoding manually when you are ready, optionally after editing the recordings with the online editing feature.

The storage only mode uses the built-in No Transcoding template group, which is automatically created when you enable the VOD bucket (the OSS bucket allocated to ApsaraVideo VOD).

When to use: Scenarios where recordings need post-processing before publication, such as editing sports match footage or game highlight reels. After transcoding completes, ApsaraVideo VOD automatically provides CDN acceleration for the transcoded videos.

Flowchart:

image

How it works

  1. Start stream ingest.

  2. When a recording cycle completes, ApsaraVideo VOD automatically stores the recorded video.

  3. ApsaraVideo VOD generates a unique video ID and sends you the AddLiveRecordVideoComplete callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  4. Call the SubmitTranscodeJobs operation to trigger transcoding. Before transcoding, you can perform other operations on the recorded video, such as online editing.

  5. Callbacks are sent when each processing step completes (snapshot taken, single video transcoded, or all videos transcoded). These callbacks arrive in no guaranteed order. The transcoding callback includes the CDN-accelerated playback URL. You can also call the GetPlayInfo operation with the video ID to retrieve the playback URL.

Practice 3: Automatic merging across recording cycles

When a live stream spans multiple recording cycles, ApsaraVideo VOD can automatically merge the resulting videos into a single video. For example, with a 20-minute recording cycle and a 1-hour stream, three videos are generated and then merged.

You can configure automatic merging with either of the following template groups:

  • A merging and transcoding template group: merges and transcodes automatically (Option A)

  • The built-in No Transcoding template group: merges only, transcode manually later (Option B)

If the live stream is interrupted for longer than the specified timeout period, ApsaraVideo VOD automatically merges the recorded videos that were generated and processes the merged video based on the transcoding configuration. You can configure the interruption timeout period in ApsaraVideo Live.

Important

Automatic merging is not supported for live streams interrupted for longer than 3 minutes.

Option A: Merging + Automatic transcoding

All recorded videos are merged and transcoded automatically after the live stream ends.

When to use: Sports broadcasts, online courses, and other scenarios where all recorded segments should be published as a single video.

Flowchart:

image

How it works

  1. Start stream ingest.

  2. When a recording cycle completes, ApsaraVideo VOD automatically stores the recorded video.

  3. ApsaraVideo VOD generates a unique video ID and sends you the AddLiveRecordVideoComplete callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  4. The live stream is interrupted for longer than the specified timeout period, or you manually end the stream.

  5. ApsaraVideo VOD receives an end-of-stream notification from ApsaraVideo Live.

  6. ApsaraVideo VOD checks the merging configuration in your Live-to-VOD settings. If automatic merging is enabled, it uses the specified merging and transcoding template group to merge and transcode the recorded videos.

  7. ApsaraVideo VOD generates a unique video ID for the merged video and sends you the LiveRecordVideoComposeStart callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  8. When merging completes, ApsaraVideo VOD sends the FileUploadComplete callback.

  9. Callbacks are sent when each processing step completes (snapshot taken, single video transcoded, or all videos transcoded). These callbacks arrive in no guaranteed order. The transcoding callback includes the CDN-accelerated playback URL. You can also call the GetPlayInfo operation with the video ID to retrieve the playback URL.

Option B: Merging + Manual transcoding

All recorded videos are merged automatically, but transcoding is not triggered. You can process the merged video before triggering transcoding manually. For example, you can insert ads into the video or cut the content played during the halftime of a sports match.

When to use: Scenarios where the merged video requires editing before publication.

Flowchart:

image

How it works

  1. Start stream ingest.

  2. When a recording cycle completes, ApsaraVideo VOD automatically stores the recorded video.

  3. ApsaraVideo VOD generates a unique video ID and sends you the AddLiveRecordVideoComplete callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  4. The live stream is interrupted for longer than the specified timeout period, or you manually end the stream.

  5. ApsaraVideo VOD receives an end-of-stream notification from ApsaraVideo Live.

  6. ApsaraVideo VOD checks the merging configuration in your Live-to-VOD settings. If automatic merging is enabled, it uses the specified merging only template group to merge the recorded videos.

  7. ApsaraVideo VOD generates a unique video ID for the merged video and sends you the LiveRecordVideoComposeStart callback with live streaming parameters such as DomainName, AppName, and StreamName. Store the video ID to track subsequent status updates.

  8. When merging completes, ApsaraVideo VOD sends the FileUploadComplete callback. The merged video is now ready for further processing.

  9. Call the SubmitTranscodeJobs operation to trigger transcoding. Before transcoding, you can perform other operations on the merged video, such as online editing.

  10. Callbacks are sent when each processing step completes (snapshot taken, single video transcoded, or all videos transcoded). These callbacks arrive in no guaranteed order. The transcoding callback includes the CDN-accelerated playback URL. You can also call the GetPlayInfo operation with the video ID to retrieve the playback URL.

Callbacks reference

The following callbacks are sent during the Live-to-VOD workflow. Use the video ID in each callback to correlate events and update your system.

CallbackTriggerKey parameters
AddLiveRecordVideoCompleteA recorded video is stored in ApsaraVideo VODDomainName, AppName, StreamName, video ID
LiveRecordVideoComposeStartMerging of recorded videos beginsDomainName, AppName, StreamName, video ID
FileUploadCompleteMerging completes and the merged file is readyVideo ID, merge status
Transcoding callbackA snapshot is taken or transcoding completesVideo ID, playback URL
Callbacks arrive in no guaranteed order. Design your system to handle events asynchronously based on the video ID.

FAQ

How do I retrieve the playback URL for a transcoded video?

The transcoding callback includes the playback URL directly. You can also call the GetPlayInfo operation with the video ID. Both methods return a CDN-accelerated URL.

What is the VOD bucket?

The VOD bucket is the OSS bucket allocated to ApsaraVideo VOD. The built-in No Transcoding template group is automatically created when you enable this bucket.

Can I combine storage only with automatic merging?

Yes. Enable automatic merging in your Live-to-VOD settings and specify the built-in No Transcoding template group (merging only mode). ApsaraVideo VOD merges all recorded segments without transcoding, and you can process the merged video and trigger transcoding manually later.

What happens if a live stream is interrupted for more than 3 minutes?

Automatic merging is not supported for live streams that are interrupted for longer than 3 minutes. You can specify the interruption timeout period for live streams in ApsaraVideo Live.