All Products
Search
Document Center

ApsaraVideo Live:Live stream snapshots

Last Updated:Mar 03, 2026

The Snapshots feature captures periodic images from live streams in real time and stores them as JPG files in Object Storage Service (OSS).

How it works

  1. Configure -- Set up a snapshot template for your streaming domain in the ApsaraVideo Live console or through the API.

  2. Push -- Start or restart the stream ingest to activate the template.

  3. Capture and store -- ApsaraVideo Live captures snapshots at the configured interval and stores them in OSS.

  4. View and manage -- Browse, download, or delete snapshots from the console, the API, or directly in OSS.

Prerequisites

Before you begin, make sure that you have:

  • An activated OSS instance. For more information, see Activate OSS

  • At least one OSS bucket to store snapshot files. For more information, see Create a bucket

Important

The OSS bucket must be in the same region as the live center of the streaming domain. Cross-region snapshots are not supported.

Configure snapshot settings

Snapshots are configured per AppName. A snapshot rule applies to all stream ingests under the specified AppName. Set AppName to an asterisk (\*) to apply the rule to all stream ingests under the domain name.

Two snapshot types are available. Select one or both -- at least one type is required.

TypeBehavior
OverwriteEach new snapshot replaces the previous one.
Real-timeEach new snapshot is saved alongside previous ones. Snapshots accumulate incrementally.

Only the JPG format is supported.

Note

A newly configured snapshot template does not apply to ongoing live streams. Restart the stream ingest for the template to take effect.

Console

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Management > Snapshots. On the Snapshots page, click the Snapshot Settings tab.

  3. Select the streaming domain to configure.

  4. Click Add.

  5. Configure the snapshot template parameters described in the following table.

    ParameterDescription
    Application NameThe application name. Must match the AppName used for stream ingest. Enter an asterisk (\*) to configure snapshots for the entire domain.
    Snapshot IntervalThe interval between snapshots, in seconds. Valid values: 5 to 3600.
    Storage LocationThe OSS bucket where snapshot files are stored. The bucket must be in the same region as the live center of the streaming domain.
    Storage ModeSelect one or both modes: Overwrite -- Each new snapshot replaces the previous one. New -- Snapshots are stored sequentially in N+1 (N>=0) order. If both modes are selected, snapshots are captured using both methods.
  6. Click OK.

API

Call the AddLiveAppSnapshotConfig operation to configure snapshot settings.

View snapshot files

Console

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Management > Snapshots. On the Snapshots page, click Snapshot Management.

  3. Select the domain name and time range. Then, enter or select the AppName and StreamName.

  4. Click Search to view snapshots within the selected time range.

    Note

    If snapshots are not visible, verify that the access control list (ACL) of the OSS bucket is set to public-read. For more information, see Configure the ACL of an OSS bucket.

  5. Hover over an image to view a larger version or copy the snapshot URL.

API

Call the DescribeLiveStreamSnapshotInfo operation to query snapshot files.

OSS

Open the OSS bucket that you specified when configuring the snapshot feature. Browse the snapshot files directly. For more information, see List objects in OSS.

Delete snapshot files

ApsaraVideo Live stores snapshot metadata (such as AppName, StreamName, and the OSS storage path). The actual snapshot files reside in OSS. To delete the files from OSS when deleting snapshots through the ApsaraVideo Live console, first authorize ApsaraVideo Live to access OSS by creating a service role.

Authorize ApsaraVideo Live to delete OSS files

Create the AliyunMTSVideoLifecycleRole service role and attach the AliyunMTSVideoLifecycleRolePolicy system policy. This authorization is required before deleting snapshots or recordings from the ApsaraVideo Live console.

Create the service role

  1. Log on to the Resource Access Management (RAM) console as a RAM administrator.

  2. In the navigation pane on the left, choose Identities > Roles.

  3. On the Roles page, click Create Role.

  4. Set Principal Type to Cloud Service.

  5. From the Principal Name drop-down list, select ApsaraVideo Media Processing.

  6. Click OK.

  7. In the Create Role dialog box, enter AliyunMTSVideoLifecycleRole in the Role Name field and click OK.

Attach the system policy

  1. After the role is created, on its Basic Information page, click the Permissions tab.

  2. Click Precise Permission.

  3. Configure the following parameters:

    • Policy Type: System Policy

    • Policy Name: AliyunMTSVideoLifecycleRolePolicy

  4. Click OK.

Console

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Management > Snapshots. On the Snapshots page, click Snapshot Management.

  3. Select the domain name and time range. Then, enter or select the AppName and StreamName.

  4. To delete a single snapshot, hover over the image and click the delete icon.

  5. To delete multiple snapshots at once, select the snapshots and click Batch Delete.

Note

A maximum of 200 snapshots can be deleted at a time.

API

Call the DeleteSnapshotFiles operation to delete snapshot files. This operation also deletes the corresponding files from OSS.

Custom deletion policies

Configure snapshot callbacks to save snapshot information (including timestamps) to your business system. Then, delete files based on a custom policy such as scheduled cleanup. For more information, see Live stream snapshot callbacks.

References