VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. I'm encoding a large collection of remuxes I made from my personal BluRay collection using Handbrake for video and eac3to for converting the TrueHD or DTS/DTS-HD to FLAC.

    I was comparing the audio channel mappings from the source and FLAC using mediainfo and the FLAC files seem to display the mapping in a different order than what is displayed from the mediainfo of the source. Example:

    Source: C L R Ls Rs LFE
    FLAC: L R C LFE Ls Rs

    Does this order matter or will things be decoded properly and to the proper channels regardless of what is written here? My limited research seems to suggest it doesn't matter how it is written, but I wanted to check and see if someone knows better.

    One other thing I encountered was when I did the same thing with my copy of Rogue One, not only did it change the order as shown in mediainfo, it also changed Lss and Rss to Ls and Rs in the FLAC:

    Source Rogue One: C L R LFE Lb Rb Lss Rss
    FLAC Rogue One: L R C LFE Lb Rb Ls Rs

    I was curious if the channel positioning in the FLAC is no longer going to be 1:1 with the source, spatially. I'm basing it on a diagram seen here: https://mediaarea.net/AudioChannelLayout

    Lss and Rss are immediately to the left and right of the viewer, whereas Ls and Rs are slightly behind. Is there a way to correct or redo this so that it is spatially 1:1 or is that just a fault of available methods to convert to FLAC and we have to just take it as it is?

    Thank you for your time!
    Quote Quote  
  2. At one stage MediaInfo displayed all multichannel audio using the same channel order, but sometime fairly recently it switched to displaying the order the channels are actually encoded in.
    Different formats use different default channel orders, but the encoders all expect the input to use the wave file channels. From there the audio is remapped by the encoder to the channel order the codec uses. On playback, it's decoded and remapped to the wave file channels again. The wave channel layout was actually designed to match the cinema channel layout, and is oblivious to surround channels as such. There's no such thing as Lss or Rss. In wave file-speak, Ls means "left side". Where you put the speakers is up to you.

    The mapping from "surround" formats to the wave file layout is a standard thing. The cinema layout for 7.1ch audio actually puts the extra surround speakers between the front left and right stereo speakers, which is why the wave file channel order might seem a bit mental.
    WAVE-FORMAT-EXTENSIBLE
    There's some info on the various 5.1ch orders used by different codecs here. You might find some more info on Wikipedia.

    For the record, the channels used for wave file 5.1ch were originally left back and right back for the surround channels, but then along came 7.1ch audio to confuse things. I'm pretty sure all lossy encoders (DTS, AC3 etc) will accept either the side or back channels in the wave file layout as the 5.1ch surround channels and regardless of which wave file channels are used when they're decoded, they can only be the surround channels for 5.1ch audio. These days it's normal for 7.1ch audio to use the left and right wave file side channels for left and right surround, and the left and right back channels for the left and right rear surround. Ugly, isn't it?
    Last edited by hello_hello; 28th Jan 2020 at 21:03.
    Quote Quote  
  3. Thanks for your reply! And yeah, the notation is confusing...

    So if I'm getting what you're saying, the audio channel mappings being in different orders from the "source" and the "FLAC" is just due to codec specific differences in nomenclature (in this case, FLAC)?

    So basically, despite these differences in nomenclature with regard to order of channels listed in Mediainfo as well as specific designations (Lss/Rss vs Ls/Rs), my FLAC, generated from eac3to, should be spatially and audibly 1:1 with the source DTS file?

    Thanks again
    Quote Quote  
  4. Originally Posted by calvinpn View Post
    Thanks for your reply! And yeah, the notation is confusing...

    So if I'm getting what you're saying, the audio channel mappings being in different orders from the "source" and the "FLAC" is just due to codec specific differences in nomenclature (in this case, FLAC)?
    Correct, although different codecs do encode the audio in different channel orders, they always get remapped to match the appropriate wave file channels for playback on a PC, or for re-encoding. A hardware player should know which channels are which, because for DTS/Dolby/FLAC etc their channel orders are specified and a standard thing.
    FLAC only accepts SMPTE channel layouts by default (which would include a lossy codec channel order after it's been decoded and remapped to the wave file layout), and it should reject anything else. There's a list here if you scroll down a bit.
    https://xiph.org/flac/format.html#frame_header

    Codecs can tell which channel is which when encoding the audio because most encoding programs create a fake wave file header with information regarding the channel layout in wave-file-speak. It's technically a "hack" that's almost universally used, and it's why most CLI encoders have some sort of -ignore_length option, telling the encoder to ignore any length info in the wave file header (which will probably be wrong) and to keep encoding until there's no more input.

    Originally Posted by calvinpn View Post
    So basically, despite these differences in nomenclature with regard to order of channels listed in Mediainfo as well as specific designations (Lss/Rss vs Ls/Rs), my FLAC, generated from eac3to, should be spatially and audibly 1:1 with the source DTS file?

    Thanks again
    Yes, unless the decoder/player does something mental, the 7.1ch layout is a standard thing and the channels should be decoded to the correct speakers, because the layout is specified. Lss/Rss vs Ls/Rs does help make it confusing, but it's literally why I said "where you put the speakers is up to you", because each system (DTS, Dolby, THX) recommend slightly different speaker placements (I think). I'm sure for THX approved 7.1ch surround, the back speakers are supposed to be directly behind the listener, almost touching, similar to a single back speaker. For THX, the back surround channels might be labelled something else again, but they'd still be encoded as the back wave file channels when using FLAC. There's only 8 channels in the wave file layout that can be used for 7.1ch audio (home theatre 7.1ch layout), so the surround channels would end up in the same wave file channels regardless of what they're referred to by the original codec, or the order in which the codec itself encodes them.

    I've never understood the attraction of surround sound myself. To me it's a constant reminder that the sound surrounds you but the picture doesn't, however I did do some experimenting with AAC 7.1ch encoding a while back, because by default AAC supports the cinema 7.1ch layout, not the home theatre layout, so if you ever decide to encode 7.1ch audio as AAC, have a read of this thread first.

    https://forum.videohelp.com/threads/377639-7-1ch-AAC-encoding

    By the way, here's Microsoft defaulting to the cinema 7.1ch layout for XP, compared to the rest of the world. I think from Vista they switched to the home theatre layout as the default, but I'm guessing it's one of the reasons for all the 7.1ch AAC f%$ktardary you can read about in the link above, because if the channels aren't specified the decoder/player has to make assumptions.

    For encoding as FLAC though, everything should be fine.
    Image Attached Thumbnails Click image for larger version

Name:	8ch.jpg
Views:	607
Size:	90.0 KB
ID:	51743  

    Last edited by hello_hello; 31st Jan 2020 at 10:29.
    Quote Quote  



Similar Threads

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