GNOME Bugzilla – Bug 553244
theoraparse doesn't work at all (throws criticals and asserts)
Last modified: 2010-12-29 11:41:30 UTC
Please describe the problem: using theoraparse (eg, with the first example pipeline mentioned in theoarparse.c) fails. It throws criticals and asserts before stopping the pipeline. This happens with all the Theora videos I've tried. Steps to reproduce: 1. Build/install theoraparse 2. Run any pipeline using it (eg, filesrc ! oggdemux ! theoraparse ! fakesink) 3. Weep as it complains loudly Actual results: See sample command line and output below. Expected results: I'd expect the pipeline to go to playing, and finish properly. Does this happen every time? Yes Other information: I believe the theoraparse element is broken. I think I'm using it correctly as the same usage works fine with, eg, vorbisparse. Here's the output with a Theora video which oggz validate (a validation tool for Ogg streams) sees as compliant. Note the criticals from theoraparse, the asserts, and the odd fact that several different outputs can happen (some kind of race ?) This (or similar) happens with all the Theora videos I've tried, but in case you want this particular one, it's available from http://www.fsf.org/fry/. I have a patch for part of this (BOS flag not being set, so the BOS packet is being rejected by libtheora). I do not have a patch for the rest of the problem though, as it fails a bit later with the patch in. gst-launch --version says: > gst-launch-0.10 version 0.10.20 > GStreamer 0.10.20 (CVS) > Unknown package origin Built from CVS from mid september. Linux 2.6, GCC 4.3.0, libtheora 1.0beta3. $ oggz info Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv Content-Duration: 00:05:51.400 Skeleton: serialno 1123161271 6 packets in 3 pages, 2.0 packets/page, 18.012% Ogg overhead Presentation-Time: 0.000 Basetime: 0.000 Theora: serialno 1950288710 8788 packets in 7350 pages, 1.2 packets/page, 1.033% Ogg overhead Video-Framerate: 25.000 fps Video-Width: 608 Video-Height: 336 Vorbis: serialno 1978459621 20519 packets in 746 pages, 27.5 packets/page, 1.440% Ogg overhead Audio-Samplerate: 44100 Hz Audio-Channels: 1 Kate: serialno 2049363292 100 packets in 92 pages, 1.1 packets/page, 26.694% Ogg overhead Content-Language: en_GB Content-Category: subtitles Kate: serialno 1862391974 101 packets in 93 pages, 1.1 packets/page, 24.300% Ogg overhead Content-Language: fr Content-Category: subtitles $ oggz validate Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv $ gst-launch filesrc location=Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv ! oggdemux ! theoraparse ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock (gst-launch-0.10:31518): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed (gst-launch-0.10:31518): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed ERROR: from element /GstPipeline:pipeline0/GstOggDemux:oggdemux0: Internal data stream error. Additional debug info: gstoggdemux.c(3127): gst_ogg_demux_loop (): /GstPipeline:pipeline0/GstOggDemux:oggdemux0: stream stopped, reason error Execution ended after 645333 ns. $ gst-launch filesrc location=Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv ! oggdemux ! theoraparse ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock (gst-launch-0.10:21125): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed (gst-launch-0.10:21125): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed (gst-launch-0.10:21125): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed (gst-launch-0.10:21125): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed ** (gst-launch-0.10:21125): CRITICAL **: make_granulepos: assertion `frame - keyframe < 1 << parse->shift' failed ERROR: from element /GstPipeline:pipeline0/GstOggDemux:oggdemux0: Internal data stream error. Additional debug info: stream stopped, reason error Execution ended after 503975 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... $ gst-launch filesrc location=Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv ! oggdemux ! theoraparse ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock ** (gst-launch-0.10:21109): CRITICAL **: make_granulepos: assertion `frame >= keyframe' failed ** (gst-launch-0.10:21109): CRITICAL **: make_granulepos: assertion `frame >= keyframe' failed ** (gst-launch-0.10:21109): CRITICAL **: make_granulepos: assertion `frame >= keyframe' failed ** (gst-launch-0.10:21109): CRITICAL **: make_granulepos: assertion `frame >= keyframe' failed ** (gst-launch-0.10:21109): CRITICAL **: make_granulepos: assertion `frame >= keyframe' failed [ lots more of the same here ] Got EOS from element "pipeline0". Execution ended after 321798810 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ...
Created attachment 119155 [details] [review] fixes BOS packet not having its BOS flag set This fixes part of the 'theoraparse doesn't work' problem.
Marking as blocker, since the patch seems simple enough to me to go into the upcoming release after review.
Looks simple enough to me too - please apply.
Patch by: ogg.k.ogg.k <ogg dot k dot ogg dot k at googlemail dot com> * ext/theora/theoraparse.c: (theora_parse_set_streamheader): Set the BOS flag on the BOS packet. Fixes #553244.
*** Bug 532690 has been marked as a duplicate of this bug. ***
Misunderstanding - my patch only fixes *part* of the problem, that libtheora would reject the headers. I still get problems after that (the asserts about keyframes).
Created attachment 177150 [details] [review] oggstream: fix interpretation of Theora granule position The offset part of the granpos is not a sign of the newer encoding. Use the version number instead. This fixes the criticals thrown by theoraparse, and (at last) the remaining part of #553244.
Since I've got a patch for the second part of that bug eventually, I'm reopening this so the patch can be reviewed/applied.
commit a5533c21d9fce686038d976052326795552852f5 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Tue Dec 28 17:39:58 2010 +0000 oggstream: fix interpretation of Theora granule position The offset part of the granpos is not a sign of the newer encoding. Use the version number instead. This fixes the criticals thrown by theoraparse, and (at last) the remaining part of #553244.