imx6 dual + imxvpudec live video latency

Olivier Bourgois olivier.bourgois at axiontech.ca
Mon Jul 16 06:42:49 UTC 2018


Hi gstreamer experts,

I'm using an imx6 dual plus on a custom board with the gstreamer1.0-imx-plugins to display some live CCTV camera feeds.  I am finding that the hardware accelerated "imxvpudec" plugin used to decode H264 is introducing roughly a 4 frame delay when compared with a software based implementation such as "avdec_h264"

Now the problem is that the frame rate used by these feeds is fairly slow namely 6fps.  So this amounts to a latency of roughly 666ms that gets added to the receive pipeline when using imxvpudec vs avdec_h264.  If I accelerate the test feed to 60fps, the latency diminishes accordingly...

Since the final application needs to display 6 concurent streams using Qt, software H264 decoding can not be used as it would load the CPU too much.  Neither can I increase the fps on the feeds.

I've reproduced the effect with the following pipelines:

Streaming PC:
------------------
launch-1.0 -v videotestsrc is-live=true ! clockoverlay  time-format="%M:%S" halignment=left valignment=top shaded-background=true font-desc="Sans, 144" ! video/x-raw,width=640,height=480,framerate=6/1,profile=high ! x264enc bitrate=256 ! video/x-h264 ! rtph264pay pt=96 ! udpsink host=239.0.12.1 port=5074 sync=false

Receiving imx6 HW Decode:
------------------------------------
gst-launch-1.0 udpsrc uri=udp://239.0.12.1:5074 caps="application/x-rtp\,\ media\=\(string\)video\,\ payload\=\(int\)96\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264" ! rtph264depay ! h264parse ! imxvpudec ! imxeglvivsink sync=false

Receiving imx6 SW Decode:
-----------------------------------
gst-launch-1.0 udpsrc uri=udp://239.0.12.1:5074 caps="application/x-rtp\,\ media\=\(string\)video\,\ payload\=\(int\)96\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264" ! rtph264depay ! h264parse ! avdec_h264 ! imxeglvivsink sync=false

Any thoughts in how to coherce the imxvpudec plugin to not introduce this (supposed) frame pipeline delay?  Or is this a limitation on the imx VPU hardware or library?

Olivier Bourgois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180716/e4594b3f/attachment-0001.html>


More information about the gstreamer-devel mailing list