Freescale / gstreamer-imx

GStreamer 1.0 plugins for i.MX platforms
Other
184 stars 127 forks source link

Seeking and playback direction #302

Closed anderi closed 2 years ago

anderi commented 2 years ago

I'm trying to do seeking and fast forward/backward playback, I've tested both h264, h264 with avi mux, mpeg4 with qtmux, etc... but I'm not getting anything to work. As soon as I reverse the direction I get an error and it's not possible to query position anymore:

0:00:03.990376000 3086 0xb05cc0 WARN avidemux gstavidemux.c:5906:gst_avi_demux_chain: error: push mode seek failed 0:00:03.990679667 3086 0xb05cc0 WARN queue gstqueue.c:1568:gst_queue_loop: error: Internal data stream error. 0:00:03.990733334 3086 0xb05cc0 WARN queue gstqueue.c:1568:gst_queue_loop: error: streaming stopped, reason error (-5) 0:00:03.990847667 3086 0xb05cc0 WARN avidemux gstavidemux.c:892:gst_avi_demux_handle_sink_event: error: got eos and didn't receive a complete header object

Does anyone know if reverse playback / seeking is possible at all using gstreamer-imx?

anderi commented 2 years ago

To be more specific, this was tested using iMX6Q using version 0.13.1 as provided in buildroot version 2021.02.x

anderi commented 2 years ago

More information:

this pipeline works with both framestepping forward/backwards and seeking: filesrc location=test.avi ! avidemux ! queue ! h264parse ! queue ! avdec_h264 ! queue ! imxipuvideosink name=video-sink framebuffer=/dev/fb1

this pipeline does not work backwards at all, it just freezes after setting a rate of -1, never leaving PAUSED state: filesrc location=test.avi ! avidemux ! queue ! h264parse ! queue ! imxvpudec ! queue ! imxipuvideosink name=video-sink framebuffer=/dev/fb1

dv1 commented 2 years ago

Please retry this with gstreamer-imx 2.0.0. 0.13 is not supported anymore.

dv1 commented 2 years ago

I just tried this with latest git master of gstreamer-imx and GStreamer 1.18.2. I played an AVI test file with gst-play. Mid-playback, I pressed "d" to reverse playback direction, and everything worked fine. Please retry with these versions. If it is still broken for you, feel free to reopen this issue.