• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

Question Order of Audio Streams

omoses66

New Member
Thread Starter
Joined
Apr 29, 2024
Messages
1
Likes
0
Hi, is there any chance that the Audio streams (expecially when downloading multiple streams) are in a specified order?
It is very annyoing, that some of my files have english as the first language, others have german...
For subtitles this is no problem, I never had any file where the order is wrong / out of order.
 
Frequently asked and non-answered question. But I am on my phone now, don't want to search for the threads.
But it has been noticed at the beginning of the multi-audio feature.
 
While you wait for a fix, if you don't mind fixing your files manually, here's what you can do:

Get MP4Box by downloading and installing the latest stable release of GPAC. Nightly builds and Stable versions are available on gpac.io

As a test, i downloaded The Beekeeper with French and English Audio and English Subtitles embedded.

I then ran mp4box -info "The Beekeeper (2024) - WEB-DL.mp4" and the output gives me:

Code:
# Movie Info - 4 tracks - TimeScale 24000
Duration 01:45:14.141 (recomputed 01:45:14.144)
Fragmented: no
Progressive (moov before mdat)
Major Brand mp42 - version 512 - compatible brands: mp42 iso6
Created: GMT Mon Apr 29 17:51:13 2024


Meta-Data Tags:
        title: The Beekeeper
        comment: In The Beekeeper, one manΓÇÖs brutal campaign for vengeance takes on national stakes after he is revealed to be a former operative of a powerful and clandestine organization known as ΓÇ£Beekeepers.ΓÇ¥

# Track 1 Info - ID 1 - TimeScale 24000
Media Duration 01:45:14.141
Track flags: Enabled In Movie In Preview
Media Samples: 151388 - CFR 23.976025/sec
Visual Track layout: x=0 y=0 width=1920 height=800
Media Type: vide:hev1
        Visual Sample Entry Info: width=1920 height=800 (depth=24 bits)
        HEVC Video - Visual Size 1920 x 800
        HEVC Info: Profile Main @ Level 4 - Chroma Format YUV 4:2:0

        NAL Unit length bits: 32 - general profile compatibility 0x60000000

        Parameter Sets: 1 VPS 1 SPS 1 PPS
        SPS resolution 1920x800 - Pixel Aspect Ratio 1:1 - Indicated track size 1920 x 800
        Bit Depth luma 8 - Chroma 8 - 1 temporal layers
        VPS#1 hash: 539016635BF18F22D4643B39EB2CD0CF07387FEE
        SPS#1 hash: 5859387C61B73C59A8A2C102556584AF2074E28B
        PPS#1 hash: 476CC254A14C7C38F1EC443B8C1E3E48B9736FDF

        RFC6381 Codec Parameters: hev1.1.6.L120.90
        Average GOP length: 88 samples
        Max sample duration: 1001 / 24000

# Track 2 Info - ID 2 - TimeScale 48000
Media Duration 01:45:14.144
Track flags: Enabled In Movie In Preview
Media Language: English (eng)
Media Samples: 197317 - CFR 31.250000/sec
Alternate Group ID 1
Media Type: soun:ec-3
        EC-3 stream - Sample Rate 48000 - 5.1 channel(s) - bitrate 640000
        RFC6381 Codec Parameters: ec-3
        All samples are sync
        Max sample duration: 1536 / 48000

# Track 3 Info - ID 3 - TimeScale 48000
Media Duration 01:45:14.144
Track flags: Enabled In Movie In Preview
Media Language: French (fra)
Media Samples: 197317 - CFR 31.250000/sec
Alternate Group ID 1
Media Type: soun:ec-3
        EC-3 stream - Sample Rate 48000 - 5.1 channel(s) - bitrate 640000
        RFC6381 Codec Parameters: ec-3
        All samples are sync
        Max sample duration: 1536 / 48000

# Track 4 Info - ID 4 - TimeScale 1000
Media Duration 01:40:19.273
Track flags: Enabled In Movie
Media Language: English (eng)
Media Samples: 2749
1 UDTA types:
        name: English [CC]
Alternate Group ID 2
Media Type: sbtl:tx3g
        QT/3GPP subtitle
        Size 0 x 0 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: tx3g
        All samples are sync
        Max sample duration: 92614 / 1000

So i can see i want to change the order of the audio tracks so the French would be the 1st audio and English the 2nd. The command for this would be:

mp4box -add "The Beekeeper (2024) - WEB-DL.mp4#1" -add "The Beekeeper (2024) - WEB-DL.mp4#3" -add "The Beekeeper (2024) - WEB-DL.mp4#2" -add "The Beekeeper (2024) - WEB-DL.mp4#4" "The Beekeeper (2024) - WEB-DL-PROPER.mp4"

Which gives us:
Code:
IsoMedia import The Beekeeper (2024) - WEB-DL.mp4 - track ID 1 - Video (size 1920 x 800)
IsoMedia import The Beekeeper (2024) - WEB-DL.mp4 - track ID 3 - Audio (SR 48000 - 2 channels)
IsoMedia import The Beekeeper (2024) - WEB-DL.mp4 - track ID 2 - Audio (SR 48000 - 2 channels)
IsoMedia import The Beekeeper (2024) - WEB-DL.mp4 - track ID 4 - media type "sbtl:tx3g"
0.500 secs Interleaving

And a resulting file of:
Code:
# Movie Info - 4 tracks - TimeScale 24000
Duration 01:45:14.144
Fragmented: no
Progressive (moov before mdat)
Major Brand isom - version 1 - compatible brands: isom
Created: GMT Mon Apr 29 18:14:28 2024

File has root IOD (9 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Not part of MPEG-4 Visual profiles (0xfe)
Audio PL: No audio capability required (0xff)
No streams included in root OD

# Track 1 Info - ID 1 - TimeScale 24000
Media Duration 01:45:14.141
Track flags: Enabled In Movie In Preview
Media Samples: 151388 - CFR 23.976025/sec
Visual Track layout: x=0 y=0 width=1920 height=800
Media Type: vide:hev1
        Visual Sample Entry Info: width=1920 height=800 (depth=24 bits)
        HEVC Video - Visual Size 1920 x 800
        HEVC Info: Profile Main @ Level 4 - Chroma Format YUV 4:2:0

        NAL Unit length bits: 32 - general profile compatibility 0x60000000

        Parameter Sets: 1 VPS 1 SPS 1 PPS
        SPS resolution 1920x800 - Pixel Aspect Ratio 1:1 - Indicated track size 1920 x 800
        Bit Depth luma 8 - Chroma 8 - 1 temporal layers
        VPS#1 hash: 539016635BF18F22D4643B39EB2CD0CF07387FEE
        SPS#1 hash: 5859387C61B73C59A8A2C102556584AF2074E28B
        PPS#1 hash: 476CC254A14C7C38F1EC443B8C1E3E48B9736FDF

        RFC6381 Codec Parameters: hev1.1.6.L120.90
        Average GOP length: 88 samples
        Max sample duration: 1001 / 24000

# Track 2 Info - ID 3 - TimeScale 48000
Media Duration 01:45:14.144
Track flags: Enabled In Movie In Preview
Media Language: French (fra)
Media Samples: 197317 - CFR 31.250000/sec
Alternate Group ID 1
Media Type: soun:ec-3
        EC-3 stream - Sample Rate 48000 - 5.1 channel(s) - bitrate 640000
        RFC6381 Codec Parameters: ec-3
        All samples are sync
        Max sample duration: 1536 / 48000

# Track 3 Info - ID 2 - TimeScale 48000
Media Duration 01:45:14.144
Track flags: Enabled In Movie In Preview
Media Language: English (eng)
Media Samples: 197317 - CFR 31.250000/sec
Alternate Group ID 1
Media Type: soun:ec-3
        EC-3 stream - Sample Rate 48000 - 5.1 channel(s) - bitrate 640000
        RFC6381 Codec Parameters: ec-3
        All samples are sync
        Max sample duration: 1536 / 48000

# Track 4 Info - ID 4 - TimeScale 1000
Media Duration 01:40:19.273
Track flags: Enabled In Movie
Media Language: English (eng)
Media Samples: 2749
1 UDTA types:
        name: English [CC]
Alternate Group ID 2
Media Type: sbtl:tx3g
        QT/3GPP subtitle
        Size 0 x 0 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: tx3g
        All samples are sync
        Max sample duration: 92614 / 1000

As you can see, the order of the tracks has changed but not their ID. If you want to be anal (like me) and have the track IDs be in order, you can use:

mp4box -swap-track-id 2:3 "The Beekeeper (2024) - WEB-DL-PROPER.mp4"

There might be a way to do it all in 1 command but i haven't tried to figure it out yet.
 
Back
Top