Camera stream format conversion by H/W acceleration

Hi,

I’m trying to get this pipeline done and work via gstreamer.

gst-launch-1.0 v4l2src ! 'video/x-h264, width=1920, height=1080, framerate=60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420, width=1920, height=1080, framerate=60/1'

Which I’d like to do is using USB3.0 camera to grab the video frame through v4l2. But the camera output format may be MJPEG,H.264,RGB16,RGB32. It depends on which camera we choose. We’d like to use TX1/2 to convert(decode) the video stream format to I420(YUV420 format)by HW acceleration and save it to a file for several seconds.

So, is there any chance to choose one of the cameras which I listed to get this done?
Any suggestion is highly appreciated.

Hi Roland,
Please try

gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=30 ! 'video/x-h264' ! h264parse ! omxh264dec ! nvvidconv ! 'video/x-raw,format=I420' ! filesink location=dump.yuv

Hi,

Thanks for your feedback. I’ll try H.264 camera later.
I tried MJPEG output camera with this command, but it seems not working.

gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=120 ! image/jpeg, width=1280, height=720, framerate=60/1 ! jpegparse ! jpegdec ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! videoconvert ! filesink location=test.yuv -e

Output data is wrong, and I don’t know whether my command is wrong or not.
Could you help me clarify this also? Thanks.

Hi Roland, please try
gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=120 ! image/jpeg, width=1280, height=720 ! jpegparse ! jpegdec ! videoconvert ! ‘video/x-raw,format=I420’ ! filesink location=dump.yuv

It works well. Thank you very much.
I’ll keep working on it.

Hi DaneLLL,

Thanks for your support.

But we’d like to apply new camera to evaluation.
Camera 1 supports RGB32, YUV411.
I tried these command, but it shows v4l2src0: Internal data flow error. Please help me correct it.

1. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw, format=(string)RGBA, width=1920, height=1080' ! videoconvert ! 'video/x-raw,format=I420' ! filesink location=dump.yuv
2. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw, format=(string)RGBA, width=1920, height=1080' ! videoconvert ! xvimagesink

Camera 2 supports RGB bayer
I tried these command, but it shows v4l2src0: Internal data flow error. Please help me correct it.

gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-bayer, width=1280, height=720' ! bayer2rgb ! videoconvert ! xvimagesink

Any suggestion?
I’ll appreciate.

Hi Roland,
v4l2src is not developed by NVIDIA. For issues about it, please raise it here http://gstreamer-devel.966125.n4.nabble.com/