VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Feb 2023
    Location
    Mexico
    Search Comp PM
    I am currently working with an MP4 file that is set to 5.1 audio.

    Using FFMPEG, I can get this information from the audio stream:

    Stream #0:1[0x2](und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Stream #0:2[0x3](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)

    But it doesn't tell me what each channel is mapped to. So far, I've looked for multiple solutions, but I just can't find anything that will give me the info I need. Is there a way to check this?

    Thanks!
    Quote Quote  
  2. Member
    Join Date
    Feb 2023
    Location
    Mexico
    Search Comp PM
    From documentation, I found this:

    5.1 FL+FR+FC+LFE+BL+BR
    5.1(side) FL+FR+FC+LFE+SL+SR

    Does this mean that both streams have this mapping, in numerical order?

    So 5.1 is FL=Ch1 FR=Ch2 FC=Ch3 etc.?
    Quote Quote  
  3. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  4. Member
    Join Date
    Feb 2023
    Location
    Mexico
    Search Comp PM
    Thanks, the info I can get from Media Info for the 5.1(side) stream is:

    Channel(s) :
    6 channels
    Channel positions :
    Front: L C R, Side: L R, LFE
    Channel positions :
    3/2/0.1
    Channel layout :
    L R C LFE Ls Rs

    But I'm unsure if there's a numeric value I can assign, as I see the positions and layout are different.

    Though I assume it's "Channel Layout" so I could say that it would be:

    FL:1, FR:2, C:3, LFE:4, SL:5, SR:6

    ?
    Quote Quote  
  5. 5.1 channels layout is:

    Ch 1 - Front Left
    Ch 2 - Front Right
    Ch 3 - Front Center
    Ch 4 - Low-frequency Effects
    Ch 5 - Left Surround
    Ch 6 - Right Surround

    Read: https://mediaarea.net/AudioChannelLayout
    Quote Quote  
  6. Member
    Join Date
    Feb 2023
    Location
    Mexico
    Search Comp PM
    Thank you, though this leads to my next question:

    Is it possible for someone to manually select the channels? Basically, I'm just trying to determine if this video I have has been encoded with the audio channels mapped correctly.
    Quote Quote  
  7. The standard wave file mapping of

    Ch 1 - Front Left
    Ch 2 - Front Right
    Ch 3 - Front Center
    Ch 4 - Low-frequency Effects
    Ch 5 - Left Surround
    Ch 6 - Right Surround

    isn't used by every codec.

    What should happen though (and these days it's pretty standard) is multichannel audio is sent to an encoder using the wave file channel order, and the encoder remaps it to the order it uses internally. When it's later decoded, it's remapped back to the wave file channel order by the decoder.

    Here's a channel order list for AAC, which is mostly the same as DTS, I think.
    https://github.com/nu774/qaac/wiki/Multichannel--handling

    5.1 FL+FR+FC+LFE+BL+BR
    5.1(side) FL+FR+FC+LFE+SL+SR

    The two layouts above are exactly the same in respect to the channel order they're encoded in. Formats like AC3 and DTS have "surround" channels, which don't exist in the wave file layout, so for 5.1 most encoders will accept either the side or back channels as "surround", and the channels they're decoded to later is partly convention, but it doesn't matter.

    If you want to play around with channel mapping, try this version of foobar2000.
    https://forum.videohelp.com/threads/396860-foobar2000-portable-(for-audio-encoding)
    The output meters will show you which channels are being used (if you right click on the output meter you can run it full screen) and there's a Matrix Mixer DSP included you can add to the playback chain (or the conversion chain) and change the channel layout with it.

    Swapping the Center and LFE channels, just to demonstrate.

    Image
    [Attachment 69275 - Click to enlarge]


    PS When it's using them, the BL & BR channels on foobar2000's output meter are labelled RL & RR (rear) for some reason, but they're the same channels.
    Last edited by hello_hello; 17th Feb 2023 at 15:41.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!