YUV camera live streaming using gstreamer


Recently, I have done capturing some frames by using a YUV camera (Output : YUV422 8bit).

It works very well when I used the v4lt-ctl tool like below.

v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=YVYU --stream-mmap --stream-count=1 --stream-to=test.yuv

I opened ‘test.yuv’ file using the 7-yuv viewer and the image was clear.

What I want to do now is live streaming by using gstreamer.

There are lots of gstreamer commands for live streaming however my YUV camera doesn’t seem to work.

I used the basic gstreamer command like below,

gst-launch-1.0 -v v4l2src device="/dev/video0" ! "video/x-raw,width=1920,height=1080, format=YVYU" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvoverlaysink

but I get this error : ‘Internel data stream error.’

Actually, I mostly get this error for other gstreamer commands.

Do you have any ideas on how I could handle this situation?


The format is not included in nvvidconv plugin. The plugin is open source and would need to customize and rebuild the plugins. The source code is in
Jetson Linux R32.7.1 Release Page | NVIDIA Developer
L4T Driver Package (BSP) Sources

Please download the package fitting your release version.

Or may customize nvv4l2camerasrc to support YVYU. Here is a patch for changing to YUYV for reference:
Macrosilicon USB - #5 by DaneLLL


It works very well.

I followed Jetson Nano FAQ that you wrote.

I changed the YUV format as UYVY in my device tree and I can get the live streaming.

I executed the command below.

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY,width=1920,height=1080,framerate=60/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvoverlaysink

Thank you so much.

One more question!

There is a little delay during live streaming.

Do you have some solutions or any suggestion for increasing quality?


The delay may be from the source. You can compare with videotestsrc:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

If you don’t see delay with videotestsrc, it is very likely the delay is from the YUV camera. Can check with the camera vendor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.