Dictionary

What Is Dub In A File?

Dub is a flag on one stream inside a media file. It says that the stream is not in the original language of the content, as in a dubbed film.

dub

A dub is a new soundtrack for a film or a recording, often in a different language. In the metadata of a file, Dub is a flag on one stream. The flag says that the stream is not in the original language of the content.

The name comes from ffprobe, the file reader of the FFmpeg project. FFmpeg lists each part of a file as a stream and gives every stream a set of flags, called the disposition.

Dub is one of these flags, next to Hearing Impaired and Attached Pic. The FFmpeg documentation says that the flag can apply to any type of stream, not only to audio.

What the values look like

The -show_streams option of the ffprobe reader prints every flag for every stream. So a file with no dubbed sound also shows Dub. The flag has 2 values in that output:

  • 0: the file does not mark this stream as dubbed
  • 1: the file marks this stream as not in the original language

In plain text output, the line reads DISPOSITION:dub=0 when the flag is off and DISPOSITION:dub=1 when it is on. The short overview that FFmpeg prints for a file adds (dub) to a stream when the flag is on.

A second flag, original, has the opposite meaning, and at most one of the 2 flags should be on. When both show 0, the file does not say whether the stream is in the original language.

Which files carry it

A file does not usually contain a field called Dub. FFmpeg turns the flag on when it reads a marker in the file, and only some file formats have one. 2 examples:

  • MKV: the FlagOriginal element. The value 0 turns Dub on, and the value 1 turns on the original flag. If the element is missing, both flags stay off.
  • MP4: a kind box with the scheme urn:mpeg:dash:role:2011 and the value dub.

Where the value comes from

The value comes from the person or the program that built the file. The flag only repeats what the file states. An MKV file with a dubbed soundtrack and no FlagOriginal element still shows 0.

In FFmpeg, the -disposition option sets flags on a stream, and dub is one of the flag names. In mkvmerge, the --original-flag option sets the original language flag on a track.

Why it matters

One file can hold several audio streams, for example one for each language. The Matroska specification says that a player set to prefer the original language should prefer the track with the Original flag.

In an example in that specification, the 5 English tracks have the Original flag and the 2 Spanish tracks do not. So English is the original language of that content.

The flag does not name a language. The name of the language is in a separate field, Language. Together, the 2 fields tell you that a stream is a translation and which language it uses.

Other meanings of dub

The word dub has other meanings outside file metadata. The word is short for double, and to dub a tape or a disc can mean to copy the recording.

Dub is also a style of popular music based on reggae. A dub version of a song is a remix in this style. It takes out some instrument parts, exaggerates others, and often adds a lot of echo.

The metadata flag records neither of these meanings. The flag does not mark a copy of another stream, and it says nothing about the style of the music.