Skip to content
This documentation is also available as markdown. For a complete index of all pages, see llms.txt at /llms.txt

DRM CLI Packager Parameters and Error Codes

This page lists the command parameters and error codes of the Doverunner DRM CLI Packager. For installation, the integration architecture and packaging examples, see the DRM CLI Packager Guide.

You can use additional Shaka Packager commands in the command format below.

./doverunner-drm-packager --enc_token value --content_id value -i value -o value (--dash || --hls || --cmaf || --ncg || --hls_ncg)
NameTypeRequiredDescription
--enc_tokenstringY (for CPIX communication)KMS token value used for CPIX API communication with Doverunner KMS. You can check it on the Content Security > Multi DRM > Settings screen of the Doverunner console (click Retrieve Secret Information to show the value).
--site_idstringY (for the old proprietary communication)Doverunner service site ID (4 bytes) used for the old type proprietary communication. You can check it on the Content Security > Multi DRM > Settings screen of the Doverunner console (click Retrieve Secret Information to show the value).
--access_keystringY (for the old proprietary communication)An authentication key issued to the service site. You can check it on the Doverunner console site the same as site_id value.
--content_idstringYUnique ID of the content being packaged. Enter the ID value managed by the customer’s CMS, and the same CID must be used in the subsequent client integration step. (Maximum 200 bytes)
--cmafboolY (Must input at least one of the five packaging type parameters)Perform CMAF packaging which supports three multi-DRM (Widevine, PlayReady, FPS) with a single content. Cannot be processed simultaneously with other types of packaging.
--dashboolPerform DASH-CENC(Widevine, PlayReady) packaging
--hlsboolPerform HLS-AES (FPS) packaging
--ncgboolPerform NCG packaging
--hls_ncgboolPerform HLS-AES (NCG) packaging. Generate HLS-AES content to protect keys using NCG DRM. Cannot be apply with other packaging types such as --dash and --hls.
-i (--input_file)stringYSource filename. Enable adaptive streaming if two or more files are input.
[Additional options] Add after the source filename in :{key}={value} format with no special character in the value.
- :name Name of video/audio track (e.g. :name=1080p or :name='English Audio') Can input space, period, and underscore characters.
- :lang Language code(ISO 639-1, lowercase two-letter) of audio track (e.g. :lang=en)
- :video_bandwidth Video track bandwidth(bps) (e.g. :video_bandwidth=5000000)
-o (--output_dir)stringNOutput folder name.
Default: Create an output directory at the current location (add the -f command to allow folders and files to be overwritten)
--config_filestringNConfig filename with fixed options such as Site ID and access key. Json and XML standards are supported. The default is Json (xml parsing is applied if the file extension is xml)
--clear_leadnumberNApply clear(unencrypted) part at the beginning of the packaged content. Default: 0 (second)
--skip_audio_encryptionboolNDisable audio track encryption. Default: false(encrypt audio)
--multi_keyboolNApply multiple key sets for each track. Audio encryption is disabled by default when this option is used; use --encrypt_audio to enable it. Cannot be applied to NCG packaging.
--encrypt_audioboolNEnable audio track encryption when using --multi_key. (Audio encryption is skipped by default with --multi_key)
--max_sd_heightnumberNMax resolution to be packaged as SD track. Default: 480
--max_hd_heightnumberNMax resolution to be packaged as HD track. Default: 1080
--max_uhd1_heightnumberNMax resolution to be packaged as UHD track. Default: 2160
--fragment_durationnumberNFragment duration (seconds)
--segment_durationnumberNSegment duration (seconds)
--on_demandboolNApply on-demand profile in DASH packaging.
If omitted or ‘N’, live profile is used.
--output_single_fileboolNSet HLS packaging output as fMP4 file
--mpd_filenamestringNFilename of DASH manifest (.mpd)
--m3u8_filenamestringNFilename of HLS master manifest (.m3u8)
--subtitlestringNFilename of subtitles
[Additional options] Add after the subtitle filename in :{key}={value} format with no special character in the value.
- :name Name of subtitle language (e.g. :name=English)
- :lang Language code(ISO 639-1, lowercase two-letter) of subtitle (e.g. :lang=en)
--mp4_subtitleboolNWhen entering subtitles with the --subtitle parameter, the output subtitle format can be set to Embedded MP4 with this parameter. If the parameter is omitted, the subtitle in Text VTT format is created by default.
- :format Internal formatting within the MP4 container(e.g. :format=ttmlor :format=vtt)
--generate_tracktype_manifestsboolNCreate multiple manifest (playlist) files for multi-key packaging. For adaptive streams containing SD to UHD tracks, three manifests are created: ‘SD_ONLY’, ‘SD_HD’, and ‘SD_UHD’.
--enable_average_bandwidth_mpdboolNApply the bandwidth of each track in the MPD file as an average value instead of the maximum value (default: false)
--show_content_infoboolNEnables adding the content information to manifest files(mpd, m3u8) (default: false)
--stop_indicatorboolNHide packaging status indicator
--quietboolNHide packaging logs
--license_urlstringNLicense server URL used in PlayReady PSSH and NCG header when PSSH is generated locally.
Default: https://drm-license.doverunner.com/ri/licenseManager.do
--kms_query_paramsstringNAdditional query parameters to append to the KMS URL when communicating with KMS. Enter in key=value format (e.g. param1=value1&param2=value2).
--generate_psshboolNWhen this option is applied, the PSSH value generated by the packager itself is used instead of getting the value from the key server.
--ascending_track_order_in_manifestboolNWhen this option is applied, video tracks in the manifest of ABR content are sorted in ascending order according to their bandwidth. If not applied, sort in descending order (default)
--wiseplay_drmboolNApply WisePlay DRM for Huawei devices to DASH packaging when this option is applied. Must be used with the --dash option.

This option is used when packaging with a key that is managed separately by the service site, without using the encryption key generated by Doverunner key server.

When using external keys, parameters such as --enc_token, --site_id, and --access_key are not used because it does not require communication with the Doverunner key server.

NameTypeRequiredDescription
--enable_raw_key_encryptionboolYEnable the use of external key
--providerstringNDRM Provider name for Widevine PSSH
Default: doverunner
--keysstringYEncryption key and key ID pair (16byte HEX string)
label=:key_id=16byte_hex:key=16byte_hex
--ncg_cekstringY (for NCG DRM packaging)32 bytes key for NCG DRM (HEX)
--ivstringY (for HLS-FPS packaging)16 bytes initial vector (HEX)
--psshstringNPlayReady, Widevine PSSH data
<?xml version="1.0" encoding="UTF-8"?>
<doverunner-drm-packager>
<RESULT>0</RESULT>
</doverunner-drm-packager>

RESULT: ‘0’ if succeeded. Error code if failed.

Error CodeDescription
0Succeeded
1101None of the argument values after the run command are passed.
1102An invalid parameter value was entered. (Please refer to INFO.)
1103The number of the following argument values is not correct.
1201The file is not located in the specified path.
1202Can not access file. (Permission / file name problem)
1203Creation failed because the path to the file / folder is too long.
1204Creation failed because file / folder name is too long.
1205File / folder creation failed due to insufficient storage space.
1206Moving to that location in the file failed.
1207Failed to get file size.
2001An error occurred while sending the request to the server.
2002An error was returned from the server. (Please refer to INFO.)
2003Invalid block size.
2004You do not have a private key.
2005Invalid private key.