All Products
Search
Document Center

Intelligent Media Services:VOD packaging

Last Updated:Feb 02, 2026

VOD packaging enables you to repackage video-on-demand (VOD) content stored in Object Storage Service (OSS) into multiple streaming formats, including HLS, DASH, and CMAF. You can also encrypt your content with Digital Rights Management (DRM) to protect it from unauthorized access.

How it works

VOD packaging uses just-in-time packaging. Content is packaged dynamically when a playback request is received, not during asset ingestion. This approach:

  • Eliminates the need to store multiple copies of the same content in different formats.

  • Reduces storage costs.

  • Enables format changes without re-ingesting content.

Billing

Before you begin

Before you begin, ensure that you have:

  • An OSS bucket in the same region where you want to use VOD packaging.

  • Video content stored as an M3U8 master playlist in OSS.

    VOD packaging only accepts M3U8 master playlists as input. A master playlist references multiple media playlists at different bitrates. If you are not familiar with playlist types, see Appendix: Input requirements.

  • (For DRM) A third-party DRM provider with a configured key server.

Procedure

Step 1: Create a packaging group

A packaging group is a container that holds one or more packaging configurations.

  1. Log on to the IMS console.

  2. In the left navigation pane, choose MediaPackage > VOD Package > Packaging Groups.

  3. Click Create Groups.image

  4. In the dialog box, enter a unique name for the packaging group.

  5. Click OK.

Step 2: Create a packaging configuration

A packaging configuration defines the output format and settings for packaged content.

  1. On the Packaging Groups page, click the name of the packaging group you created.

  2. Click Create Packaging Configuration.image

  3. Configure the basic settings:

    Parameter

    Description

    Name

    A name for the configuration. The name must be unique within the packaging group and across different packaging groups.

    Package Type

    The output format. Valid values:

    • Apple HLS: Packages content into Transport Stream (TS) segments for HLS delivery.

    • DASH-ISO: Packages content into CMAF segments for DASH delivery.

    • CMAF: Packages content into CMAF segments for HLS delivery.

    Segment Duration

    The duration of each segment in seconds. Default: 6 seconds. Longer segments increase latency. Shorter segments increase request overhead.

  4. Configure manifest settings:

    Parameter

    Description

    Manifest Name

    The name used in the playback URL. For example, if you set this to index and select Apple HLS, the playback URL ends with index.m3u8.

  5. (Optional) Configure stream selection:

    Parameter

    Description

    Enable Stream Selection

    Turn on to limit what incoming bitrates are available for playback and sort the streams in the output manifest.

    Stream Order

    The order of streams in the output manifest. Valid values:

    • Original: Sorts the output streams in the same order that the source uses.

    • ASCENDING: Sorts the output streams starting with the lowest bitrate.

    • DESCENDING: Sorts the output streams starting with the highest bitrate.

    Min Video Bitrate

    Excludes streams with a bitrate lower than this value in the output manifest.

    Max Video Bitrate

    Excludes streams with a bitrate higher than this value in the output manifest.

  6. (Optional) Configure DRM encryption.

    MediaPackage supports DRM encryption to protect your content.

    Note

    MediaPackage does not provide key management services. DRM costs are charged by your DRM provider. IMS does not charge additional fees for DRM encryption.

    Supported DRM systems

    DRM system

    System ID

    Supported package types

    Google Widevine

    edef8ba9-79d6-4ace-a3c8-27dcd51d21ed

    DASH-ISO, CMAF

    Microsoft PlayReady

    9a04f079-9840-4286-ab92-e65be0885f95

    DASH-ISO, CMAF

    Apple FairPlay

    94ce86fb-07ff-4f43-adb8-93d2fa968ca2

    CMAF

    Enable DRM encryption

    1. When creating a packaging configuration, turn on the Enable Encryption Method toggle.

    2. Configure the following parameters:

      Parameter

      Description

      System IDs

      Select one or more DRM systems, up to three IDs for CMAF and two for DASH-ISO. The System ID is used to identify the DRM provider.

      URL

      The URL of the proxy that you set up to talk to your key server. MediaPackage uses this URL to request encryption keys. Example formats:

      • https://example.com/encryption/{token}

      • https://example.aliyundoc.com/encryption -H "{key:value}"

      • https://example.com/encryption?key1=value1&key2=value2

      Constant Initialization Vector

      (Optional) A 128-bit, 32-character, hexadecimal-encoded string. If not specified, the initialization vector rotates periodically.

  7. Click OK.

Step 3: Ingest an asset

Ingest your source content from OSS to associate it with a packaging group.

  1. In the left navigation pane, choose MediaPackage > VOD Package > Assets.

  2. Click Ingest Assets.

  3. Configure the following parameters:image

    Parameter

    Description

    Packaging Group

    Select the packaging group to use. All packaging configurations in the group will be applied to this asset.

    Asset Name

    A unique name for the asset.

    Relative Path

    Click Select to browse and select an M3U8 master playlist from your OSS bucket. The OSS bucket must be in the same region as VOD packaging.

    Content ID

    Required if DRM encryption is enabled. Enter a unique identifier for the content. This ID is sent to your DRM key server.

  4. To ingest multiple assets, click Add Asset and configure the parameters as described above.

  5. Click OK.

    Asset ingestion takes several minutes. The asset status changes to Playable when ready.

Step 4: Get playback URLs and verify playback

After ingestion completes, obtain the playback URLs for your content.

  1. On the Assets page, click the name of the asset.image

  2. On the asset details page, find the URL for each packaging configuration.image

  3. (Optional) Click Preview to test playback in the console. The asset status must be Playable for playback to work.

FAQ

Why does asset ingest fail?

If asset ingest fails, check the following:

  1. Verify that the OSS bucket is in the same region as VOD packaging.

  2. Check that the M3U8 file path is correct.

  3. Ensure the M3U8 file is a valid master playlist.

Why does playback fail?

If playback fails, check the following:

  1. Verify that the asset status is Playable.

  2. Confirm that your source content is an M3U8 master playlist, not a media playlist.

  3. If using DRM, verify that your key server URL is accessible and returns valid keys.

What is the difference between ingesting assets from the Assets page vs. a packaging configuration page?

Both methods work the same way. The Assets page displays all assets across all packaging groups, while the packaging configuration page shows only assets associated with that specific packaging group.

Appendix: Input requirements

VOD packaging requires an M3U8 master playlist as input. A master playlist references multiple media playlists at different quality levels (bitrates).

Sample master playlist

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000,CODECS="mp4a.40.2,avc1.64001e",RESOLUTION=640x302
video/player-ld.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=200000,CODECS="mp4a.40.2,avc1.64001f",RESOLUTION=848x402
video/player-sd.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=300000,CODECS="mp4a.40.2,avc1.640020",RESOLUTION=1280x606
video/player-hd.m3u8

Sample media playlist

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-TARGETDURATION:17
#EXTINF:15.500,
1723518810_120.ts
#EXT-X-DISCONTINUITY
#EXTINF:16.666,
1723518884_121.ts
#EXTINF:2.533,
1723518886_122.ts
#EXT-X-ENDLIST