Menu

#839 Wrong channels layout shown for DTS-HD 5.1

Incorrect_result
closed-works-for-me
None
3
2015-02-11
2014-03-19
No

mediainfo v0.7.65 shows wrong channel layout for DTS-HD 5.1 stream. Here is a snippet from a BluRay disc info:

Audio
Count                        : 222
Count of stream of this kind : 1
Kind of stream               : Audio
Kind of stream               : Audio
Stream identifier            : 0
StreamOrder                  : 0-1
ID                           : 4352
ID                           : 4352 (0x1100)
Menu ID                      : 1
Menu ID                      : 1 (0x1)
Format                       : DTS
Format/Info                  : Digital Theater Systems
Commercial name              : DTS
Format profile               : MA / Core
Mode                         : 16
Format settings, Endianness  : Big
Muxing mode                  : Stream extension
Codec ID                     : 134
Codec                        : DTS-HD
Codec                        : DTS-HD
Duration                     : 5787147
Duration                     : 1h 36mn
Duration                     : 1h 36mn 27s 147ms
Duration                     : 1h 36mn
Duration                     : 01:36:27.147
Bit rate mode                : VBR 
Bit rate mode                : Variable 
Bit rate                     : Unknown / 1509000
Bit rate                     : Unknown / 1 509 Kbps
Channel count                : 6 
Channel count                : 6 channels
Channel positions            : Front: L C R, Side: L R, LFE
Channel positions            : 3/2/0.1
Sampling rate                : 48000
Sampling rate                : 48.0 KHz
Samples count                : 277783056
Frame count                  : 180848
Resolution                   : 16
Resolution                   : 16 bits
Bit depth                    : 16
Bit depth                    : 16 bits
Compression mode             : Lossless / Lossy
Compression mode             : Lossless / Lossy
Delay                        : 600000.000
Delay                        : 10mn 0s
Delay                        : 10mn 0s 0ms
Delay                        : 10mn 0s
Delay                        : 00:10:00.000
Delay, origin                : Container
Delay, origin                : Container
Delay relative to video      : 0
Video0 delay                 : 0

It shows L C R SL SR LFE here, but in fact it should be L R C LFE SL SR, as detected properly by ffmpeg. I've noticed the mistake when manually downmixed the stream to stereo using the layout mediainfo suggested, and the result was positioned way off the original.

Discussion

  • Jerome Martinez

    Jerome Martinez - 2014-03-19

    I think we don't talk of the same thing: I don't see the Mediainfo line with indication of the channel layout (the order inside the stream). The only info I see is "Front: L C R, Side: L R, LFE" with is an indication of channel positions in the room, ordered by layers (Front, Side, Rear, LFE) then from Left to right (so you could have also "L CL C CR R" for 5 front channels whatever is the layout in the stream), without any information about how it is coded inside the stream. So with "L R C LFE SL SR" from you, MediaInfo output is correct (for the purpose of this field "Front: L C R, Side: L R, LFE", all 6 channels are there).

    I think that you can have the piece of data you are looking for: in newest versions, there is a "ChannelLayout" line (hidden by default):

    Channel positions                        : Front: L C R, Side: L R, LFE
    Channel positions                        : 3/2/0.1
    ChannelLayout                            : C L R Ls Rs LFE
    

    FYI, I don't see "L R C LFE SL SR" in DTS specs:
    AMODE CHS Arrangement
    0b000000 1 A
    0b000001 2 A + B (dual mono)
    0b000010 2 L + R (stereo)
    0b000011 2 (L+R) + (L-R) (sum-difference)
    0b000100 2 LT +RT (left and right total)
    0b000101 3 C + L + R
    0b000110 3 L + R+ S
    0b000111 4 C + L + R+ S
    0b001000 4 L + R+ SL+SR
    0b001001 5 C + L + R+ SL+SR
    0b001010 6 CL + CR + L + R + SL + SR
    0b001011 6 C + L + R+ LR + RR + OV
    0b001100 6 CF+ CR+LF+ RF+LR + RR
    0b001101 7 CL + C + CR + L + R + SL + SR
    0b001110 8 CL + CR + L + R + SL1 + SL2+ SR1 + SR2
    0b001111 8 CL + C+ CR + L + R + SL + S+ SR

    I have doubts about LFE (the spec is not obvious, if you can help I would appreciate), but "L R C" is not there (it begins with "C").

    Please test with 0.7.67, then we can see how we disagree based on the right MediaInfo line.

     
  • Jerome Martinez

    Jerome Martinez - 2014-03-19
    • status: open --> pending-works-for-me
    • assigned_to: Jerome Martinez
    • Priority: 9 --> 3
     
  • Albert25

    Albert25 - 2014-03-27

    Please consider making "ChannelLayout" the default instead of "Channel Positions". Or alternatively, display both.

    The current display is extremely confusing, because "L C R L R LFE" happens to be valid standard layout, which was widely used in the film industry. DCPs now use the SMPTE layout.

    I thought my export settings were wrong, checked them, re-exported, until I finally came across this bug-report.

    Anyway, thanks a lot for a great tool!

     
  • Jerome Martinez

    Jerome Martinez - 2014-03-28

    "L C R L R LFE" happens to be valid standard layout,

    I display on purpose a "non classic" character string, in order not to mix it with channel layout.

    Or alternatively, display both.

    If I listen to everybody, the default output would be the "advanced" display, with all fields, I must do choices and I am aware it is not the right one for everybody.

    The current display is extremely confusing

    Any proposal for the field name in order not to be confusing?
    The goal is to display channel position by layers (Front, Side, Back, TopFront TopBack... It will be even more complex with 22.2 config), not the order in the stream.

     
  • Sergey Kolchin

    Sergey Kolchin - 2014-04-16

    First of all, thank you for clearing my confusion around 'Channel position' property. Nevertheless, here's a bit more details on the matter.

    $ ffmpeg -i 00005.m2ts
    Input #0, mpegts, from 00005.m2ts:
      Duration: 01:36:27.15, start: 600.000000, bitrate: 23663 kb/s
      Program 1 
        Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
        Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
        Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    

    As you can see see here, ffmpeg detects 5.1(side) channel layout, which is:

    $ ffmpeg -layouts | grep -F '5.1(side)'
    5.1(side)   FL+FR+FC+LFE+SL+SR
    

    However, mediainfo v0.7.67 shows:

    ChannelLayout                            : C L R Ls Rs LFE
    

    ffmpeg was able to properly downmix that stream to stereo. I'll get back to you on this after demuxing and checking the individual channels.

     
  • Jerome Martinez

    Jerome Martinez - 2014-04-16

    I may be wrong, but I don't see such config in DTS specs.
    For 5 channels (without LFE), I see only:
    "5 C + L + R+ SL+SR"
    I rely on ETSI TS 102 114 V1.3.1 (2011-08) Table 5-4: Audio channel arrangement (AMODE).

    For the LFE channel, I have more doubts, because the specs is not obvious (at least for me).
    I am not an expert of DTS, I don't decode it (I only parse the header), so I definitely may be wrong, but I want to know how I am wrong before I change something.
    Are you sure the "FL+FR+FC+LFE+SL+SR" is the arrangement in the file and not only the output from FFmpeg?

     
  • Sergey Kolchin

    Sergey Kolchin - 2014-04-16

    Demuxed the channels with ffmpeg. The layout is definitely FL FR C LFE SL SR, although I'm not absolutely sure it is the actual channels layout and not some internal ffmpeg mangling involved. The release in question is Ku! Kin-dza-dza Blu-ray. I can share with you a piece of the stream, but feel free to close the bug if you think it's not important.

     

    Last edit: Sergey Kolchin 2014-04-16
  • Jerome Martinez

    Jerome Martinez - 2014-04-16

    There is no plan to provide the same output as FFmpeg (my goal is not to replace FFmpeg)
    The plan is to output the real order inside the stream, so I need to know if this order is the order inside the stream, for sure (with explanations compared to the spec)

     
  • Sergey Kolchin

    Sergey Kolchin - 2014-04-16

    Here's a piece of the stream: .DTS, 16 Mb.

     
  • Jerome Martinez

    Jerome Martinez - 2014-04-16

    As said, there is only one config in the spec for a 5 channel stream.
    So your file has the same config as all other 5 channel files.
    I need to be convinced I read wrongly the specs and I need to get the right order for all AMODE configs.
    Providing the FFmpeg output is not enough, I don't know if this output is the order from FFmpeg output or inside the file.
    convince me that the order in the file is not the one I provide, based on specs and/or some external documentation.

     
  • Sergey Kolchin

    Sergey Kolchin - 2014-04-16

    I suppose ffmpeg mangles the layout internally, and the actual layout is C L R SL SR with AMODE being 0b001001. Filling this bug report was a mistake, sorry for wasting your time.

     
  • Jerome Martinez

    Jerome Martinez - 2014-04-16

    No problem, it is better to be sure we are in sync.
    Sometimes, I am wrong and I correct it.
    If you find something about channel order which is wrong in MediaInfo, reopen the ticket.

     
  • Jerome Martinez

    Jerome Martinez - 2014-04-16
    • status: pending-works-for-me --> closed-works-for-me
     

Log in to post a comment.