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 697829 - Reverse playback freezes for h264 in AVI container
Reverse playback freezes for h264 in AVI container
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-11 18:47 UTC by Tristan Matthews
Modified: 2018-01-13 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python testcase (using GObject Introspection) (830 bytes, text/plain)
2013-04-11 18:47 UTC, Tristan Matthews
Details
Python testcase (using GObject Introspection) (830 bytes, text/plain)
2013-04-11 20:08 UTC, Tristan Matthews
Details
Corrected example using gi (1.40 KB, text/plain)
2013-04-11 20:13 UTC, Tristan Matthews
Details

Description Tristan Matthews 2013-04-11 18:47:43 UTC
Created attachment 241292 [details]
Python testcase (using GObject Introspection)

I've attached a test case which seeks in a file, waits a few seconds, then attempts to reverse playback of the file. For mp4 containers (using qtdemux) containing an h264 stream, this test case is fine. For AVI containers, the test case freezes.

A sample file is available here:
http://www1.datafilehost.com/d/51ada03a

I've also reproduced this by remuxing Big Buck Bunny and using it with the attached python script:

ffmpeg -i ~/big_buck_bunny_480p_h264.mov -vcodec copy -acodec copy big_buck_bunny_480p_h264_remux.avi
Comment 1 Tristan Matthews 2013-04-11 20:08:16 UTC
Created attachment 241299 [details]
Python testcase (using GObject Introspection)
Comment 2 Tristan Matthews 2013-04-11 20:13:10 UTC
Created attachment 241300 [details]
Corrected example using gi
Comment 3 Sebastian Dröge (slomo) 2013-08-20 14:09:52 UTC
Still a problem with latest GIT master.
Comment 4 Mark Nauwelaerts 2013-12-04 18:20:50 UTC
The link provided seems no longer valid, so I performed a remux as indicated.  As such, the results may or may not be on the same page/clip/mileage.

The remuxed clip is at least partially bogus in that the codec_data for AAC is invalid, so audio playback fails.  Since the test script runs a mainloop without checking for messages (error or EOS) it does indeed "hang" (with some displayed video image).  If the audio part of the pipeline (in the script) is removed, then it sort of works.  That is, there is accelerated reverse playback from about 100s to 0s which then hangs:
* 100s to 0s since that is the position at time of reverse seek and no end position is given
* accelerated because the segment has no specific stop time, so no calculations required for sync are possible (this is either a corner case bug or as designed in this case for seeking)
* hangs in the end because no EOS messages are considered

So, depending on clip involved and notion of "freeze", things seem OK.

If there is another way to reproduce ...
Comment 5 Tim-Philipp Müller 2018-01-12 19:32:21 UTC
This seems to generally work fine for me.

With your script, I notice that reverse playback is superfast and lots of these are output on the terminal:

(python3:5595): GStreamer-CRITICAL **: gst_segment_to_running_time_full: assertion 'stop != -1' failed


If I change the stop parameter in the seek request from

           Gst.SeekType.NONE, position)

to

           Gst.SeekType.SET, position)

it all works as expected.
Comment 6 Tristan Matthews 2018-01-12 20:17:14 UTC
(In reply to Tim-Philipp Müller from comment #5)
> This seems to generally work fine for me.
> 
> With your script, I notice that reverse playback is superfast and lots of
> these are output on the terminal:
> 
> (python3:5595): GStreamer-CRITICAL **: gst_segment_to_running_time_full:
> assertion 'stop != -1' failed
> 
> 
> If I change the stop parameter in the seek request from
> 
>            Gst.SeekType.NONE, position)
> 
> to
> 
>            Gst.SeekType.SET, position)
> 
> it all works as expected.

Entirely possible, probably a lot has happened in 5 years ;)

Feel free to close.