shaka:package_dash_wvapi
shaka:package_dash_wvapi¶
Shaka Packager tool - DASH - Widevine API
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)
*ChinaDRM is not supported when using the Widevine API!*
Example:
{
"tool": "shaka:package_dash_wvapi",
"parameters": {
"inputs": [
{
"input_file": "{mp4_h264_vid2000k}",
"stream_selector": "video",
"output": "{video1_mp4}",
"output_format": "mp4",
"bandwidth": "1500000",
"drm_label": "HD"
},
],
...
"mpd_output": "dash.mpd",
"protection_scheme": "cenc",
"protection_systems": "PlayReady,Widevine",
"enable_widevine_encryption": "True",
"aes_signing_iv": "{aes-signing-iv}",
"aes_signing_key": "{aes-signing-key}",
"content_id": "{content-id}",
"key_server_url": "{secret}",
"signer": "castlabs"
}
}
Parameter | Properties | Default | Type | Choice | Description |
---|---|---|---|---|---|
inputs | required [list value] | ||||
output_dir | required | ||||
enable_widevine_encryption | optional | false | bool | Enable encryption with Widevine key server.User should provide either AES signing key (--aes_signing_key, --aes_signing_iv) or RSA signing key (--rsa_signing_key_path). | |
aes_signing_iv | optional | AES signing iv in hex string | |||
aes_signing_key | optional | AES signing key in hex string. --aes_signing_iv is required. Exclusive with --rsa_signing_key_path. | |||
content_id | optional | Content Id (hex) | |||
crypto_period_duration | optional | Crypto period duration in seconds. If it is non-zero, key rotation is enabled. | |||
group_id | optional | Identifier for a group of licenses (hex) | |||
key_server_url | optional | Key server url. Required for encryption and decryption | |||
max_hd_pixels | optional | 2073600 | str | The video track is considered HD if its max pixels per frame is higher than max_sd_pixels, but no higher than max_hd_pixels. Default: 2073600 (1920 x 1080) | |
max_sd_pixels | optional | 442368 | str | The video track is considered SD if its max pixels per frame is no higher than max_sd_pixels. Default: 442368 (768 x 576) | |
max_uhd1_pixels | optional | 8847360 | str | The video track is considered UHD1 if its max pixels per frame is higher than max_hd_pixels, but no higher than max_uhd1_pixels.Otherwise it is UHD2. Default: 8847360 (4096 x 2160) | |
policy | optional | The name of a stored policy, which specifies DRM content rights. | |||
rsa_signing_key_path | optional | Stores PKCS#1 RSA private key for request signing. Exclusive with --aes_signing_key. | |||
signer | optional | The name of the signer. | |||
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: "" |