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 623629 - Reverse Playback Issue in QtDemux
Reverse Playback Issue in QtDemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal major
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-05 20:01 UTC by Vikram Fugro
Modified: 2010-07-16 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch: The patch basically avoids aligning the reference stream during the alignment of other streams, since the reference stream is already aligned before. (5.79 KB, patch)
2010-07-05 20:01 UTC, Vikram Fugro
none Details | Review
qtdemux: do not align reverse playback reference stream twice (3.53 KB, patch)
2010-07-08 16:59 UTC, Mark Nauwelaerts
committed Details | Review

Description Vikram Fugro 2010-07-05 20:01:35 UTC
Created attachment 165305 [details] [review]
Patch: The patch basically avoids aligning the reference stream during the alignment of other streams, since the reference stream is already aligned before.

During reverse playback, the qtdemux goes past two keyframes instead of one in gst_qtdemux_seek_to_previous_keyframe (). This results in sending a keyframe in between the two keyframe boundaries (i.e when sending from a keyframe point in ascending timestamp values).

Expected: (where K is a keyframe and P non-keyframe)
K3-P31-P32-P33-K2-P21-P22-P23-K1-P11-P12-P13

As Seen Currently:
K3-P31-P32-P33-K1-P11-P12-P13-K2-P21-P22-P23

This issue is mostly observed for timestamps that are not rational (eg. 24 fps, 30 fps, 29.97 fps), due to the conversion from index to position and vice-versa.

Kindly go through the patch attached to see if it's fine. 
I have tested it with a few files and it seemed to work fine at my end.

Thanks.
Comment 1 Mark Nauwelaerts 2010-07-08 16:59:12 UTC
Created attachment 165493 [details] [review]
qtdemux: do not align reverse playback reference stream twice

Attached patch is a somewhat simplified variation, which should also do the requested (trick).
Comment 2 Vikram Fugro 2010-07-08 19:04:22 UTC
Mark, shouldn't the 'seg_media_start_mov' get updated when crawling through the segments to find the segment containing the sought I frame? (although it will rarely do that)
Comment 3 Mark Nauwelaerts 2010-07-08 19:25:38 UTC
Yes, it should.  It's a minor regression that was apparently introduced by converting by sample entries timestamp to mov timescale.  I have it in a separate patch as it is not itself related aligning reference stream twice.
Comment 4 Mark Nauwelaerts 2010-07-16 12:12:22 UTC
commit bbded080e0525b7d3646977ebbb46215ea36e434
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Thu Jul 8 18:57:21 2010 +0200

    qtdemux: do not align reverse playback reference stream twice
    
    Timestamp rounding issues could lead to going backwards 2 keyframe periods
    (rather than only 1).  While this is not necessarily a problem, it might
    potentially place additional (buffering) load on downstream and could be
    avoided (because We Can).
    
    Fixes #623629.


[
and the seg_media_start_mov update:
commit 2a22e9d487f24c0cd1457d6714f0406bca29b909
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Thu Jul 8 16:07:16 2010 +0200

    qtdemux: convert some more mov format timestamp to gst time

]