GNOME Bugzilla – Bug 695606
audiodecoder, ac3parse: Totem won't play 5.1 surround DVDs
Last modified: 2013-12-26 12:20:07 UTC
When I try to play this DVD in Totem, I get the error message 'The stream is in the wrong format." and nothing plays. Also important is that this DVD video has 5.1 surround sound elements. I tested multiple other DVDs with 5.1 surround, and the same error occurred. For some of them, opening individual video elements (.VOB files on the DVD) still works fine. Yes, I have all gstreamer packages, good, bad, ugly, etc., of both the .10 and 1 variety. Yes, I have libdvdcss. I've reported this for the gstreamer component because I'm all but certain that it's the source of the trouble. This DVD plays without any problem in VLC. Attached is the (very long) log file from the stack trace, made by running strace -o /tmp/some-file.log totem 2'. Very important is that, in the process of running that, my terminal outputs 'No accelerated IMDCT transform found'. Not sure what that means.
The .log file failed to attach. It's so large it even exceeds the 500 KB size limit in pastebin. Pity.
An strace log isn't particularly interesting anyway here. What might be more intersting is this: $ GST_DEBUG=*:6 totem 2>dbg.log Control-C or quite after error $ xz -9 dbg.log Then attach dbg.log.xz
Created attachment 238658 [details] the debug log
There is one difference I noticed in Totem's behavior since last time: the DVD's menu, curiously enough, actually displayed this time (but with the same error message, and I couldn't do anything with it). No idea what changed.
The audiosink/ringbuffer complains about not-negotiated, i.e. not having received a caps event before getting a buffer or buffer-like event. Two possible issues come to mind after looking at the log: 1) out of the mpeg demuxer comes audio/x-private1-ac3 - this means ac3parse doesn't get plugged, which means caps don't get set properly etc. 2) the audio decoder receives a GAP event fairly early on - passing that through before a CAPS event might throw off the ring buffer as well (maybe the ring buffer should handle this gracefully though?)
Hrm, not an easy DVD to come by for testing purposes it seems.
Tim, You don't necessarily need to have my DVD (yes it is a limited release), I get the same error with other multi-channel audio DVDs. On the other hand, stereo movie DVDs I've tested like LOTR and Punch Drunk Love play without trouble. I have trouble understanding your points from comment 5 ... this is out of my depth. Is this anything that seems fixable?
I don't think it's something that happens with *all* multi-channel DVDs. Guess we'll have to try a few. Sure it's fixable. It's generally easier to fix if one can reproduce it locally.
Well, could it possibly be attributed to the difference between DVD-V (works) and DVD-A (doesn't)?
Multichannel "Audio DVDs" are a completely different beast and are known not to work (there's a bug about that somewhere). I believe this is just a plain Video DVD (or the video part of a mixed Audio/Video DVD).
Created attachment 243332 [details] Debug log Debugging log for an instance of the problem
Hopefully this log will be easier to duplicate. I'm happy to run any tests, or try out patches if that will help...
IIRC, audio/x-private1-ac3 is just the regular ac3 but with two extra bytes at the start of the each frame. Please provide the sample piece of such stream.
How would I go about getting that?
I don't think we need a sample of the stream, not before we've had a thorough look at the debug log anyway.
*** Bug 704617 has been marked as a duplicate of this bug. ***
The DVD it happens to me has says "Sondtrack: Mono 1.0" on the cover. Again I want to point out that it is working with gst-launch-0.10.
I've got 4 possible solutions to this. The basic problem is that the DVD's start with no audio track, so the first thing the audio sink receives is a GAP event. It has no configured caps, so it can't fill silence (it doesn't have a format), and throws an error. Possible fixes: 1) Reintroduce the rsnaudiomunge element that was present in 0.10, which simple picks a random audio format and generates a silence buffer to trigger preroll 2) Make baseaudiodecoder able to randomly pick an output format and generate the silence buffer. 3) Make all audio decoder implementations able to handle an empty input buffer and generate some silence in a random output format by setting the PLC (Packet Loss Concealment) flag. 4) Make the baseaudiosink preroll on silence, even though it doesn't have a format. I've been looking at 4), but I don't think it's a valid approach, because if there's been no CAPS event, there's not supposed to have been a SEGMENT event, or any kind of data flow yet - including GAP.
This sounds very similar to what you said in bug 603921. There we had the discussion about DVDFASTSTART.
You're right, Frank - the 2 bugs have the same root cause. *** This bug has been marked as a duplicate of bug 603921 ***