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 553244 - theoraparse doesn't work at all (throws criticals and asserts)
theoraparse doesn't work at all (throws criticals and asserts)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal blocker
: 0.10.32
Assigned To: Wim Taymans
GStreamer Maintainers
: 532690 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-22 10:42 UTC by ogg.k.ogg.k
Modified: 2010-12-29 11:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes BOS packet not having its BOS flag set (835 bytes, patch)
2008-09-22 10:43 UTC, ogg.k.ogg.k
committed Details | Review
oggstream: fix interpretation of Theora granule position (1.90 KB, patch)
2010-12-28 17:48 UTC, Vincent Penquerc'h
none Details | Review

Description ogg.k.ogg.k 2008-09-22 10:42:15 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 ...
Comment 1 ogg.k.ogg.k 2008-09-22 10:43:54 UTC
Created attachment 119155 [details] [review]
fixes BOS packet not having its BOS flag set

This fixes part of the 'theoraparse doesn't work' problem.
Comment 2 Tim-Philipp Müller 2008-09-22 11:51:44 UTC
Marking as blocker, since the patch seems simple enough to me to go into the upcoming release after review.
Comment 3 Jan Schmidt 2008-09-23 18:09:05 UTC
Looks simple enough to me too - please apply.
Comment 4 Wim Taymans 2008-09-25 10:46:15 UTC
        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.
Comment 5 Wim Taymans 2008-09-25 10:56:51 UTC
*** Bug 532690 has been marked as a duplicate of this bug. ***
Comment 6 ogg.k.ogg.k 2008-09-25 11:03:23 UTC
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).
Comment 7 Vincent Penquerc'h 2010-12-28 17:48:16 UTC
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.
Comment 8 Vincent Penquerc'h 2010-12-29 11:08:06 UTC
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.
Comment 9 Wim Taymans 2010-12-29 11:41:30 UTC
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.