Package
Name | Type | Description |
---|---|---|
options | object | Packaging options including source deletion and validation steps. |
location | object | This will override any location defined within the parent of this manifest. |
file_pattern | string | This describes the target file name. Placeholders such as {source_basename} for source file name are supported.default: {source_basename} |
force_original_media | boolean | Use 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. |
kind | enum hls dash smooth | The kind of package to create. Options are: "dash", "hls", or "smooth". |
dash | object | MPEG-DASH specific settings, only valid if kind is "dash". |
smooth | object | Smooth Streaming specific settings, only valid if kind is "smooth". |
hls | object | HLS specific settings, only valid if kind is "hls". |
encryption | object | DRM and encryption settings for the produced media files. |
encryptions | array | Encryptions arrays, can be referenced by id |
segmentation_mode | enum segmented_ts single_ts multiplexed_ts fmp4 segmented_mp4 | Type of segmentation for media files. |
segment_duration_sec | number | Desired duration of segments. Valid for segmented_ts, single_ts, multiplexed_ts, fmp4, segmented_mp4 modes. |
media_location | object | The location of media files, if they need processing. |
media_url_prefix | string | The URL prefix to be added to media locations. |
media_url_template | string | A media URL template. The actual media file must be referenced via {media_file} within. |
media_file_pattern | string | This describes the target file name. Placeholders such as {source_basename} for source file name are supported.default: {source_basename} |
media_file_extensions | object | The extensions to be used for each type of media in the output. |
init_file_pattern | string | The file pattern for the segmented mp4 init file. |
title | string | An optional title. Note that not all multiplexers support adding a title. |
author | string | An optional author. Note that not all multiplexers support adding an author. |
copyright | string | An optional copyright string. Note that not all multiplexers support adding a copyright string. |
info_url | string | An optional info URL string. Note that not all multiplexers support adding a url. |
uid | string | This 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_captions | array | An 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"
}
]
}
}
]
}
}