How to rewind GStreamer / VPU playback?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to rewind GStreamer / VPU playback?

1,185 Views
adriancox
Contributor III

I'm playing back MP4 videos on iMX.6 with a gstreamer pipeline like this:

filesrc location=%s typefind=true ! aiurdemux ! vpudec ! mfw_v4lsink

This pipeline works for play, pause, and fast-forward, but in rewind moving objects leave a trail of corrupted macro-blocks. I enter rewind like this (rate == -2.0, ms == current position in ms):

  gst_element_seek ((GstElement*)pipeline, rate, GST_FORMAT_TIME,

       (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP),

                         GST_SEEK_TYPE_NONE, 0,

                         GST_SEEK_TYPE_SET, ms * 1000000);

I'd be satisfied if I could work around this by only showing key frames during rewind.

Regards, Adrian

Labels (3)
Tags (2)
0 Kudos
4 Replies

144 Views
LeonardoSandova
Specialist I

Adrian,

have you seen the gplay source code? With it, I am not seeing any macro-brock when rewinding. Source code is located on LTIB's gst-fsl-plugins package.

Leo

0 Kudos

144 Views
adriancox
Contributor III

Leo,

I get the same issue in gplay. I think it may be an encoding issue with the file, as rewind in VLC is also very poor quality.

Adrian

0 Kudos

144 Views
LeonardoSandova
Specialist I

I see. Try better quality videos and see if you see the same blocks. In the other hand, there is a problem when doing many seeks (FF, REW), if you find this, it is a known issue...

0 Kudos

144 Views
nicolasimx
Contributor I

Hi Leonardo,

I'm experiencing the Fast Forward / Rewind issue. After multiple seeks (random numbers of seeks) in the H264 clip, IMX crash and need a reboot.

Do you have more information about this issue ?


VPU fw = 2.3.10_r40778


Nicolas

0 Kudos