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 759592 - Seek with negative rates appears to be broken with hlsdemux
Seek with negative rates appears to be broken with hlsdemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-17 13:50 UTC by Arjen Veenhuizen
Modified: 2015-12-18 22:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Arjen Veenhuizen 2015-12-17 13:50:56 UTC
As discussed in [1], seeking with negative rates appears to be broken.

Basic pipeline:
[souphttpsrc] - [hlsdemux] - [tsdemux] - [h264parse] - [avdec_h264] - [ximagesink]

The event I send for a positive rate (works fine): 
start = self.elementPipeline.query_position(Gst.Format.TIME)[1]
end = self.elementPipeline.query_duration(Gst.Format.TIME)[1]
seekEvent =  Gst.Event.new_seek (argRate, Gst.Format.TIME,  Gst.SeekFlags.FLUSH | Gst.SeekFlags.ACCURATE, Gst.SeekType.SET, int(start), Gst.SeekType.SET, int(end))

The event I send for a negative rate (doesn't work): 
start = -1
end = self.elementPipeline.query_position(Gst.Format.TIME)[1]
seekEvent =  Gst.Event.new_seek (argRate, Gst.Format.TIME,  Gst.SeekFlags.NONE, Gst.SeekType.NONE, int(start), Gst.SeekType.NONE, int(end))

Not sure where this issues stems from, but I suspect hlsdemux in gst-plugins-bad.

[1] http://gstreamer-devel.966125.n4.nabble.com/Playing-a-VOD-HLS-feed-backwards-stops-playback-td4674935.html
Comment 1 Duncan Palmer 2015-12-17 16:35:06 UTC
hlsdemux only supports trick play (i.e. negative rate) if your content includes iframe playlists (most content I've seen doesn't).

Can you confirm whether or not you have iframe playlists?
Comment 2 Sebastian Dröge (slomo) 2015-12-17 16:48:23 UTC
That's actually not true. Reverse playback also works without I-frame playlists, it just puts a lot of pressure on the network, CPU/decoders and queues.
Comment 3 Arjen Veenhuizen 2015-12-17 17:02:25 UTC
We are not using an i-frame playlist but are running on a high end system.
Comment 4 Thiago Sousa Santos 2015-12-17 20:34:31 UTC
My first bet is that tsdemux is swallowing the discont flags from adaptivedemux and then h264parse doesn't ever push anything downstream.
Comment 5 Duncan Palmer 2015-12-18 09:49:20 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> That's actually not true. Reverse playback also works without I-frame
> playlists, it just puts a lot of pressure on the network, CPU/decoders and
> queues.

Oops. Sorry for confusing things.
Comment 6 Thiago Sousa Santos 2015-12-18 22:23:16 UTC
commit 29de588e2fe14be39db01e4841d1ea95c94a551a
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Fri Dec 18 11:56:17 2015 -0300

    hlsdemux: always set timestamp on reverse playback
    
    Downstream needs to be able to restore the timestamps after a discont
    to do reverse playback
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759592