---
title: "DRM CLI Packager Parameters and Error Codes"
description: "Command format, parameters, external-key options and error codes of the DoveRunner DRM CLI Packager."
---
> For the complete documentation index, see [llms.txt](https://docs.doverunner.com/llms.txt).

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](https://docs.doverunner.com/content-security/multi-drm/packaging/cli-packager/).

## Packager execution parameters

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

### Basic command format

```
./doverunner-drm-packager --enc_token value --content_id value -i value -o value (--dash || --hls || --cmaf || --ncg || --hls_ncg)
```
:::note 

From DRM CLI Packager v3.8.1, the standard CPIX API-based KMS (Key Management Server) communication is supported as a default option instead of the DoveRunner proprietary key server communication method used in the previous version. Backwards compatibility is also supported for existing users. (Same parameters as before are available) For details, refer to the list of command parameters below.

:::

### Command parameters

| Name | Type | Required  |Description |
|:---|:----|:---|:--------------|
|`--enc_token` | string | Y (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_id` | string | Y (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_key` | string | Y (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_id` | string | Y | Unique 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)<br/> |
|`--cmaf` | bool | Y (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. |
|`--dash` | bool |  | Perform DASH-CENC(Widevine, PlayReady) packaging |
|`--hls` | bool |  | Perform HLS-AES (FPS) packaging |
|`--ncg` | bool |  | Perform NCG packaging |
|`--hls_ncg` | bool |  | Perform 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)` | string | Y | Source filename. Enable adaptive streaming if two or more files are input. <br/> [Additional options] Add after the source filename in `:{key}={value}` format with no special character in the value. <br/> - `:name` Name of video/audio track (e.g. `:name=1080p` or `:name='English Audio'`) Can input space, period, and underscore characters.<br/> - `:lang` Language code(ISO 639-1, lowercase two-letter) of audio track (e.g. `:lang=en`)<br/> - `:video_bandwidth` Video track bandwidth(bps) (e.g. `:video_bandwidth=5000000`) |
|`-o (--output_dir)` | string | N | Output folder name.<br/>Default: Create an output directory at the current location (add the -f command to allow folders and files to be overwritten) |
|`--config_file` | string | N | Config 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_lead` | number | N | Apply clear(unencrypted) part at the beginning of the packaged content. Default: 0 (second) |
|`--skip_audio_encryption` | bool | N | Disable audio track encryption. Default: false(encrypt audio) |
|`--multi_key` | bool | N | Apply 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_audio` | bool | N | Enable audio track encryption when using `--multi_key`. (Audio encryption is skipped by default with `--multi_key`) |
|`--max_sd_height` | number | N | Max resolution to be packaged as SD track. Default: 480 |
|`--max_hd_height` | number | N | Max resolution to be packaged as HD track. Default: 1080 |
|`--max_uhd1_height` | number | N | Max resolution to be packaged as UHD track. Default: 2160 |
|`--fragment_duration` | number | N | Fragment duration (seconds) |
|`--segment_duration` | number | N | Segment duration (seconds) |
|`--on_demand` | bool | N | Apply on-demand profile in DASH packaging.<br/>If omitted or 'N', live profile is used. |
|`--output_single_file` | bool | N | Set HLS packaging output as fMP4 file |
|`--mpd_filename` | string | N | Filename of DASH manifest (.mpd) |
|`--m3u8_filename` | string | N | Filename of HLS master manifest (.m3u8) |
|`--subtitle` | string | N | Filename of subtitles<br/> [Additional options] Add after the subtitle filename in `:{key}={value}` format with no special character in the value. <br/> - `:name` Name of subtitle language (e.g. `:name=English`)<br/> - `:lang` Language code(ISO 639-1, lowercase two-letter) of subtitle (e.g. `:lang=en`) |
| `--mp4_subtitle` | bool | N | When 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.<br/> - `:format` Internal formatting within the MP4 container(e.g. `:format=ttml`or  `:format=vtt`) |
|`--generate_tracktype_manifests` | bool | N | Create 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_mpd` | bool | N | Apply the bandwidth of each track in the MPD file as an average value instead of the maximum value (default: false) |
| `--show_content_info` | bool | N | Enables adding the content information to manifest files(mpd, m3u8) (default: false) |
|`--stop_indicator` | bool | N | Hide packaging status indicator |
|`--quiet` | bool | N | Hide packaging logs |
|`--license_url` | string | N | License server URL used in PlayReady PSSH and NCG header when PSSH is generated locally. <br/>Default: https://drm-license.doverunner.com/ri/licenseManager.do |
|`--kms_query_params` | string | N | Additional query parameters to append to the KMS URL when communicating with KMS. Enter in `key=value` format (e.g. `param1=value1&param2=value2`). |
| `--generate_pssh` | bool | N | When 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_manifest` | bool | N | When 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_drm` | bool | N | Apply WisePlay DRM for Huawei devices to DASH packaging when this option is applied. Must be used with the `--dash` option. |

### Options for using external keys

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.

| Name | Type | Required |Description |
|:---|:----|:---|:--------------|
|`--enable_raw_key_encryption` | bool | Y | Enable the use of external key  |
|`--provider` | string | N | DRM Provider name for Widevine PSSH<br/>Default: doverunner |
|`--keys` | string | Y | Encryption key and key ID pair (16byte HEX string)<br/> label=:key_id=16byte_hex:key=16byte_hex |
|`--ncg_cek` | string | Y (for NCG DRM packaging) | 32 bytes key for NCG DRM (HEX) |
|`--iv` | string | Y (for HLS-FPS packaging) | 16 bytes initial vector (HEX) |
|`--pssh` | string | N | PlayReady, Widevine PSSH data |

## Error code

### Result format

```xml
<?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 codes

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