GNOME Bugzilla – Bug 741321
opusparse: fix header parsing esp. of encoded output of libopus
Last modified: 2014-12-15 19:06:10 UTC
Hello, I'm trying to use opus as audio codec but I'm having troubles with the opus parser. If I use opusparse to configure the caps of the opus depayloader or the opus decoder I get an opus decoder error -4 (OPUS_INVALID_PACKET), but if I set the caps manually everything works ok. The error is very easy to reproduce. This pipeline works ok: gst-launch-1.0 audiotestsrc ! opusenc ! opusdec ! autoaudiosink But this one throws the error -4: gst-launch-1.0 audiotestsrc ! opusenc ! opusparse ! opusdec ! autoaudiosink I have tested many pipelines using parsers between decoder and encoder and all work ok: gst-launch-1.0 audiotestsrc ! vorbisenc ! vorbisparse ! decodebin ! autoaudiosink gst-launch-1.0 videotestsrc ! x264enc ! h264parse ! decodebin ! autovideosink I think there is a problem in the opusparse element, but I can't find it. Thanks in advance. Regards.
Seems to work fine with recent-ish master, which should be pretty close to 1.4.4, though there was no relevant change to opusparse for a while. $ gst-launch-1.0 audiotestsrc ! opusenc ! opusparse ! opusdec ! autoaudiosink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Redistribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstPulseSinkClock ^Chandling interrupt. Interrupt: Stopping pipeline ... Execution ended after 0:00:05.384966283 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... Maybe a GST_DEBUG=2,opus*:9 might help shed some light.
Created attachment 292745 [details] execution log
Comment on attachment 292745 [details] execution log Hi Vincent, Thanks for your response. I can't update my gstreamer version to master, but as you said, it not seems to be relevant changes. I have attached the log of the execution. I hope it will be relevant for you. Regards. David.
I now get the same error after updating my copy of libopus.
I have no idea why it was working originally. I had an old copy of libopus, but trying those also failed. In any case, I found the bug in opusparse: commit 79b56ebcc9511a50d9fe9fbb93b48d5c2170bad8 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon Dec 15 15:21:50 2014 +0000 opusparse: fix frame size determination https://bugzilla.gnome.org/show_bug.cgi?id=741321
The patch works fine for me. Thank you very much. Regards.
Cherry-picked into 1.4 branch.
Just resetting the title as it happens also with old opus too. I have no idea why it worked with the version I had originally, but when I tried to bisect in libopus, it continued to fail till before the version I originally had. So it's just a bug in opusparse, independent of the libopus version.