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 745980 - ogg video file is unable to be seeked
ogg video file is unable to be seeked
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-10 19:04 UTC by Jeremy Whiting
Modified: 2016-04-12 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix seeking in files with a missing stream (3.46 KB, patch)
2015-03-11 16:50 UTC, Vincent Penquerc'h
committed Details | Review
recover from EOS when searching for chain in push mode (1.24 KB, patch)
2015-03-12 10:52 UTC, Vincent Penquerc'h
committed Details | Review

Description Jeremy Whiting 2015-03-10 19:04:29 UTC
A certain ogg video file (I'll attach) is unable to be seeked. This causes tumbler to be unable to create a thumbnail of it. since it seeks to 1/3 of the duration of the video, waits for the seek, which never completes.

Playing the file in Videos application plays fine, but seeking always goes back to the beginning of the file.
Comment 1 Jeremy Whiting 2015-03-10 19:15:54 UTC
Apparently the file is too large to attach here. It's located at http://people.collabora.com/~jwhiting/Fury_In_The_Slaughterhouse_-_Should_Have_Known_Better.ogg for the time being instead.
Comment 2 Olivier Crête 2015-03-10 19:20:16 UTC
On 1.4, I can at least play it with gst-play, but on 1.4, I can't even play it back.
Comment 3 Nicolas Dufresne (ndufresne) 2015-03-10 21:20:24 UTC
(In reply to Olivier Crête from comment #2)
> On 1.4, I can at least play it with gst-play, but on 1.4, I can't even play
> it back.

And what is the difference between 1.4 on the left, and 1.4 on the right ?
Comment 4 Olivier Crête 2015-03-10 21:21:34 UTC
I meant with master I can't even play it back!
Comment 5 Nicolas Dufresne (ndufresne) 2015-03-10 21:26:52 UTC
I did some preliminary test here, crash sometimes right away on master, plays with 1.4.5. I notice seeking is broken fro 0 to 1m, but seeking after 1m works fine. (could not capture the crash in gdb, as it won't crash when running within gdb).
Comment 6 Nicolas Dufresne (ndufresne) 2015-03-10 21:28:33 UTC
Got the backtrace, seems unrelated, but posting anyway:

Program received signal SIGSEGV, Segmentation fault.
0x00000034c82245b5 in XFilterEvent (ev=0x7fffffffd7a0, window=0) at FilterEv.c:91
91	    LockDisplay(ev->xany.display);
(gdb) bt
  • #0 XFilterEvent
    at FilterEv.c line 91
  • #1 _gdk_x11_display_queue_events
    at gdkeventsource.c line 334
  • #2 gdk_display_get_event
    at gdkdisplay.c line 321
  • #3 gdk_event_source_dispatch
    at gdkeventsource.c line 360
  • #4 g_main_context_dispatch
    at gmain.c line 3111
  • #5 g_main_context_dispatch
    at gmain.c line 3710
  • #6 g_main_context_iterate
    at gmain.c line 3781
  • #7 g_main_context_iteration
    at gmain.c line 3842
  • #8 g_application_run
    at gapplication.c line 2282
  • #9 main

Comment 7 Nicolas Dufresne (ndufresne) 2015-03-10 21:33:26 UTC
Note that there is only 1 theora image in the entire 2 minutes of playback. This seems like a corner case to me. It is likely not very tested.
Comment 8 Vincent Penquerc'h 2015-03-11 09:35:20 UTC
The EOS page on the Theora stream is at the end of the stream, on an empty page (ie, no frame).

Thing is, streams are allowed to end early (though in this case the EOS flag should be on the last image in order for the stream to be well formed), but even if this were to be so, I don't think the seeking algorithm would work well, as it'd backup to the start in order to find last keyframe before the seek point.
Comment 9 Vincent Penquerc'h 2015-03-11 09:39:03 UTC
This works (well, it doesn't hang, but errors out):

gst-launch-1.0 filesrc location=/home/v/Samples/Fury_In_The_Slaughterhouse_-_Should_Have_Known_Better.ogg ! oggdemux name=d   d. ! queue ! theoradec ! videoconvert ! queue ! autovideosink   d. ! queue ! vorbisdec ! audioconvert ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! autoaudiosink

And it hangs if the queue size limits are left to their default.
Comment 10 Vincent Penquerc'h 2015-03-11 10:04:17 UTC
It doesn't seem to play with 1.4.0 here. Just gst-play-1.0 ?
Comment 11 Vincent Penquerc'h 2015-03-11 15:21:30 UTC
If we want to play such a file, I think we'd have to get oggdemux to send gap events when no data was received for a stream for X amount of time, as is currently done for subtitles.

It seems a bit iffy though. Do we want to do that here ?
Comment 12 Vincent Penquerc'h 2015-03-11 16:50:11 UTC
Created attachment 299115 [details] [review]
fix seeking in files with a missing stream

This is not optimal:
 - it is only for push mode at the moment
 - seeking near the end of the file seems to read from the start still
But it fixes the hang at least.
Comment 13 Vincent Penquerc'h 2015-03-11 16:53:07 UTC
Note that I had to apply https://bugzilla.gnome.org/attachment.cgi?id=298215 in order for the video part to "play" normally.
Comment 14 Vincent Penquerc'h 2015-03-12 10:52:55 UTC
Created attachment 299172 [details] [review]
recover from EOS when searching for chain in push mode

Playback fix for push mode. Seek gets disabled here. I think it's better for push mode since we don't really want to read through the whole file on seek.
Comment 15 Sebastian Dröge (slomo) 2015-03-12 14:11:34 UTC
Review of attachment 299115 [details] [review]:

A 3 second gap doesn't sound too unlikely in borderline broken streams... but what can we do? More will likely cause queues to fall apart :)
Comment 16 Sebastian Dröge (slomo) 2015-03-12 14:12:49 UTC
Review of attachment 299172 [details] [review]:

Instead of this, shouldn't we still allow seeking for parts before the EOS?
Comment 17 Vincent Penquerc'h 2015-03-12 14:16:03 UTC
(In reply to Sebastian Dröge (slomo) from comment #16)
> Review of attachment 299172 [details] [review] [review]:
> 
> Instead of this, shouldn't we still allow seeking for parts before the EOS?

It'd be better, but I think it would require non trivial changes in the push bisection code, which may or may not be worth it for corner cases.
Comment 18 Vincent Penquerc'h 2015-03-12 14:16:40 UTC
Also, if that is done, I think it would be able to seek also after the EOS, not just before.
Comment 19 Sebastian Dröge (slomo) 2015-03-12 14:42:53 UTC
Ok, seems not worth it I guess
Comment 20 Vincent Penquerc'h 2015-03-12 14:51:37 UTC
Maybe later :)
Comment 21 Vincent Penquerc'h 2015-03-12 14:54:45 UTC
commit c47004d3db7c5d4de5a5677f91b65f512acba30d
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Mar 12 10:06:15 2015 +0000

    oggdemux: recover from EOS when searching for chain in push mode
    
    If we get EOS when we're trying to build a chain, we disable seeking
    and continue instead of posting an error. This can happen for corner
    cases such as a stream with a video that stops before the end, for
    instance.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745980

commit 87fd62811d759bd2b6dfb22cf7638b2d70979560
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Wed Mar 11 16:46:38 2015 +0000

    oggdemux: fix seeking in files with a "missing" stream
    
    When looking for pages when seeking, we stop looking for non sparse
    streams if we don't find one within a given threshold. This fixes
    seeking filling up queues and blocking in corner cases such as an
    audio file with a pathological 1 frame video stream (yes, I saw one).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745980
Comment 22 Tim-Philipp Müller 2016-04-12 20:06:12 UTC
This appears to have caused a regression according to bug #764966 .