Skip to main content

Package

NameTypeDescription
optionsobjectPackaging options including source deletion and validation steps.
locationobjectThis will override any location defined within the parent of this manifest.
file_patternstring
This describes the target file name. Placeholders such as {source_basename} for source file name are supported.
default: {source_basename}
force_original_mediabooleanUse the original transcoded files rather than remuxing them in the Package task to create the HLS/DASH outputs. Requires that the original files have correct segmentation.
kindenum                          
hls
dash
smooth
The kind of package to create. Options are: "dash", "hls", or "smooth".
dashobjectMPEG-DASH specific settings, only valid if kind is "dash".
smoothobjectSmooth Streaming specific settings, only valid if kind is "smooth".
hlsobjectHLS specific settings, only valid if kind is "hls".
encryptionobjectDRM and encryption settings for the produced media files.
encryptionsarrayEncryptions arrays, can be referenced by id
segmentation_modeenum                          
segmented_ts
single_ts
multiplexed_ts
fmp4
segmented_mp4
Type of segmentation for media files.
segment_duration_secnumberDesired duration of segments. Valid for segmented_ts, single_ts, multiplexed_ts, fmp4, segmented_mp4 modes.
media_locationobjectThe location of media files, if they need processing.
media_url_prefixstringThe URL prefix to be added to media locations.
media_url_templatestringA media URL template. The actual media file must be referenced via {media_file} within.
media_file_patternstring
This describes the target file name. Placeholders such as {source_basename} for source file name are supported.
default: {source_basename}
media_file_extensionsobjectThe extensions to be used for each type of media in the output.
init_file_patternstring
The file pattern for the segmented mp4 init file.
titlestringAn optional title. Note that not all multiplexers support adding a title.
authorstringAn optional author. Note that not all multiplexers support adding an author.
copyrightstringAn optional copyright string. Note that not all multiplexers support adding a copyright string.
info_urlstringAn optional info URL string. Note that not all multiplexers support adding a url.
uidstringThis describes the manifest UID. Encodes to be included in this manifest creation must include this UID in their manifest_uids property. If no UID is specified here, then all encodes are included.
closed_captionsarrayAn array of closed-caption references to be included in the manifest.

Example package


"name": "Hybrik Package Example",
"payload": {
"elements": [
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "s3",
"url": "s3://my_bucket/my_folder/my_file.mp4"
}
}
},
{
"uid": "transcode_all_renditions",
"kind": "transcode",
"payload": {
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_output_folder/mp4s"
},
"targets": [
{
"file_pattern": "{source_basename}_800kbps{default_extension}",
"existing_files": "replace",
"container": {
"kind": "fmp4",
"segment_duration_sec": 6
},
"video": {
"codec": "h264",
"bitrate_mode": "cbr",
"use_scene_detection": false,
"bitrate_kb": 800,
"height": 486
}
},
{
"file_pattern": "{source_basename}_400kbps{default_extension}",
"existing_files": "replace",
"container": {
"kind": "fmp4",
"segment_duration_sec": 6
},
"video": {
"codec": "h264",
"bitrate_mode": "cbr",
"use_scene_detection": false,
"bitrate_kb": 400,
"height": 360
}
},
{
"file_pattern": "{source_basename}_200kbps{default_extension}",
"existing_files": "replace",
"container": {
"kind": "fmp4",
"segment_duration_sec": 6
},
"video": {
"codec": "h264",
"bitrate_mode": "cbr",
"use_scene_detection": false,
"bitrate_kb": 200,
"height": 252
}
},
{
"file_pattern": "{source_basename}_audio_64kbps{default_extension}",
"existing_files": "replace",
"container": {
"kind": "fmp4",
"segment_duration_sec": 6
},
"audio": [
{
"channels": 2,
"codec": "aac_lc",
"sample_rate": 48000,
"bitrate_kb": 96
}
]
}

]
}
},
{
"uid": "package_hls",
"kind": "package",
"payload": {
"kind": "hls",
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_output_folder/hls_manifests",
"attributes": [
{
"name": "ContentType",
"value": "application/x-mpegURL"
}
]
},
"file_pattern": "master_manifest.m3u8",
"segmentation_mode": "segmented_ts",
"segment_duration_sec": "6",
"force_original_media": false,
"media_location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_output_folder/hls_media",
"attributes": [
{
"name": "ContentType",
"value": "video/MP2T"
}
]
},
"media_file_pattern": "{source_basename}.ts",
"hls": {
"media_playlist_location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_output_folder/hls_manifests"
}
}
}
}
],
"connections": [
{
"from": [
{
"element": "source_file"
}
],
"to": {
"success": [
{
"element": "transcode_all_renditions"
}
]
}
},
{
"from": [
{
"element": "transcode_all_renditions"
}
],
"to": {
"success": [
{
"element": "package_hls"
}
]
}
}
]
}
}