Skip to content

Metadata Reference

simonefil edited this page Jul 30, 2026 · 1 revision

Metadata Reference

Lookup tables for Metadata Presets: every field and token, every operator, every function, the managed tag list, the expression syntax and the preset JSON schema.

This page lists values. For the rule model itself, start with Metadata Presets and return here for the catalogue.

How to read the field tables

Every field has a token, the name you use in expressions, in square brackets, and belongs to a sector that determines which rule scopes can see it.

Column Meaning
Token write it as [token] in a value; use it by name when choosing a condition or operation field
Type value type, which drives the input control and the available operators
Editable yes = usable in Set/Clear operations · read-only = conditions and expressions only · blocked = never editable, even though it is readable
Clearable whether Clear field works on it
Level Normal = always visible · Advanced = needs the Advanced fields toggle · Dangerous = permanently excluded from editing

Blocked and dangerous fields are things like segment UIDs, where a plausible-looking edit would break file linking or corrupt the container. They stay visible so you can read them in conditions.

Field sectors map onto rule scopes like this:

Rule scope (Apply to) Sees fields from
Container File, Container
Video File, Container, Video
Audio File, Container, Audio
Subtitles File, Container, Subtitle

File and container fields are readable from every scope, which is what makes Set audio_title = [file_stem] work.

Value types

Type Notes
String free text
Integer / Decimal numeric comparisons available
Boolean 1 / 0, shown as True / False
Bytes size; the Unit field accepts KB, MB, GB, KiB, MiB, GiB
Duration the Unit field accepts ms, s, min, h
Date date input
Language ISO 639-2 code, picked from a list
LanguageIetf BCP 47 tag, it, it-IT, en-US, ja, pt-BR

Field catalogue

File

Token Description Type Editable Clearable Level
[file_name] File name String read-only - -
[file_stem] File name without extension String read-only - -
[file_extension] File extension String read-only - -
[file_path] File path String read-only - -
[file_folder] File folder String read-only - -
[file_relative_folder] Relative folder String read-only - -
[file_size] File size Bytes read-only - -

Container

Token Description Type Editable Clearable Level
[general_format] Container format String read-only - -
[general_format_version] Container format version String read-only - -
[general_duration] Container duration Duration read-only - -
[general_overall_bitrate] Overall bitrate Integer read-only - -
[general_frame_rate] Container frame rate Decimal read-only - -
[general_frame_count] Container frame count Integer read-only - -
[container_movie] Container movie String read-only - -
[container_collection] Container collection String read-only - -
[container_season] Container season String read-only - -
[container_part] Container part String read-only - -
[tagged_application] Tagged application String read-only - -
[encoded_date] Encoded date Date read-only - -
[tagged_date] Tagged date Date read-only - -
[container_title] Container title String yes yes Normal
[container_date] Container date Date yes yes Normal
[segment_filename] Segment filename String yes yes Advanced
[prev_filename] Previous segment filename String yes yes Advanced
[next_filename] Next segment filename String yes yes Advanced
[muxing_application] Muxing application String yes yes Advanced
[writing_application] Writing application String yes yes Advanced
[segment_uid] Segment UID String blocked no Dangerous
[prev_uid] Previous segment UID String blocked no Dangerous
[next_uid] Next segment UID String blocked no Dangerous

Video

Token Description Type Editable Clearable Level
[video_title] Video title String yes yes Normal
[video_language] Video language Language yes no Normal
[video_language_ietf] Video IETF language LanguageIetf yes no Normal
[video_default] Video default flag Boolean yes no Normal
[video_forced] Video forced flag Boolean yes no Normal
[video_enabled] Video enabled flag Boolean yes no Normal
[video_original] Video original flag Boolean yes no Normal
[video_codec_name] Video codec name String yes yes Advanced
[video_alpha_mode] Video alpha mode Boolean yes no Advanced
[video_pixel_width] Pixel width Integer yes no Advanced
[video_pixel_height] Pixel height Integer yes no Advanced
[video_display_width] Display width Integer yes no Advanced
[video_display_height] Display height Integer yes no Advanced
[video_display_unit] Display unit Integer yes no Advanced
[video_crop_left] Left crop Integer yes no Advanced
[video_crop_top] Top crop Integer yes no Advanced
[video_crop_right] Right crop Integer yes no Advanced
[video_crop_bottom] Bottom crop Integer yes no Advanced
[video_interlaced] Interlaced Integer yes no Advanced
[video_aspect_ratio_type] Aspect ratio type Integer yes no Advanced
[video_field_order] Field order Integer yes no Advanced
[video_stereo_mode] Stereo mode Integer yes no Advanced
[video_matrix_coefficients] Matrix coefficients Integer yes no Advanced
[video_color_bits_per_channel] Color bits per channel Integer yes no Advanced
[video_chroma_subsample_horizontal] Chroma horizontal subsample Integer yes no Advanced
[video_chroma_subsample_vertical] Chroma vertical subsample Integer yes no Advanced
[video_cb_subsample_horizontal] Cb horizontal subsample Integer yes no Advanced
[video_cb_subsample_vertical] Cb vertical subsample Integer yes no Advanced
[video_chroma_siting_horizontal] Chroma horizontal siting Integer yes no Advanced
[video_chroma_siting_vertical] Chroma vertical siting Integer yes no Advanced
[video_color_range] Color range Integer yes no Advanced
[video_transfer_characteristics] Transfer characteristics Integer yes no Advanced
[video_color_primaries] Color primaries Integer yes no Advanced
[video_max_content_light] Max content light Integer yes no Advanced
[video_max_frame_light] Max frame light Integer yes no Advanced
[video_chromaticity_red_x] Red chromaticity X Decimal yes no Advanced
[video_chromaticity_red_y] Red chromaticity Y Decimal yes no Advanced
[video_chromaticity_green_x] Green chromaticity X Decimal yes no Advanced
[video_chromaticity_green_y] Green chromaticity Y Decimal yes no Advanced
[video_chromaticity_blue_x] Blue chromaticity X Decimal yes no Advanced
[video_chromaticity_blue_y] Blue chromaticity Y Decimal yes no Advanced
[video_white_point_x] White point X Decimal yes no Advanced
[video_white_point_y] White point Y Decimal yes no Advanced
[video_max_luminance] Max luminance Decimal yes no Advanced
[video_min_luminance] Min luminance Decimal yes no Advanced
[video_projection_type] Projection type Integer yes no Advanced
[video_projection_pose_yaw] Projection yaw Decimal yes no Advanced
[video_projection_pose_pitch] Projection pitch Decimal yes no Advanced
[video_projection_pose_roll] Projection roll Decimal yes no Advanced
[video_projection_private] Projection private String blocked no Dangerous
[video_number] Video track number Integer blocked no Dangerous
[video_uid] Video track UID String blocked no Dangerous
[video_codec_id] Video codec ID String blocked no Dangerous
[video_type] Video type String read-only - -
[video_stream_order] Video stream order Integer read-only - -
[video_index] Video index Integer read-only - -
[video_selector] Video selector String read-only - -
[video_id] Video ID Integer read-only - -
[video_unique_id] Read video UID String read-only - -
[video_format] Video format String read-only - -
[video_profile] Video profile String read-only - -
[video_level] Video level String read-only - -
[video_tier] Video tier String read-only - -
[video_hdr_format] HDR format String read-only - -
[video_hdr_profile] HDR profile String read-only - -
[video_hdr_level] HDR level String read-only - -
[video_hdr_settings] HDR settings String read-only - -
[video_hdr_compatibility] HDR compatibility String read-only - -
[video_width] Video width Integer read-only - -
[video_height] Video height Integer read-only - -
[video_stored_width] Stored width Integer read-only - -
[video_stored_height] Stored height Integer read-only - -
[video_sampled_width] Sampled width Integer read-only - -
[video_sampled_height] Sampled height Integer read-only - -
[video_dar] Display aspect ratio String read-only - -
[video_par] Pixel aspect ratio String read-only - -
[video_active_width] Active width Integer read-only - -
[video_active_height] Active height Integer read-only - -
[video_active_dar] Active DAR String read-only - -
[video_rotation] Video rotation Decimal read-only - -
[video_frame_rate_mode] Video frame rate mode String read-only - -
[video_fps] Frame rate Decimal read-only - -
[video_fps_min] Minimum frame rate Decimal read-only - -
[video_fps_nominal] Nominal frame rate Decimal read-only - -
[video_fps_max] Maximum frame rate Decimal read-only - -
[video_fps_original] Original frame rate Decimal read-only - -
[video_color_space] Color space String read-only - -
[video_bitdepth] Video bit depth Integer read-only - -
[video_duration] Video duration Duration read-only - -
[video_bitrate] Video bitrate Integer read-only - -
[video_bitrate_mode] Video bitrate mode String read-only - -
[video_stream_size] Video size Bytes read-only - -
[video_frame_count] Video frames Integer read-only - -
[video_chroma_subsampling] Chroma subsampling String read-only - -
[video_chroma_position] Chroma position String read-only - -
[video_scan_type] Scan type String read-only - -
[video_scan_order] Scan order String read-only - -
[video_compression_mode] Video compression String read-only - -
[video_bits_per_pixel_frame] Bits per pixel/frame Decimal read-only - -
[video_mastering_display_primaries] Mastering display primaries String read-only - -
[video_mastering_display_luminance] Mastering display luminance String read-only - -
[key] key valueType yes no Advanced

Audio

Token Description Type Editable Clearable Level
[audio_title] Audio title String yes yes Normal
[audio_language] Audio language Language yes no Normal
[audio_language_ietf] Audio IETF language LanguageIetf yes no Normal
[audio_default] Audio default flag Boolean yes no Normal
[audio_forced] Audio forced flag Boolean yes no Normal
[audio_enabled] Audio enabled flag Boolean yes no Normal
[audio_commentary] Audio commentary flag Boolean yes no Normal
[audio_hearing_impaired] Audio hearing impaired flag Boolean yes no Normal
[audio_visual_impaired] Audio visual impaired flag Boolean yes no Normal
[audio_original] Audio original flag Boolean yes no Normal
[audio_codec_name] Audio codec name String yes yes Advanced
[audio_sampling_rate] Audio sample rate Decimal yes no Advanced
[audio_output_sampling_rate] Audio output sample rate Decimal yes no Advanced
[audio_channels] Audio channels Integer yes no Advanced
[audio_bitdepth] Read bit depth Integer yes no Advanced
[audio_emphasis] Audio emphasis Integer yes no Advanced
[audio_number] Audio track number Integer blocked no Dangerous
[audio_uid] Audio track UID String blocked no Dangerous
[audio_codec_id] Audio codec ID String blocked no Dangerous
[audio_type] Audio type String read-only - -
[audio_stream_order] Audio stream order Integer read-only - -
[audio_index] Audio index Integer read-only - -
[audio_selector] Audio selector String read-only - -
[audio_id] Audio ID Integer read-only - -
[audio_unique_id] Read audio UID String read-only - -
[audio_format] Audio format String read-only - -
[audio_format_commercial] Commercial audio format String read-only - -
[audio_profile] Audio profile String read-only - -
[audio_codec_description] Audio codec description String read-only - -
[audio_format_settings] Audio format settings String read-only - -
[audio_channels_label] Audio channels label String read-only - -
[audio_channel_positions] Audio channel positions String read-only - -
[audio_sampling_rate_khz] Sample rate kHz Decimal read-only - -
[audio_sampling_count] Audio sample count Integer read-only - -
[audio_bitdepth_detected] Detected bit depth Integer read-only - -
[audio_bitdepth_stored] Stored bit depth Integer read-only - -
[audio_bitrate] Audio bitrate Integer read-only - -
[audio_bitrate_mode] Audio bitrate mode String read-only - -
[audio_compression_mode] Audio compression String read-only - -
[audio_duration] Audio duration Duration read-only - -
[audio_stream_size] Audio size Bytes read-only - -
[audio_frame_count] Audio frames Integer read-only - -
[audio_channel_layout] Audio channel layout String read-only - -
[audio_delay] Audio delay Duration read-only - -
[audio_video_delay] Audio/video delay Duration read-only - -
[audio_replaygain_gain] ReplayGain gain Decimal read-only - -
[audio_replaygain_peak] ReplayGain peak Decimal read-only - -
[audio_service_kind] Audio service kind String read-only - -
[audio_quality] Audio quality String read-only - -
[key] key valueType yes no Advanced

Subtitle

Token Description Type Editable Clearable Level
[subtitle_title] Subtitle title String yes yes Normal
[subtitle_language] Subtitle language Language yes no Normal
[subtitle_language_ietf] Subtitle IETF language LanguageIetf yes no Normal
[subtitle_default] Subtitle default flag Boolean yes no Normal
[subtitle_forced] Subtitle forced flag Boolean yes no Normal
[subtitle_enabled] Subtitle enabled flag Boolean yes no Normal
[subtitle_hearing_impaired] Subtitle hearing impaired flag Boolean yes no Normal
[subtitle_text_descriptions] Subtitle text descriptions flag Boolean yes no Normal
[subtitle_original] Subtitle original flag Boolean yes no Normal
[subtitle_codec_name] Subtitle codec name String yes yes Advanced
[subtitle_number] Subtitle track number Integer blocked no Dangerous
[subtitle_uid] Subtitle track UID String blocked no Dangerous
[subtitle_codec_id] Subtitle codec ID String blocked no Dangerous
[subtitle_type] Subtitle type String read-only - -
[subtitle_stream_order] Subtitle stream order Integer read-only - -
[subtitle_index] Subtitle index Integer read-only - -
[subtitle_selector] Subtitle selector String read-only - -
[subtitle_id] Subtitle ID Integer read-only - -
[subtitle_unique_id] Read subtitle UID String read-only - -
[subtitle_format] Subtitle format String read-only - -
[subtitle_format_commercial] Commercial subtitle format String read-only - -
[subtitle_codec_description] Subtitle codec description String read-only - -
[subtitle_muxing_mode] Subtitle muxing mode String read-only - -
[subtitle_stream_size] Subtitle size Bytes read-only - -
[subtitle_element_count] Subtitle elements Integer read-only - -
[subtitle_duration] Subtitle duration Duration read-only - -
[subtitle_duration_start] Subtitle duration start Duration read-only - -
[subtitle_duration_end] Subtitle duration end Duration read-only - -
[subtitle_bitrate] Subtitle bitrate Integer read-only - -
[subtitle_width] Subtitle width Integer read-only - -
[subtitle_height] Subtitle height Integer read-only - -
[subtitle_dar] Subtitle DAR String read-only - -
[subtitle_frame_rate_mode] Subtitle frame rate mode String read-only - -
[subtitle_fps] Subtitle frame rate Decimal read-only - -
[subtitle_frame_count] Subtitle frames Integer read-only - -
[subtitle_format_profile] Subtitle profile String read-only - -
[subtitle_compression_mode] Subtitle compression String read-only - -
[subtitle_events_total] Subtitle events Integer read-only - -
[subtitle_events_min_duration] Subtitle minimum event duration Duration read-only - -
[subtitle_lines_count] Subtitle lines Integer read-only - -

Condition operators

Operator Applies to Notes
Equals / Not equals any exact comparison
Contains / Does not contain text substring
Starts with / Ends with text
Regex / Not regex text .NET regex; invalid patterns are rejected at save time
Empty / Not empty any presence check
In list / Not in list any requires at least one value
Greater than / Greater or equal numeric, bytes, duration honours the Unit field
Less than / Less or equal numeric, bytes, duration honours the Unit field
Between / Not between numeric, bytes, duration requires both bounds
True / False boolean

Track comparison and grouping

Available in track scopes only, never in Container.

Comparison True when the current track's value is
Equals at least one equal to at least one other track's
Different from all different from every other track's
Greater than all greater than every other track's
Greater or equal to all ≥ every other track's
Less than all less than every other track's
Less or equal to all ≤ every other track's
Largest in group the maximum in the group
Smallest in group the minimum in the group
Rank at position N in the ordered group (N > 0)
Track group Members
Same language tracks in scope sharing the current track's language
Same format tracks in scope sharing the current track's format
Same language and format both
All in scope every track of this type in the file

The same four groups are used by Track count conditions and by the Set exclusive flag operation.

Operations

Operation Scope Notes
Set field any field must be editable and valid for the scope
Clear field any field must be clearable
Set exclusive flag track boolean fields only; clears the flag on the rest of the group
Remove track track only requires a remux: execution becomes MkvMerge
Add/update statistics track recalculates track statistics tags
Delete statistics track removes track statistics tags
Set tag any managed tags only
Clear tag any one managed tag
Clear managed tags any requires the explicit confirmation toggle

Managed tags

Only these keys can be written. Free-form tag XML is not available.

Tag Type Level Container Video Audio Subtitle
TITLE String Normal
SUBTITLE String Normal
DESCRIPTION String Normal
COMMENT String Normal
LANGUAGE Language Advanced
SUMMARY String Normal
SYNOPSIS String Normal
DATE_RELEASED Date Normal
GENRE String Normal
PART_NUMBER Integer Advanced
PART_TOTAL Integer Advanced
DIRECTOR String Advanced
PRODUCER String Advanced
WRITTEN_BY String Advanced
COMPOSER String Advanced
ENCODER String Advanced
SOURCE String Advanced
ORIGINAL_MEDIA_TYPE String Advanced

Every managed tag is clearable. Tags marked Advanced need the Advanced fields toggle in the rule.

Tag targets decide where a tag is written: File (the container), Current track, or All tracks.

LANGUAGE values must be ISO 639-2: eng, ita, jpn, und. MediaInfo frequently reports track languages as two-letter codes, so convert explicitly:

{[audio_language]:ToLower():Replace("en","eng"):Replace("it","ita"):Replace("ja","jpn")}

Expression syntax

Tokens

[audio_language] - [audio_format] [audio_channels_label]
Prefix Reads
(none) the current pipeline value, as modified by earlier rules
current. the same, written explicitly
original. the value before any rule ran
[audio_title]            → current value
[current.audio_title]    → same thing
[original.audio_title]   → value before the preset ran

Raw MediaInfo access

For fields the catalogue does not model, five prefixes read MediaInfo's raw field names directly:

Prefix Reads from
mi.current.* the current track's raw fields
mi.video.* the current track, only if it is video
mi.audio.* the current track, only if it is audio
mi.text.* the current track, only if it is a subtitle track
mi.general.* the file's general section

These bypass the type normalisation catalogued fields receive, so values arrive exactly as MediaInfo emits them. Use them only when nothing in the catalogue covers what you need.

Functions

Wrap a value in braces; chain with : or with dots.

{[file_name]:TrimEnd(4)}
{[audio_title].Trim().NormalizeSpaces()}
{[audio_sampling_rate]:Div(1000):Format(0.#)} kHz
Function Arguments Input → Output
Trim() none ITA Full ITA Full
TrimEnd(n) trailing chars to drop Bleach - 001.mkvBleach - 001
ToUpper() none itaITA
ToLower() none ITAita
Replace(old,new) literal FLAC 2.0LPCM 2.0
RegexReplace(pattern,replacement) regex Audio 01Audio 02
Substring(start,length) 0-based ItalianoIta
Left(n) count ItalianoIta
Right(n) count Italianoano
NormalizeSpaces() none ITA FullITA Full
Add(n) number 2400025000
Sub(n) number 2500024000
Mul(n) number 2448
Div(n) number 15360001536
Round(decimals) count 23.97624
Floor() none 23.97623
Ceil() none 23.00124
Format(pattern) invariant numeric pattern 4800048 with Div(1000):Format(0.#)

Rules:

  • A function must operate on something. Put a token or literal in the field first, then apply the function.
  • Chaining is left to right: Div(1000) then Format(0.#).
  • Quote arguments containing commas or brackets: Replace("a,b","c").
  • Division by zero is caught at validation time.
  • Unknown tokens and unknown functions are reported with their position in the expression.

The function browser's Ex. button opens a worked example for each function, including its argument order.

Validation messages

Message Cause
Duplicate Description: X two rules share a description
Metadata rule without Description at index N Description is required
Metadata rule without operations at index N a rule needs at least one THEN operation
field is not compatible with scope X field does not belong to the rule's Apply to
SetExclusiveFlag requires a boolean field exclusive flag on a non-boolean field
field is not clearable Clear field on a non-clearable field
metadata is not managed by the UI: X tag key unavailable for that target
RemoveTrack requires a track scope Remove track in Container scope
ClearTags requires explicit confirmation the confirmation toggle is not ticked
unknown condition field X typo, or a field from another scope
condition field X is not compatible with Apply to Y wrong scope
comparison with other tracks is not valid for Container track comparison in Container scope
track count is not valid for Container track count in Container scope
rank must be greater than zero Rank with a non-positive value
list requires at least one value empty In list
range requires both minimum and maximum values Between with one bound
invalid regex: X pattern does not compile
Unsupported metadata preset schema version: X JSON written by a newer version
Unknown metadata token: X token does not exist
Unknown metadata function: X function does not exist
Division by zero in metadata expression Div(0)

Execution modes

Decided per file after analysis, and shown in the Execution column.

Mode Tool Triggered by
NoOp - no changes for this file
PropEdit mkvpropedit header-only changes, overwriting in place
CopyPropEdit copy + mkvpropedit header-only changes, writing to an output folder
MkvMerge mkvmerge any change requiring a remux. Track removal, or a field that cannot be expressed as a header edit

PropEdit is seconds per file regardless of size. MkvMerge rewrites the whole file.

Preset JSON schema

The editor writes these files; you rarely need to. They are readable and diffable, which makes them worth version-controlling.

{
  "SchemaVersion": 1,
  "Name": "audio-titles",
  "Rules": [
    {
      "Description": "Normalize Italian audio titles",   // required, unique
      "Enabled": true,
      "Scope": "Audio",                                  // Container|Video|Audio|Subtitle
      "When": {
        "Conditions": [
          {
            "Field": "audio_language",
            "Operator": "Equals",
            "Value": "ita"
          },
          {
            "Field": "audio_stream_size",
            "Operator": "GreaterThan",
            "Value": "200",
            "Unit": "MB"
          },
          {
            "Alternatives": [                            // OR group
              { "Field": "audio_title", "Operator": "Contains", "Value": "Full" },
              { "Field": "audio_title", "Operator": "IsEmpty" }
            ]
          },
          {
            "TrackComparison": "Largest",                // track comparison
            "Field": "audio_stream_size",
            "TrackGroup": "SameLanguage"
          }
        ]
      },
      "Operations": [
        {
          "Type": "SetField",
          "Field": "audio_title",
          "Value": "ITA - [audio_format] [audio_channels_label]"
        },
        {
          "Type": "SetExclusiveFlag",
          "Field": "audio_default",
          "Value": "1",
          "ExclusiveGroup": "SameLanguage"
        },
        {
          "Type": "SetTagField",
          "TagTarget": "CurrentTrack",
          "TagKey": "LANGUAGE",
          "Value": "ita"
        }
      ]
    }
  ]
}

The real files contain no comments. Presets are portable. Drop the JSON into another installation's presets/metadata/ folder and it appears in the dropdown.

Next

Clone this wiki locally