Package your VOD media assets into HLS, DASH, or CMAF streaming protocols, with optional DRM encryption.
Introduction
VOD packaging packages video-on-demand (VOD) media assets for different streaming protocols, including HLS, DASH, and CMAF for HLS. You can also apply DRM encryption to your video content.
Using the VOD packaging feature incurs fees. For more information, see Billing of VOD packaging.
Limitations
-
The input for packaging must be an m3u8 master playlist.
An m3u8 file can be either a master playlist or a media playlist.
The following samples show a typical master playlist and media playlist:
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.m3u8Media 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 -
VOD packaging requires that your source files are stored in an Object Storage Service (OSS) bucket. For more information about OSS, see Quick start.
ImportantStoring files in OSS incurs storage fees. For more information about OSS billing, see Storage fees.
-
The OSS bucket must be in the same region as the VOD packaging feature.
Configuration
-
Create a packaging group. Log on to the IMS console. In the left-side navigation pane, choose .

Parameters:
Parameter
Description
Name
Enter a unique name.
-
Create a packaging configuration. Click a packaging group name to go to its details page, where you can create a packaging configuration.

Create a packaging configuration:

Parameter
Description
Packaging configuration detail (Basic settings)
Name
Enter a unique name.
NoteThe name must be unique across all packaging groups.
Package type
The streaming protocol and segment format.
Apple HLS: Packages content into TS segments for the HLS protocol.
DASH-ISO: Packages content into CMAF segments for the DASH protocol.
CMAF: Packages content into CMAF segments for the HLS protocol.
Segment duration
The duration of a single segment in the packaged stream.
The recommended value is 6. Larger values increase playback latency, while smaller values increase the number of requests and resource overhead.
Manifest settings (Playback settings)
Manifest name
The name of the manifest file. For example, if you select the Apple HLS package type and enter
index, the playback URL is https://example.aliyundoc.com/index.m3u8.Stream selection (Advanced stream settings)
Stream selection
Enables or disables stream selection.
Stream order
Reorders variants in the packaged master playlist. For example, if high-bitrate variants appear first in the source, you can place low-bitrate variants first instead.
Valid values:
-
Original: Maintains the original variant order from the source.
-
ASCENDING: Sorts variants by bitrate in ascending order.
-
DESCENDING: Sorts variants by bitrate in descending order.
Minimum video bitrate
Excludes variants with a bitrate lower than this value from the master playlist.
Maximum video bitrate
Excludes variants with a bitrate higher than this value from the master playlist.
Encryption Method (DRM encryption settings. This feature requires familiarity with how DRM technologies work.)
NoteMediaPackage does not provide DRM key services or key management. You must work with a third-party DRM provider to enable DRM and manage keys. All related fees are billed by your DRM provider, not by MediaPackage.
Encryption method
-
AES-128
-
Sample-AES
System ID
-
Apple FairPlay (94ce86fb-07ff-4f43-adb8-93d2fa968ca2)
-
Google Widevine (edef8ba9-79d6-4ace-a3c8-27dcd51d21ed)
-
Microsoft PlayReady (9a04f079-9840-4286-ab92-e65be0885f95)
URL
The URL of the proxy server that enables MediaPackage to communicate with the key server.
Example 1: https://example.aliyundoc.com/encryption/{token}
Example 2: https://example.aliyundoc.com/encryption -H "{key:value}"
Example 3: https://example.aliyundoc.com/encryption?key1=value1&key2=value2
Constant initialization vector
Enter a 128-bit, 32-character, hexadecimal-encoded string. If you do not specify a value, the initialization vector rotates periodically.
-
Using the feature
After you configure the packaging settings, associate them with your VOD assets. Click a packaging configuration name to open its details page, click the Associate Asset tab, and ingest assets. You can also ingest assets from the asset management page.
Asset management
In the left-side navigation pane, choose to ingest an asset.

Ingest asset:

Parameters:
|
Parameter |
Description |
|
Packaging Group (Packaging settings) |
|
|
Packaging group |
Select a packaging group. All packaging configurations in the group are applied to the asset. |
|
Add Asset (Add media assets to be packaged. You can add multiple assets.) |
|
|
Asset name |
Enter a unique name. The name must be unique among existing assets. |
|
Relative path |
Select the m3u8 manifest file stored in OSS. You can only select files from an OSS bucket in the same region. |
|
Content ID |
Required if you have configured DRM encryption. |
Instructions:
-
Click the asset name to open the asset details page, where you can get the playback URL. You can also click Preview to test playback.

Asset details:

FAQ
When does packaging run?
MediaPackage packages content on-demand when a user requests playback from the output URL. Packaging does not occur during asset ingestion. This process is also known as just-in-time packaging.
Why does playback of the packaged stream fail?
If playback fails, check that the output URL status is Playable on the asset details page. If it is not Playable, verify that your packaging configuration is correct and ensure that the packaging input is an m3u8 master playlist. For more information, see Limitations.
What is the difference between using asset management and associating an asset in a packaging configuration?
Both methods package assets. The difference is scope: the Assets page lists all assets, while a packaging configuration page shows only assets in that packaging group.