Track selection and concepts - devrath/MediaAlchemySuite GitHub Wiki
What is track selection ?
- A
mediacontains multiple tracks. Each track is considered asgroup. Thus there are multiple groups. Track selectionis a process of selecting a perticular track or group.- The selection process is determined by
track-selection-parameters.
Visual Representation
Here is a diagram that shows how Media3 organizes this information for a hypothetical video file.
Media File (e.g., "movie.mkv")
β
βββ Tracks Object (The complete manifest of all available tracks)
β
ββββ TrackGroup 1 (Type: VIDEO)
β β Description: Contains different quality levels of the same video stream.
β β
β βββ Track 1.1 (Format: {resolution: 1920x1080, bitrate: 5Mbps, ...})
β βββ Track 1.2 (Format: {resolution: 1280x720, bitrate: 2Mbps, ...})
β
ββββ TrackGroup 2 (Type: AUDIO)
β β Description: Contains all the different audio languages or commentaries.
β β
β βββ Track 2.1 (Format: {language: "en", channels: 6, codec: "AC3", ...})
β βββ Track 2.2 (Format: {language: "es", channels: 2, codec: "AAC", ...})
β
ββββ TrackGroup 3 (Type: TEXT)
β Description: Contains all the available subtitle languages.
β
βββ Track 3.1 (Format: {language: "en", type: "Subtitles", ...})
βββ Track 3.2 (Format: {language: "es", type: "Subtitles", ...})
βββ Track 3.3 (Format: {language: "fr", type: "Subtitles", ...})
- Imagine a modern DVD or Blu-ray disc for a movie. The disc itself is the media file.
- When you put the disc to the player you get a list of menu for playback options.
- The menu on the DVD is organized into sections:
- "Audio Setup": This is a
TrackGroupof type AUDIO.- Here you will have a list
English,FranΓ§ais. - Here you can select one at a time.
- Here you will have a list
- "Subtitles": This is a
TrackGroupof type TEXT.- Here also you will have a list
English,FranΓ§ais. - Here also you can select one at a time.
- Here also you will have a list
- (Implicitly) The Movie Itself: This is a
TrackGroupof type VIDEO.- Here also you will have video resolution of list
1920x1080,1280x720etc - Here also you can select one at a time.
- Here also you will have video resolution of list
- "Audio Setup": This is a
- Now out of all the groupings we can select one of the selection thus 3 selections from 3 groups, Finally the final output.
Tracks Object:---> This is the top-level container that the player gives you.TrackGroup: ----> It's a collection of one or more individual tracks that are of the same kind.All tracks in a group are mutually exclusive. You can't select two tracks from the same group at once (e.g., you can't play 1080p and 720p video simultaneously).TrackObject: ----> This is the most granular level. Each track represents a single, playable stream of data. For VideoResolution, framerate, bitrate. For Audio: The language code("en", "es"). For Text: The language code("fr").