After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751031 - discover: report confusing number of channels when demuxer and decoder disagree
discover: report confusing number of channels when demuxer and decoder disagree
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-16 10:55 UTC by Guillaume Desmottes
Modified: 2018-11-03 11:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2015-06-16 10:55:02 UTC
I wanted to watch the GoT season finale in surround and so was looking for a release containing the 5.1 audio track. Unfortunately they were all reported as "stereo" according to nautilus file's info screen so I finally decided to watch game.of.thrones.s05e10.720p.hdtv.x264-0sec.mkv anyway. To my surprise, the audio was actually in 5.1 and I've been able to enjoy the death of my favorite characters with a great audio experience!

I took a second look at the media file and totem's media info screen was actually reporting the audio track with 6 channels. mkvinfo agrees about it as well as you can see:

| + A track
|  + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
|  + Track UID: 2
|  + Lacing flag: 0
|  + Language: und
|  + Default flag: 0
|  + Codec ID: A_AC3
|  + Track type: audio
|  + Audio track
|   + Channels: 6
|   + Sampling frequency: 48000


but gst-discover seems confused about it. As you can see the caps reports 6 channels but the "Channels" field only 2:

    audio: audio/x-ac3, framed=(boolean)true, channels=(int)6, rate=(int)48000
      Tags:
        container format: Matroska
        encoder: Lavf56.36.100
        audio codec: AC-3 (ATSC A/52)
        language code: und
        bitrate: 384000
      
      Codec:
        audio/x-ac3, framed=(boolean)true, channels=(int)6, rate=(int)48000
      Additional info:
        None
      Stream ID: d07ab0288a090e209bf7825305b2589cd3dcdbdded97dc2dc67c3238d7c529d3/002
      Language: und
      Channels: 2
      Sample rate: 48000
      Depth: 32
      Bitrate: 384000
      Max bitrate: 0


I did some digging and it seems that the demuxer detects 6 channels (hence the caps and mkvinfo being correct) but the first audio frame(s) are actually stereo!

0:00:00.239137410 32334 0x7f6ba40cf680 INFO                  a52dec gsta52dec.c:432:gst_a52dec_reneg:<a52dec0> reneg channels:2 rate:48000
...
0:00:00.291923950 32334 0x7f6ba40cf680 DEBUG                 a52dec gsta52dec.c:508:gst_a52dec_handle_frame:<a52dec0> stream channel flags changed, marking update
0:00:00.293877646 32334 0x7f6ba40cf680 INFO                  a52dec gsta52dec.c:432:gst_a52dec_reneg:<a52dec0> reneg channels:6 rate:48000

I'm not sure what's the proper answser here. I guess it makes sense to trust the audio decoder over the demuxer and we can't really read the whole file when discovering. On the other hand, it seems weird that the number of channels reported by GstDiscover doesn't match the one displayed in caps.
Comment 1 GStreamer system administrator 2018-11-03 11:38:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/196.