Skip to content

Commit

Permalink
Adjust definition of "forced" and "default" flags to better reflect u…
Browse files Browse the repository at this point in the history
…sage

This avoids implying user-hostile behavior that doesn't match actual
implementations (that I'm aware of), and is more in-line with the common
usage of "forced" subtitles for translations of parts of an audio or video
track that are in different languages than their primary language tag.

It also avoids requiring an overlay of multiple subtitle tracks. While this
was a good idea in theory (to avoid duplication of events between a "forced"
track and a normal one), it doesn't seem to have been implemented in players
or authoring software.
  • Loading branch information
rcombs authored and robUx4 committed Jan 26, 2021
1 parent 7d7a1ad commit 38540e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions ebml_matroska.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ This **SHOULD** be kept the same when making a direct stream copy of the Track t
<extension cppname="TrackFlagEnabled"/>
</element>
<element name="FlagDefault" path="\Segment\Tracks\TrackEntry\FlagDefault" id="0x88" type="uinteger" range="0-1" default="1" minOccurs="1" maxOccurs="1">
<documentation lang="en" purpose="definition">Set if that track (audio, video or subs) **SHOULD** be active if no language found matches the user preference. (1 bit)</documentation>
<documentation lang="en" purpose="definition">Set if that track (audio, video or subs) **SHOULD** be eligible for automatic selection by the player. (1 bit)</documentation>
<extension cppname="TrackFlagDefault"/>
</element>
<element name="FlagForced" path="\Segment\Tracks\TrackEntry\FlagForced" id="0x55AA" type="uinteger" range="0-1" default="0" minOccurs="1" maxOccurs="1">
<documentation lang="en" purpose="definition">Set if that track **MUST** be active during playback. There can be many forced track for a kind (audio, video or subs),
the player **SHOULD** select the one which language matches the user preference or the default + forced track.
Overlay **MAY** happen between a forced and non-forced track of the same kind. (1 bit)</documentation>
<documentation lang="en" purpose="definition">Applies only to subtitles. Set if that track **SHOULD** be eligible for automatic selection by the player if it matches the user's language preference,
even if the user's preferences would normally not enable subtitles with the selected audio track;
this can be used for tracks containing only translations of foreign-language audio or onscreen text. (1 bit)</documentation>
<extension cppname="TrackFlagForced"/>
</element>
<element name="FlagLacing" path="\Segment\Tracks\TrackEntry\FlagLacing" id="0x9C" type="uinteger" range="0-1" default="1" minOccurs="1" maxOccurs="1">
Expand Down
26 changes: 12 additions & 14 deletions notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,24 +257,22 @@ so that the `Matroska Player` can quickly switch from one to the other.

## Default flag

The "default track" flag is a hint for a `Matroska Player` and **SHOULD** always be changeable
by the user. If the user wants to see or hear a track of a certain kind (audio, video, subtitles)
and hasn't chosen a specific track, the `Matroska Player` **SHOULD** use the first track
of that kind whose "default track" flag is set to "1". If no such track is found,
then the first track of this kind **SHOULD** be chosen.
The "default track" flag is a hint for a `Matroska Player` indicating that a given track
**SHOULD** be eligible to be automatically selected as the default track for a given
language. If no tracks in a given language have the default track flag set, then all tracks
in that language are eligible for automatic selection. This can be used to indicate that
a track provides "regular service" suitable for users with default settings, as opposed to
specialized services, such as commentary, hearing-impaired captions, or descriptive audio.

Only one track of a kind **MAY** have its "default track" flag set in a segment.
If a track entry does not contain the "default track" flag element, then its
default value "1" is to be used.
The `Matroska Player` **MAY** override the "default track" flag for any reason, including
user preferences to prefer tracks providing accessibility services.

## Forced flag

The "forced" flag tells the `Matroska Player` that it **MUST** display/play this track
or another track of the same kind that also has its "forced" flag set. When there are multiple
"forced" tracks, the `Matroska Player` **SHOULD** determine the track based upon the language
of the forced flag or use the default flag if no track matches the use languages.
Another track of the same kind without the "forced" flag may be use simultaneously
with the "forced" track, like DVD subtitles.
The "forced" flag tells the `Matroska Player` that it **SHOULD** display this subtitle track,
even if user preferences usually would not call for any subtitles to be displayed alongside
the current selected audio track. This can be used to indicate that a track contains translations
of onscreen text, or of dialogue spoken in a different language than the track's primary one.

## Track Operation

Expand Down

0 comments on commit 38540e0

Please sign in to comment.