shaka:package_cmaf
shaka:package_cmaf¶
Shaka Packager tool - CMAF
The latest stable release of the Shaka Packager with convenient commandline parameter mapping
Full documentation of the tool can be found in: [Shaka-Packager](https://github.com/google/shaka-packager)
Example:
{
"tool": "shaka:package_cmaf",
"parameters": {
"inputs": [
{
"input_file": "{mp4_h264_vid2000k}",
"stream_selector": "video",
"output": "{video1_mp4}",
"output_format": "mp4",
"bandwidth": "1500000",
"drm_label": "HD"
},
],
...
"hls_master_playlist_output": "master.m3u8",
"mpd_output": "dash.mpd",
"protection_scheme": "cbcs",
"enable_raw_key_encryption": "True",
"drmkeys": [
{
"key_label": "my_key_02",
"key_streamtype": "HD"
},
...
]
}
},
Parameter | Properties | Default | Type | Choice | Description |
---|---|---|---|---|---|
inputs | required [list value] | ||||
output_dir | required | ||||
hls_base_url | optional | The base URL for the Media Playlists and media files listed in the playlists. This is the prefix for the files | |||
hls_master_playlist_output | optional | Output path for the master playlist for HLS. This flag must be used to output HLS. | |||
hls_playlist_type | optional | VOD, EVENT, or LIVE. This defines the EXT-X-PLAYLIST-TYPE in the HLS specification. For hls_playlist_type of LIVE, EXT-X-PLAYLIST-TYPE tag is omitted. | |||
mp4_reset_initial_composition_offset_to_zero | optional | false | bool | MP4 only. If it is true, reset the initial composition offset to zero, i.e. by assuming that there is a missing EditList. | |
vp9_subsample_encryption | optional | true | bool | vp9_subsample_encryption (Enable VP9 subsample encryption.) | |
enable_raw_key_encryption | optional | false | bool | Set to true to enable encryption. | |
drmkeys | optional [list value] | drmtoday keys | |||
overwrite | optional | false | bool | 'True', 'False' | Overwrite existing assetId or keyID(s) |
environment | optional | 'prod', 'test', 'staging', 'PROD', 'TEST', 'STAGING' | |||
merchant | optional | The DRMtoday Merchant | |||
user | optional | The DRMtoday API user | |||
password | optional | The DRMtoday API user password | |||
asset_id | optional | The DRMtoday Asset-ID | |||
variant_id | optional | The DRMtoday Variant-ID | |||
default_language | optional | For DASH, any audio/text tracks tagged with this language will have | |||
default_text_language | optional | Same as above, but this applies to text tracks only, and overrides the default language for text tracks. | |||
time_shift_buffer_depth | optional | 1800 | str | Guaranteed duration of the time shifting buffer for HLS LIVE playlists and DASH dynamic media presentations, in seconds. | |
base_urls | optional | Comma separated BaseURLs for the MPD. The values will be added as | |||
generate_dash_if_iop_compliant_mpd | optional | false | bool | Try to generate DASH-IF IOP compliant MPD. This is best effort and does not guarantee compliance. | |
generate_static_live_mpd | optional | true | bool | Set to true to generate static mpd. If segment_template is specified in stream descriptors, shaka-packager generates dynamic mpd by default; if this flag is enabled, shaka-packager generates static mpd instead. Note that if segment_template is not specified, shaka-packager always generates static mpd regardless of the value of this flag. | |
min_buffer_time | optional | 2 | str | Specifies, in seconds, a common duration used in the definition of the MPD Representation data rate. | |
minimum_update_period | optional | 5 | str | Indicates to the player how often to refresh the media presentation description in seconds. This value is used for dynamic MPD only. | |
mpd_output | optional | MPD output file name. | |||
suggested_presentation_delay | optional | 0 | str | Specifies a delay, in seconds, to be added to the media presentation time. This value is used for dynamic MPD only. | |
use_legacy_vp9_codec_string | optional | false | bool | Use legacy vp9 codec string 'vp9' if set to true; otherwise new style vp09.xx.xx.xx... codec string will be used. Default to false as indicated in https://github.com/google/shaka-packager/issues/406, all major browsers and platforms already support the new 'vp09' codec string. | |
video_feature | optional | 'HDR', '' | Specify the optional video feature, e.g. HDR. type: string | ||
protection_scheme | optional | 'cenc', 'cbc1', 'cens', 'cbcs' | Specify a protection scheme, 'cenc' or 'cbc1' or pattern-based protection schemes 'cens' or 'cbcs'. | ||
disable_peer_verification | optional | false | bool | Disable peer verification. This is needed to talk to servers without valid certificates. | |
clear_lead | optional | 0 | str | Clear lead in seconds if encryption is enabled. | |
fragment_duration | optional | Fragment duration in seconds. Should not be larger than the segment duration. Actual fragment durations may not be exactly as requested. | |||
fragment_sap_aligned | optional | true | bool | Force fragments to begin with stream access points. This flag implies segment_sap_aligned. | |
mp4_include_pssh_in_stream | optional | false | bool | MP4 only: include pssh in the encrypted stream. | |
num_subsegments_per_sidx | optional | For ISO BMFF only. Set the number of subsegments in each SIDX box. If 0, a single SIDX box is used per segment; if -1, no SIDX box is used; Otherwise, the muxer packs N subsegments in the root SIDX of the segment, with segment_duration/N/fragment_duration fragments per subsegment. | |||
segment_duration | optional | Segment duration in seconds. If single_segment is specified, this parameter sets the duration of a subsegment; otherwise, this parameter sets the duration of a segment. Actual segment durations may not be exactly as requested. | |||
segment_sap_aligned | optional | true | bool | Force segments to begin with stream access points. | |
allow_codec_switching | optional | true | bool | If enabled, allow adaptive switching between different codecs, if they have the same language, media type (audio, video etc) and container type. | |
dash_force_segment_list | optional | false | bool | Uses SegmentList instead of SegmentBase. Use this if the content is huge and the total number of (sub)segment references is greater than what the sidx atom allows (65535). Currently this flag is only supported in DASH ondemand profile.) | |
protection_systems | optional [list value] | 'Widevine', 'PlayReady', 'FairPlay', 'CommonSystem', 'ChinaDRM' | Protection systems to be generated. Supported protection systems include Widevine, PlayReady, FairPlay, Marlin, ChinaDRM and CommonSystem (https://goo.gl/s8RIhr). type: string default: | ||
no_include_mspr_pro_for_playready | optional | false | bool | If enabled, PlayReady Object | |
temp_dir | optional | Specify a directory in which to store temporary (intermediate) files. type: string default: "" |