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 631430 - [flvdemux] Cannot play .flv to the end
[flvdemux] Cannot play .flv to the end
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-05 14:21 UTC by Shlomi Fish
Modified: 2011-11-25 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flvdemux: detect large pts gaps and resync (3.96 KB, patch)
2011-10-03 16:51 UTC, Vincent Penquerc'h
committed Details | Review
flvdemux: fix seeking (2.23 KB, patch)
2011-11-24 16:33 UTC, Vincent Penquerc'h
committed Details | Review

Description Shlomi Fish 2010-10-05 14:21:28 UTC
gst123 and Amarok using the gstreamer plugin cannot play the .flv of http://www.youtube.com/watch?v=8wxOVn99FTE (that can be downloaded using http://bitbucket.org/rg3/youtube-dl/wiki/Home ) to its end - they stop in the middle. xine and mplayer (and I believe VLC too) play it fine. I'm uploading the offending .flv file to my web-site and will give a URL. I'm on Mandriva Linux Cooker on a Pentium 4 2.4 GHz machine.
Comment 1 Shlomi Fish 2010-10-05 14:30:50 UTC
OK, now I tried it in VLC and it plays fine, and the offending .flv can be found here:

http://www.shlomifish.org/Files/files/video/gst-bug-631430/

Regards,

-- Shlomi Fish
Comment 2 Shlomi Fish 2010-10-05 14:31:29 UTC
Oh, and its sha256sum is:

45faa0eba89337df01f0961f9d7a3350735989cde4b02fe71c58d88e31b01399  8wxOVn99FTE.flv

Regards,

-- Shlomi Fish.
Comment 3 Wim Taymans 2010-10-05 14:38:38 UTC
It's 4:10 minutes long and seems to play all the way to the end with git here. Tested with playbin2 and seek.c.
Comment 4 Wim Taymans 2010-10-05 14:44:05 UTC
(In reply to comment #3)
> It's 4:10 minutes long and seems to play all the way to the end with git here.
> Tested with playbin2 and seek.c.

I used youtube-dl to get the current one. The one at shlomifish.org has the right sha256sum and stops in the middle indeed.
Comment 5 Wim Taymans 2010-10-05 15:02:04 UTC
The file has wrong timestamps, they reset back to 0 in the middle of the file.
Comment 6 Shlomi Fish 2010-10-05 16:31:54 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > It's 4:10 minutes long and seems to play all the way to the end with git here.
> > Tested with playbin2 and seek.c.
> 
> I used youtube-dl to get the current one. The one at shlomifish.org has the
> right sha256sum and stops in the middle indeed.

Hi Wim,

Some people on #gstreamer and I tried using youtube-dl on the URL and got at least 4 different sha256sums (one of them twice from the same client host). I don't see why youtube-dl and/or youtube would return different contents each time, but it seems to.

Regards,

-- Shlomi Fish
Comment 7 Wim Taymans 2010-10-11 14:42:47 UTC
Can this still be reproduced with a fresh download of the file? it could be that there was a corrupt file for a moment.
Comment 8 Shlomi Fish 2010-10-11 22:44:50 UTC
@Wim : a fresh download from youtube.com using youtube-dl from a different host plays fine till the end. However, the file on 
http://www.shlomifish.org/Files/files/video/gst-bug-631430/ , does not play fine well with gstreamer, but plays fine on xine, mplayer or VLC.
Comment 9 Tim-Philipp Müller 2010-10-11 23:15:10 UTC
Indeed:
tpm@zingle:~/gst/git$ gst-launch-0.10 playbin2 uri=file:///home/tpm/samples/631430-8wxOVn99FTE.flv audio-sink=fakesink video-sink='progressreport ! fakesink'
...
progressreport0 (00:00:05): 44 / 250 seconds (17.6 %)
progressreport0 (00:00:10): 93 / 250 seconds (37.2 %)
progressreport0 (00:00:15): 11 / 250 seconds ( 4.4 %)
progressreport0 (00:00:20): 58 / 250 seconds (23.2 %)
progressreport0 (00:00:25): 105 / 250 seconds (42.0 %)
progressreport0 (00:00:26): 116 / 250 seconds (46.4 %)
Got EOS from element "playbin20".
Execution ended after 25201634763 ns.

There must be a timestamp wraparound at ca. 2 mins 10 secs or so. VLC shows 4:10 as duration, but then around position 2m10s goes back to showing 0m00s as position and counting up from there to the end.
Comment 10 Vincent Penquerc'h 2011-09-14 12:10:28 UTC
So is this a case of "broken file in, broken playback out" and we don't care, or should that be fixed by detecting backwards timestamps and sending a new segment or something along those lines ?
Comment 11 Tim-Philipp Müller 2011-09-14 20:51:35 UTC
I think it depends a bit on how cracktastic it turns out to be on deeper investigation, and how hard to fix. We can probably just detect the wraparound and maintain a timestamp "offset/base" of some sort (assuming there's max. 1 wraparound for now). If the flash player plays it, we should try to play it as well IMHO.
Comment 12 Vincent Penquerc'h 2011-10-03 16:51:54 UTC
Created attachment 198124 [details] [review]
flvdemux: detect large pts gaps and resync

Should work on multiple gaps, but tested on only one.
Comment 13 Vincent Penquerc'h 2011-11-07 12:39:39 UTC
commit cf3f3f14da6561223bf9f5d6bf1ff230526d40eb
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Mon Oct 3 17:50:43 2011 +0100

    flvdemux: detect large pts gaps and resync
    
    Should work on multiple gaps, but tested on only one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631430
Comment 14 Shlomi Fish 2011-11-07 15:15:03 UTC
Thanks for fixing this bug.
Comment 15 Tim-Philipp Müller 2011-11-18 13:22:04 UTC
This commit breaks seeking + duration stuff for me with most other flv files, re-opening.
Comment 16 Sebastian Dröge (slomo) 2011-11-24 11:47:17 UTC
IMHO 2 seconds are quite small, does work if you chose 10 seconds or something on other files?
Comment 17 Vincent Penquerc'h 2011-11-24 16:33:13 UTC
Created attachment 202071 [details] [review]
flvdemux: fix seeking

Which I accidentally broke when fixing flv videos breaking on
spurious timestamp discontinuities in broken files.
Comment 18 Vincent Penquerc'h 2011-11-24 16:35:13 UTC
Oops. Fixed :)
The seeking was triggering the discontinuity detector.
It was still working fine when seeking via navseek.

Seeking works fine for my test case, which was broken before the patch.
If you confirm it fixes your test case also, I'll push.
Comment 19 Sebastian Dröge (slomo) 2011-11-25 09:53:35 UTC
Comment on attachment 202071 [details] [review]
flvdemux: fix seeking

Definitely makes sense, even if it doesn't fix the bug Tim mentioned ;) Please push
Comment 20 Tim-Philipp Müller 2011-11-25 10:04:13 UTC
It fixes seeking for me too, thanks!
Comment 21 Vincent Penquerc'h 2011-11-25 16:05:26 UTC
commit 21d3faa40070b2ddc10a1c572bd4d4a7dd28af39
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Nov 24 16:31:38 2011 +0000

    flvdemux: fix seeking
    
    Which I accidentally broke when fixing flv videos breaking on
    spurious timestamp discontinuities in broken files.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631430