Content Processing section configures the behavior of the service regarding Encoding, Packaging, and DRM Protection

Content Processing

Table of Contents

This job request section defines the content processing behavior, output, and other properties. For example, it is related to the output format and DRM protection.

{
    "ContentProcessing" : {
        "OutputFormat" : ["Dash", "Hls"],
        "VideoFormat": "H264",
        "OptimizeFor": "",
        "EncodingMode": "Default",
        "Sound": "5.1",
        "ExtractAndApplyHDR": false,
        "ExtractAndApplyHDR10Plus": false,
        "NormalizeAudio": false,
        "DrmProtection": "Managed",
        "DrmManaged": {
            "ApiUrl": "<Key Service Management API URL>",
            "TenantId": "<Key Service Tenant Id>",
            "ManagementKey": "<Key Service Management Key>", // Encrypted
            "KeySeed": "<Key Service Key Seed ID>", // Encrypted
            "Thumbprints": "Axinom Key Server Production,Axinom Key Server Testing,AxinomKeyServerTesting", // Encrypted
            "MultiKey": false,
            "Proxy": false,
            "KeysProtection": "Encrypted"
        },
        "UseHighestPossibleBitrate": false,
        "Archiving": "None",
        "AvoidNegativeVideoTimestamps": "Auto",
        "DeleteFilesFromSourceWhenDone": false,
        "ForceAspectRatioToStandard": false,
        "SearchForOptimalNearbyResolutions": true,
        "ForcePixelAspectRatioTo1": true,
        "BitrateLadder" : "V2",
        "VideoRepresentations": [ // Can omit to generate default representations
            {
                "Width": 1280, // Recommended to omit
                "Height": 720,
                "BitrateInKbps": 1500
            },
            {
                "Width": 852, // Recommended to omit
                "Height": 480,
                "BitrateInKbps": 800
            }
        ],
        "AudioRepresentations": [ // Can omit to generate default representations
            {
                "BitrateInKbps": 128,
                "Sound": "Mono",
                "AudioFormat": "AAC",
                "Create": "OnMatchingSound"
            },
            {
                "BitrateInKbps": 256,
                "Sound": "Stereo",
                "AudioFormat": "AAC",
                "Create": "Always"
            },
            {
                "BitrateInKbps": 384,
                "Sound": "5.1",
                "AudioFormat": "AC3",
                "Create": "Always"
            }
        ],
        "VideoSyncMethod": "Auto",
        "VisibleVideoWatermarks": [
            {
                "WatermarkFileName": "logo-1.jpg",
                "PositionXPercentage": 70,
                "PositionYPercentage": 80,
                "StartTime": "00:00:03",
                "EndTime": "00:00:09",
                "FadeInDurationInMs": 1000,
                "FadeOutDurationInMs": 1000,
                "SizePercentage": 40,
                "OpacityPercentage": 80
            }
        ]
    }
}
Property Description Use Case Required?

OutputFormat

An output to produce. Dash, DashOnDemand, Hls, Cmaf, Mpeg2Ts.

You must always specify at least one format to produce. Keep in mind that some of them are mutually exclusive. For example, if you specify Cmaf, then you cannot use any other. Same goes for DashOnDemand.

Yes

VideoFormat

A codec to use for encoding.

Supported values: H264, H265, DoNotEncode.

You can omit this property, as it uses H264 by default. However, you can use this property to define it as H265 instead (this format supported by Safari).

No. Defaults to H264.

OptimizeFor

An encoding preset to use.

Supported values: Speed, Balance, Quality.

You can use this property depending on your needs. If you require faster encoding and highest quality is not necessary, use Speed. On the other hand, use Quality for the best output, but the slowest processing time. Balance is the optimal and default mode. It provides decent processing time with a good quality image. This property has no effect in the packaging-only mode.

No. Defaults to Balance.

EncodingMode

An encoding mode to use. Supported values: Default, PerScene.

PerScene encoding produces smaller video output file sizes while maintaining quality, but the encoding time is increased. Different pricing rate applies when using PerScene mode.

No. Defaults to Default.

Sound

Sound layout to create in the output.

Supported values: Stereo, 5.1.

This sets the amount of channels in the output: 2 for stereo, 6 for 5.1. If there is only one channel (mono) in the input, set the output to Stereo (or omit this option) and the system will automatically choose 1 channel (mono) in the output.

If 5.1 is selected and there are fewer than 6 audio channels in the source file, the job will fail. This is to avoid the audio having an unexpected routing, which might be difficult to detect until the media goes to production.

If there are more channels available than requested, the system will automatically downmix to the requested number of channels.

No. Defaults to Stereo.

ExtractAndApplyHDR

Extracts base HDR10 or HLG metadata from source input and applies it to output. VideoFormat must be set to H265.

Supported values: true, false.

When source content is in HDR10 or HLG then Mastering Display and Content Light Level metadata will be extracted and applied to the output.

No. Defaults to false. When set to true, must be used in conjunction with VideoFormat: H265

ExtractAndApplyHDR10Plus

Extracts dynamic HDR10+ metadata from source input and applies it to output. VideoFormat must be set to H265.

Supported values: true, false.

When source content is HDR10+ then Mastering Display and Content Light Level metadata will be extracted along with dynamic HDR metadata and applied to the output.

No. Defaults to false. When set to true, must be used in conjunction with VideoFormat: H265

NormalizeAudio

Even out the audio levels and adjust the baseline gain to a good default value.

Supported values: true, false.

Avoid having uneven audio levels between audio tracks, and also set the baseline gain to medium level of 91 dB.

Set this to false if the audio levels in your source media are already fine-tuned.

No. Defaults to true.

DrmProtection

A DRM protection mode to use.

Supported values: None, Managed, Base64Key, CertificateEncryptedBase64Key, Base64Cpix.

Use it if you need to protect your output against theft and illegal redistribution.

No. Defaults to None.

DrmManaged

Options for DRM Managed Mode when DrmProtection is set to Managed.

Use this to set up DRM Managed Mode for an easy integration with Axinom DRM.

Yes if DrmProtection is set to Managed. Otherwise no and has no effect if set.

ExplicitIV

Gets or sets the optional IV that is to be explicitly associated with content keys. Must be a string of 32 hex digits (128 bits).

FairPlay DRM in which the IV is expected to be transported together with the content key, instead of being extracted from the content. Otherwise, it is not recommended to set this property.

No. If this property is not set, Axinom Encoding automatically generates a random IV for each content key (given that the content key does not have ExplicitIV defined in CPIX).

UseHighestPossibleBitrate

Only produce highest possible bitrate from source video.

Supported values: true, false.

Use this if you only need to produce a single possible highest quality bitrate from your source content.

No. Defaults to false.

Archiving

A desired output archiving mode.

Supported values: None, Tar, SingleTar, FlatTar, SplitTar.

Use this property if you need to archive your output.

No. Defaults to None.

AvoidNegativeVideoTimestamps

Adjusts negative timestamps in the output file to ensure compatibility and synchronization during playback.

Supported values: Auto, MakeZero, MakeNonNegative, Disabled.

For scenarios where container formats don’t support negative timestamps (like MPEG-TS in HLS) or negative timestamps are created during encoding. Use MakeZero to start the first timestamp at zero, MakeNonNegative to ensure all timestamps are positive, Disabled to disable shifting of timestamps or Auto to let encoder decide.

No. Defaults to Auto.

ArchiveOutputName

The name of the archive to create when using the Archiving property.

Use to provide a custom archive name.

No.

ChecksumFileName

Custom checksum file name for archive contents. Use only with the Archiving property.

-

No.

DeleteFilesFromSourceWhenDone

This option allows Encoding to remove source content from the acquisition location, once the processing is completed.

Supported values: true, false.

Use this option in "burn after read" scenarios when source content should only be available once. Keep in mind that acquisition location access credentials should support file deletion.

No. Defaults to false.

ForceAspectRatioToStandard

Historically, Encoding has been accepting and producing videos with only common aspect ratios to reduce the amount of potential problems for our customers. Set this option to false to bypass this and make Encoding accept and produce any aspect ratios.

Supported values: true, false.

Use this option if you want to force the video aspect ratio to be from a list of common aspect ratios, potentially distorting the picture.

No. Defaults to false.

SearchForOptimalNearbyResolutions

If set to true, Encoding will go through all producible video representations and, for each, try to find a nearby resolution which’s width and height are divisible by 16, 8, or 4 (if it is not already divisible by either of these numbers), potentially improving how the output looks by getting a resolution better suited for encoders. The algorithm looks for resolutions with the same aspect ratio that are up to 10% larger and up to 15% smaller than the representation’s initial resolution. If no fitting resolutions are found, the representation’s resolution is left intact, provided that it is at least divisible by 2. If the representation’s resolution is not divisible by 2, the dimensions with the odd lengths are reduced by 1 pixel (e.g. 1921x1081 becomes 1920x1080).

Supported values: true, false.

Use this if you want to potentially improve how the encoding result looks like. The caveat is that the output resolution is up to 10% larger or up to 15% smaller than requested/auto-generated.

No. Defaults to false.

ForcePixelAspectRatioTo1

If set to true, Encoding will set the pixel aspect ratio to 1:1 and recalculate the storage aspect ratio accordingly. The display aspect ratio is kept intact.

Supported values: true, false.

Use this if you want to make the pixels square, for example for compatibility reasons, although generally it should not be necessary as virtually all players should be able to handle non-square pixels.

No. Defaults to false.

BitrateLadder

The bitrate ladder template to use for generating the default video represenations.

Supported values: V2, V1.

This property has no effect if the VideoRepresentations array is set and not empty.

No. Defaults to V2.

VideoRepresentations

Configure the video bitrates, and video dimensions for each bitrate.

Each object consists of three properties: Width for the target width, Height for the target height, and BitrateInKbps for the target bitrate ceiling.

Use this property to define which video bitrates to produce.

It is recommended to only provide either the Width or the Height value, not both. This is to avoid inadvertantly entering an incorrect value and skewing the video aspect ratio. The unprovided value is calculated automatically.

This property has no effect in the packaging-only mode.

No. By default, Encoding tries to produce a list of default bitrates from source video.

AudioRepresentations

Configure the audio bitrate, channel count and codec for each bitrate. Also configure if the representation is always created (although upmixing is never done) or only when the source audio has the matching amount of channels.

Please see more information about audio representations, their properties and notes about upmixing and downmixing the channels.

Defining the audio representations.

No. By default, Encoding tries to produce a list of default bitrates from the source video and audio files.

VideoSyncMethod

These values correspond to the FFmpeg’s "-vsync" parameter arguments: https://www.ffmpeg.org/ffmpeg.html#toc-Advanced-options (Please note that 'drop' is not supported at this time.)

Supported values: Auto, Passthrough, Cfr, Vfr

It’s not recommended to change this, however it’s one option to try if your output video has visual problems such as 'floating' or 'jerkiness' of the image.

No. Defaults to Auto. When using EncodingMode: PerScene it will default to Passthrough

VisibleVideoWatermarks

Configure visible video watermarks.

Each object consists of nine properties: WatermarkFileName for watermark to use from acquisition folder, PositionXPercentage for horizontal positioning, PositionYPercentage for vertical positioning, StartTime for when to show the watermark, EndTime for when the watermark should disappear, FadeInDurationInMs to set how long the logo fades in from start time, FadeOutDurationInMs to set how long the logo fades out before the end time, SizePercentage to set the size of the watermark on the video, OpacityPercentage to set the opacity for the watermark in video. Refer to visible video watermarking for more details.

Use this property to apply visible watermarks on the video output.

No.

Naming

Custom output files naming rules. Refer to custom naming for more details.

Use this property if you want to define custom file names in the output package.

No.

Revision History

The table below lists the document versions and any changes to them.

Version Date Description

1.0

October 20, 2020

Initial version.

1.1

November 25, 2020

ExplicitIV added as a property.

1.2

December 1, 2020

H.265 video codec added as an option for VideoFormat.

2.0

October 6, 2021

Added packaging-only mode.

2.1

June 16, 2022

SearchForOptimalNearbyResolutions and ForcePixelAspectRatioTo1 added as properties.

2.2

January 17, 2023

Sound and NormalizeAudio added as properties.

2.3

January 27, 2023

Added HDR support.

2.4

March 28, 2023

EncodingMode added as a property.

2.5

August 2, 2023

Switched to DRM Managed Mode in the example.

3.0

September 18, 2023

Added audio representations

3.1

September 18, 2023

BitrateLadder added as a property