AnsweredAssumed Answered

Dual video streaming 1080p+720p works okay on iMX6Q but not on iMX6QP

Question asked by frankba on May 24, 2017
Latest reply on Jun 3, 2017 by frankba

I use an ov5640 camera module for H.264 network streaming on two boards (nitrogen6_max): one with iMX6QP the other "only" with iMX6Q with a current Yocto morty image (Linux nitrogen6x 4.1.15-2.0.0-ga+yocto+gfc4f6c4, GStreamer 1.8.3).

 

GStreamer pipeline as follows:

gst-launch-1.0 imxv4l2videosrc device=/dev/video1 imx-capture-mode=5 queue-size=8 \
! "video/x-raw, width=1920, height=1080" ! tee name=t \
t. ! queue ! imxvpuenc_h264 gop-size=15 idr-interval=15 bitrate=5000 me-search-range=3 ! \
     queue ! rtph264pay config-interval=1 pt=96 ! \
     udpsink clients=192.168.2.108:5006 sync=false -v \
t. ! queue ! imxipuvideotransform ! "video/x-raw, width=1280, height=720" ! \
     queue ! imxvpuenc_h264 gop-size=15 idr-interval=15 bitrate=5000 me-search-range=3 ! \
     queue ! rtph264pay config-interval=1 pt=96 ! \
     udpsink clients=192.168.2.108:5004 sync=false -v

Using the iMX6Q board, I can watch both streams on my Ubuntu build host and see two smooth video streams at a  framerate of ~23 fps:

gst-launch-1.0 udpsrc port=5004 ! \
application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96 ! \
rtph264depay ! decodebin ! fpsdisplaysink sync=false \
udpsrc port=5006 ! \
application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96 ! \
rtph264depay ! decodebin ! fpsdisplaysink sync=false

The mmdc tool from imx-test shows the memory performance:

Avg. Read burst size: 17                                                                                  
Avg. Write burst size: 14                                                                                 
Read: 395.88 MB/s /  Write: 242.08 MB/s  Total: 637.96 MB/s                                               
Utilization: 8%                                                                                           
Overall Bus Load: 91%                                                                                     
Bytes Access: 16    

 

Now, I tried to repeat this setup on my iMX6QP board in hope for a reduced bus load and, maybe, enough headroom for a third (tiny preview) stream. But that failed. The bus load is a little lighter, as expected:

Avg. Read burst size: 17
Avg. Write burst size: 14
Read: 391.10 MB/s / Write: 299.60 MB/s Total: 690.70 MB/s
Utilization: 11%
Overall Bus Load: 76%
Bytes Access: 15

But both streams are showing bad artefacts from time to time.

It looks like missing bursts of uncompressed image data. Both streams are showing identical artefacts, so this could be errors (overruns?) in the stream from the ov5640 sensor to memory.

 

Btw: Dual 1080p streaming works fine, as there is no need for scaling. The VPU is not the bottleneck.

Is there a way to avoid this? Am I doing something wrong? Any debugging aid?

 

Frank

Outcomes