GNOME Bugzilla – Bug 623629
Reverse Playback Issue in QtDemux
Last modified: 2010-07-16 12:12:37 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.
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).
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)
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.
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 ]