Skip to main content

Set Track Flags

FFmpeg Builder: Set Track Flags

Sets or clears the Default, Forced and Hearing Impaired flags on audio or subtitle tracks in the FFmpeg Builder.

These flags are stored in the file as the track's disposition. Media servers such as Jellyfin and Plex use them to name and pick tracks, so the same type of track can show up with a different name in each file, depending on how it was flagged. This flow element lets you make those flags consistent across your library.

info

This flow element replaces Subtitle Clear Default, which is now obsolete.


Type​

The type of tracks to update.

TypeFlags available
AudioDefault
SubtitleDefault, Forced, Hearing Impaired

Tracks​

Which tracks should be updated.

  • All: every track of the selected type is updated.
  • Matching: only tracks that match all of the defined properties are updated. You can use the same property more than once, and every condition must be true for a track to be updated.
PropertyDescription
BitrateAudio only. Can use Math Operations or the exact bitrate in bits per second.
ChannelsAudio only. Can use Math Operations or the exact number of channels.
CodecCan use String Operations.
LanguageCompares using the Language Helper, which compares languages by their names and ISO codes, so en matches English and eng.
TitleCan use String Operations.
IndexCan use Math Operations. Index 0 is the first non-deleted track of the selected type, index 1 is the next, and so on.

Flags​

Each flag has the same three options:

OptionDescription
LeaveThe flag is not changed.
ClearThe flag is removed from the selected tracks.
SetThe flag is added to the selected tracks.

Default​

The track that players select automatically.

note

Only one track can be the default, so Set works differently for this flag.
The first matching track is set as the default, and the Default flag is cleared from all other tracks of the selected type, including tracks that did not match.
If no tracks match, the Default flag is not changed on any track.

Forced​

Subtitle only. Forced subtitles are normally shown even when subtitles are turned off, for example for foreign language dialogue.

Hearing Impaired​

Subtitle only. Marks the subtitle as being for the deaf and hard of hearing (SDH).


Examples​

Remove the Hearing Impaired flag from all subtitles​

Use this so that Jellyfin or Plex name your SDH subtitles the same way regardless of how they were originally flagged.

  • Type: Subtitle
  • Tracks: All
  • Default: Leave
  • Forced: Leave
  • Hearing Impaired: Clear

Mark subtitles with "SDH" in the title as Hearing Impaired​

  • Type: Subtitle
  • Tracks: Matching
    • Title: *SDH*
  • Hearing Impaired: Set

Make the first English subtitle the default​

  • Type: Subtitle
  • Tracks: Matching
    • Language: eng
  • Default: Set

The first English subtitle becomes the default, and every other subtitle has its Default flag cleared.

Clear the Default flag from all subtitles​

  • Type: Subtitle
  • Tracks: All
  • Default: Clear

Outputs​

  1. Track flags updated: At least one flag was changed on at least one track.
  2. No track flags were changed: No flag was changed on any track, either because no tracks matched or because every track already had the requested flags.