USB 2.0 Cam Jetson Nano 4GB B0 Model RTMP

H all

I just got hold of my first Jetson Nano 4GB Dev Kit a few days ago and was searching on how to shove a stream out from my old USB 2.0 /dev/video0 camera and was able to get it working with the following. I am working with the non-standard Xubuntu 20,04.

before I got started I used this command to see what my camera can do
v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'YUYV' (YUYV 4:2:2)
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 352x288
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 176x144
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 160x120
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 800x600
			Interval: Discrete 0.100s (10.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 1280x960
			Interval: Discrete 0.133s (7.500 fps)
			Interval: Discrete 0.200s (5.000 fps)
		Size: Discrete 1280x1024
			Interval: Discrete 0.133s (7.500 fps)
			Interval: Discrete 0.200s (5.000 fps)
		Size: Discrete 1600x1200
			Interval: Discrete 0.200s (5.000 fps)
			Interval: Discrete 0.400s (2.500 fps)
	[1]: 'MJPG' (Motion-JPEG, compressed)
		Size: Discrete 640x480
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 352x288
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 176x144
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 160x120
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 800x600
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 1280x960
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 1280x1024
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
		Size: Discrete 1600x1200
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.133s (7.500 fps)

Still trying to figure out the MJPG side of things, just happy to explore it for now.

I used the following to sink RTMP out to my Nginx Server.

gst-launch-1.0 -e v4l2src device=/dev/video0 do-timestamp=true ! video/x-raw,width=640,height=480,framerate=30/1,format=YUY2 ! nvvidconv ! omxh264enc ! flvmux ! queue max-size-buffers=10 max-size-bytes=0 max-size-time=0 ! rtmpsink location="rtmp://private IP/live/test"

I am still messing around with it and seeing what I can do, hope it helps someone else to get a simple RTMP out to an Nginx server.

Hi,
Thanks for the sharing. Since we have deprecated omx plugins, please run with nvv4l2h264enc:

gst-launch-1.0 -e v4l2src device=/dev/video0 do-timestamp=true ! video/x-raw,width=640,height=480,framerate=30/1,format=YUY2 ! nvvidconv ! nvv4l2h264enc ! h264parse ! flvmux ! queue max-size-buffers=10 max-size-bytes=0 max-size-time=0 ! rtmpsink location="rtmp://private IP/live/test"
1 Like

Thanks for the heads up, I was about to test that and for some reason, my ethernet port failed. I did an RMA back to Nvidia. I will try this out when I get my replacemen.