GNOME Bugzilla – Bug 745980
ogg video file is unable to be seeked
Last modified: 2016-04-12 20:06:12 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.
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.
On 1.4, I can at least play it with gst-play, but on 1.4, I can't even play it back.
(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 ?
I meant with master I can't even play it back!
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).
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
+ Trace 234831
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.
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.
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.
It doesn't seem to play with 1.4.0 here. Just gst-play-1.0 ?
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 ?
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.
Note that I had to apply https://bugzilla.gnome.org/attachment.cgi?id=298215 in order for the video part to "play" normally.
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.
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 :)
Review of attachment 299172 [details] [review]: Instead of this, shouldn't we still allow seeking for parts before the EOS?
(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.
Also, if that is done, I think it would be able to seek also after the EOS, not just before.
Ok, seems not worth it I guess
Maybe later :)
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
This appears to have caused a regression according to bug #764966 .