Using GPU for GMSL Camera Rendering

An alternative way to for gst-launch

If you are using multiple cameras and rendering their video streams on the CPU, you may notice high CPU usage. To reduce this load, consider using an alternative script that utilizes the GPU for rendering.

Below is an example script that initializes a 5MP AC-IMX490 camera using the nvv4l2camerasrc element, which offloads rendering to the GPU:

gnome-terminal -- bash -c \
"gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video$1 ! \
'video/x-raw(memory:NVMM), width=2944, height=1860, framerate=30/1, format=UYVY, interlace-mode=progressive' ! \
nvvidconv top=0 bottom=1860 left=0 right=2880 ! 'video/x-raw(memory:NVMM), width=2880, height=1860' ! \
fpsdisplaysink text-overlay=false video-sink=nv3dsink sync=false -e"

This script demonstrates a more efficient way to initialize and render GMSL camera streams, freeing up CPU resources by leveraging the GPU.

Below pictures shows different usage of CPU/GPU on differnt script

Default script with high CPU usage (8x AC-IMX490)
Alternative Script lower CPU loading (8x AC-IMX490)

Last updated