Context Variables

Context variables allow you to access various parameters from media item metadata.

Naming Conventions use context variables to define naming templates for files.

Context variables are categorized as follows:

Source

Context Variable Name

Description Type

{{source}}

For operations at a source level.
For example: {{source.videoTracks[0].frameRate}} will return the frame rate of the first video track from the source file, in string format (numerator / denominator).
Object

Container

Context Variable Name

Description

Type

{{container}}

Information about the media container. Object

{{container.extension}}

The extension of the media container. String

{{container.bitrate}}

The bit rate of the media container, in bits per second.

Number

Video

Context Variable Name

Description

Type

{{videoTrack}}

Information about the video track of the file. Using it in conjunction with additional parameters allows you to get specific information for the video track.

Note: Only one video track is supported.

Object

{{videoTrack.codec}}

The codec of the video file.
For example: prores, jpeg2000, h264 etc.

Note: Only one video track is supported.

String

{{videoTrack.language}}

The primary language of the text elements from the video file, in RFC5646 notation.
For example: en-US,  en-UK, es-ES, etc.

Note: Only one video track is supported.

String

{{videoTrack.colorSpace}}

The color space used to encode the video frames.
For example: rec709, bt709 etc.

Note: Only one video track is supported.

String

{{videoTrack.frameRate}}

The frame rate of the video file, as an object comprised of the frame rate numerator and denominator.

For example: {"numerator":24000,"denominator":1001}

Note: Only one video track is supported.

Object

{{videoTrack.frameRateNominator}}

The numerator of the frame rate.
For example: 24000, 30000, 60000 etc.

Note: Only one video track is supported.

Number

{{videoTrack.frameRateDenominator}}

The denominator of the frame rate.
For example: 1, 1001

Note: Only one video track is supported.

Number

{{videoTrack.frameCount}}

The number of frames of the video track.

Note: Only one video track is supported.

Number

{{videoTrack.frameRateNominator | divided_by: videoTrack.frameRateDenominator | round: 3 | replace: ".", ""}}

The calculated video frame rate, numerator divided by the denominator, then rounded up to 3 decimals.
For example: 23.976, 29.97 etc.

Note: Only one video track is supported.

Number

{{videoTack.width}}

The width of the video frames, in pixels.
For example: 1920, 3840 etc.

Note: Only one video track is supported.

Number

{{videoTrack.height}}

The height of the video frames, in pixels.
For example: 720, 1080 etc.

Note: Only one video track is supported.

Number

{{videoTrack.displayAspectRatio}}

The aspect ratio of the video frames.
For example: 4:3, 16:9 etc.

Note: Only one video track is supported.

String

Audio

Context Variable Name

Description

Type

{{audioTracks}}

An array of objects containing information about the audio tracks from the file.

Array of objects

{{audioTracks[0].language}}

The primary spoken language of the audio track, in RFC5646 notation.
For example: en-US,  en-UK, es-ES, etc.

String

{{audioTracks[0].codec}}

The audio codec used to encode the tracks.
For example: pcm, aac etc.

String

{{audioTracks[0].sampleRate}}

The sample rate of the audio track.
For example: 44000, 48000

Number

{{audioTracks[0].channelLayout}}

The channel layout of the audio track.
For example: mono, 2.0, 5.1 etc

String

{{audioTracks[0].channels}}

The number of channels of the audio track.

Number

Timed Text

Context Variable Name

Description

Type

{{timedTextTracks}}

An array of objects containing information about the timed text tracks from the file.

Array

{{timedTextTracks[0].language}}

The primary language of the timed text track, in RFC5646 notation.
For example: en-US,  en-UK, es-ES, etc.

String

{{timedTextTracks[0].frameRateNominator}}

The numerator of the frame rate to which the track is synchronized.
For example: 24000, 30000, 60000 etc.

Number

{{timedTextTracks[0].frameRateDenominator}}

The denominator of the frame rate to which the track is synchronized.
For example: 1, 1001

Number

Composition Playlist

Context Variable Name

Description

Type

{{cpl}}

An array of objects containing information about the composition playlist from the file.

Object

{{cpl.id}}

The identifier of the composition.
For example: 937ac770-7747-4921-a93e-a64b2d8196a2

String

{{cpl.annotation}}

The annotation of the composition.

String

{{cpl.creator}}

The creator of the composition.

String

{{cpl.contentOriginator}}

The content originator of the composition.

String

{{cpl.contentTitle}}

The content title of the composition.

String

{{cpl.contentKind}}

The content kind of the composition.

String

{{cpl.issuer}}

The issuer of the composition.

String

{{cpl.compositionTimecode}}

The timecode of the composition, comprised of the Drop Frame, Rate, and Start Address fields.

String

{{cpl.contentVersions}}

An object containing pairs of ID, Label Text, and language for each version.

Object

{{cpl.extension}}

The extension properties of the composition, comprised of the ApplicationIdentification, MaxCCL, and MaxFALL properties.

String

Others

Context Variable Name

Description

Type

{{asset.name}}

The name of the asset to which the generated file is associated.

String

{{metadataSets['name'].abbrevTitle}}

The name metadata set from the asset to which the generated file is associated.

String

{{extraHeadFrames}}

The total number of frames in the video head.

Number

{{extraTailFrames}}

The total number of frames in the video tail.

Number

See Also