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 619817 - [matroskademux] Reverse playback doesn't work
[matroskademux] Reverse playback doesn't work
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.x
Other Linux
: Normal normal
: 0.10.24
Assigned To: Mark Nauwelaerts
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-27 12:17 UTC by Miguel Angel Cabrera Moya
Modified: 2010-06-21 22:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improve reverse playback (6.00 KB, patch)
2010-05-28 16:12 UTC, Mark Nauwelaerts
accepted-commit_now Details | Review
Log (just the end) when using reverse playback patch (421.00 KB, application/x-bzip)
2010-05-31 09:48 UTC, Miguel Angel Cabrera Moya
  Details

Description Miguel Angel Cabrera Moya 2010-05-27 12:17:53 UTC
I try to reverse playback a mkv file but it doesn't work.

Software versions used:
gst core/base 0.10.29
gst good 0.10.22.3
gst ffmpeg 0.10.10
python bindings 0.10.18

Running on a Ubuntu 9.10

Source code + video:
http://pastebin.com/Jh1sgshU
http://www.megaupload.com/?d=A6YD0EOR
Comment 1 Sebastian Dröge (slomo) 2010-05-27 14:39:15 UTC
Could you attach a debug log for the failure? Does seeking with rate > work?
Comment 2 Miguel Angel Cabrera Moya 2010-05-28 07:02:34 UTC
Here is the debug http://www.megaupload.com/?d=4QOBJHFD

With rate > 0.0 it works.

I think that the problem is related to matroskademux not marking buffers as 'discont'.
Comment 3 Mark Nauwelaerts 2010-05-28 16:12:11 UTC
Created attachment 162231 [details] [review]
Improve reverse playback

Seems problems are caused (a.o.) by keyframes not being where one would expect from cue entries.  Attached patched modifies implementation a bit to handle such cases also.
Comment 4 Sebastian Dröge (slomo) 2010-05-29 08:17:04 UTC
Looks good :)
Comment 5 Miguel Angel Cabrera Moya 2010-05-31 09:37:40 UTC
I have tested the patch and now it does reverse playback but my test still have problems.

The reverse playback starts after a bit of consuming high cpu, i suppose it is because of decoding/buffering to begin the reverse playback.

But also, the reverse playback doesn't play all the file. It stops before reaching the beginning of the file.

Anyway, thanks for the patch.
Comment 6 Miguel Angel Cabrera Moya 2010-05-31 09:48:32 UTC
Created attachment 162364 [details]
Log (just the end) when using reverse playback patch
Comment 7 Mark Nauwelaerts 2010-06-18 13:07:41 UTC
Using some pipeline as follows:

filesrc ... ! decodebin2 name=dec ! audio/x-raw-int ! fakesink   dec. ! video/x-raw-yuv ! fakesink

and then issuing a reverse seek (that extends all the way to 0 of course) show that it does reach the beginning of the file.

So:

commit 44fa95d5cbde7fbffb6d31174af7ccd7c6edd943
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Fri May 28 16:37:32 2010 +0200

    matroskademux: improve reverse playback
    
    Slightly modify approach to also handle cases where cue entries do not reliably
    lead to initial keyframes.
    
    Fixes #619817.