Tool/software:
We are using the AM4738 processor to display an analog backup camera onto a 30fps 800x480 resolution LCD. The image is fine until the green / yellow / red backup lines are displayed on top of the image causing unacceptable lag in the camera feed. The issue has been traced to the AYUV alpha conversion. There is no lag when the overlay does not contain the AYUV thereby showing the white background. The lag returns when the AYUV and desired transparency is reinserted into the displayed image.
Any insight into this problem is greatly appreciated.
Below are the gstreamer commands with associated indications of lag
Not laggy: /bin/gst-launch-0.10 -ev v4l2src device=/dev/video0 ! video/x-raw-yuv, format=(fourcc)UYVY ! ffmpegcolorspace ! fbdevsink device=/dev/fb0
Laggy: gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! fbdevsink device=/dev/fb0 sync=false
Also laggy: /bin/gst-launch-0.10 -ev videomixer name=mix ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 filesrc location=/opt/tco/M20_30_right.png ! pngdec ! videoscale ! imagefreeze ffmpegcolorspace ! "video/x-raw-yuv, format=(fourcc)AYUV" ! mix. filesrc location=/opt/tco/M20_left.png ! pngdec ! videoscale ! imagefreeze ! ffmpegcolorspace ! "video/x-raw-yuv, format=(fourcc)AYUV" ! mix. v4l2src device=/dev/video0 ! video/x-raw-yuv, format=(fourcc)UYVY ! ffmpegcolorspace ! "video/x-raw-yuv, format=(fourcc)AYUV" ! mix.
Hi,
The videoconvert plugin or similar plugins are mostly what slows down the pipeline. You may try to add some "queue" elements, for examples,
gst-launch-1.0 -v v4l2src device=/dev/video0 ! queue ! videoconvert ! queue ! fbdevsink device=/dev/fb0 sync=false
Regards,
Jianzhong
The suggested command with queue elements did not work. Is there an alternative to videoconvert or a more processor efficient way of displaying the backup lines?
Hi Brett,
One option would be to use the GPU to color convert and composite the two images then final framebuffer is sent to display. I don't have an example code for the GPU example but it's an alternative.
Regards,
Krunal