-
Notifications
You must be signed in to change notification settings - Fork 575
Closed
Labels
Description
Use case description
We have a single mp4 containing groups of audio tracks. One group represents voice in different languages and the other group represents background audio in stereo or multi channel format. Each group has a corresponding alternate_group
in the track header atom.
# Movie Info - 4 tracks - TimeScale 1000
Duration 00:04:55.680
Fragmented: no
Major Brand isom - version 512 - compatible brands: isom dby1 iso2 mp41
Created: UNKNOWN DATE
Meta-Data Tags:
...
# Track 1 Info - ID 1 - TimeScale 44100
Media Duration 00:03:35.813
Media Language: English (eng)
<b>Alternate Group ID 1
...
# Track 2 Info - ID 2 - TimeScale 44100
Media Duration 00:03:28.013
Media Language: Spanish; Castilian (spa)
Alternate Group ID 1
...
# Track 3 Info - ID 3 - TimeScale 48000
Media Duration 00:04:55.680
Alternate Group ID 2
Media Type: soun:ec-3
EC-3 stream - Sample Rate 48000 - 5.1 channel(s) - bitrate 768000
...
# Track 4 Info - ID 4 - TimeScale 44100
Media Duration 00:04:12.368
Alternate Group ID 2
Media Type: soun:mp4a
MPEG-1 Audio - 2 Channel(s) - SampleRate 44100 - Layer 3
...
Proposed solution
Request is for BoxParser.parseTkhd
to extract alternate_group
and save it in TkhdData
. This can eventually be used by ProgressiveMediaPeriod
to create TrackGroup
corresponding to each logical group. Considering Mp4 parsing and usage of track group as an existing functionality, new request could be made as an opt-in.
private static final class TkhdData {
private final int id;
private final long duration;
private final int rotationDegrees;
private final int alternateGroup;
}
Alternatives considered
N/A