kernel: LT4 Release xx
omxh264enc -> nvv4l2h264enc
GStreamer User Guide for Jetson
# test your camera
ls /dev/video0
# install v4l2
sudo apt install v4l-utils
# check camera devices
v4l2-ctl --list-formats-ext
# display test
gst-launch-1.0 videotestsrc ! xvimagesink
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, width=1920, height=1080 ! xvimagesink
# check camera available
gst-launch-1.0 nvarguscamerasrc ! fakesink
# export DISPLAY=:0
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=512,framerate=30/1 ! videoconvert ! xvimagesink sync=0
gst-launch-1.0 v4l2src device=/dev/video0 ! nv3dsink
gst-launch-1.0 v4l2src ! nv3dsink
# display camera
export DISPLAY=:0
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=60/1, format=NV12' ! nv3dsink
gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nv3dsink
# x11 display in common linux(`v4l2src` and `xvimagesink`, regardless of Jetson)
gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink
gst-launch-1.0 v4l2src device=/dev/video0 ! nveglglessink
gst-launch-1.0 v4l2src device="/dev/video0" ! "video/x-raw, width=1920, height=1080, format=(string)YUY2" ! xvimagesink -e
gst-launch-1.0 v4l2src device="/dev/video0" ! "video/x-raw, width=1920, height=1080, format=(string)YUY2" ! nv3dsink -e
gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw, width=1920, height=1080, framerate=30/1, format=NV12 ! xvimagesink sync=0
gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw, width=1920, height=1080, framerate=30/1, format=YUY2 ! xvimagesink sync=0
gst-launch-1.0 v4l2src device="/dev/video0" ! videoscale ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! xvimagesink
# save camera to `*.mp4` file
gst-launch-1.0 nvarguscamerasrc num-buffers=2000 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! omxh264enc ! qtmux ! filesink location=test.mp4 -e
gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nvv4l2h264enc maxperf-enable=1 ! h264parse ! qtmux ! filesink location=test.mp4 -e
gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc maxperf-enable=1 ! h264parse ! qtmux ! filesink location=test.mp4 -e
# send camera to rtp stream udp(jetson nano)
OSX_HOST=192.168.31.118
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=60/1, format=NV12' ! omxh264enc insert-sps-pps=true bitrate=16000000 ! rtph264pay ! udpsink port=5000 host=$OSX_HOST
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=60/1, format=NV12' ! omxh264enc insert-sps-pps=true bitrate=16000000 ! rtph264pay ! udpsink port=5000 host=$OSX_HOST
# receive rtp stream udp(mac osx)
gst-launch-1.0 -v udpsrc port=5000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! decodebin ! videoconvert ! fpsdisplaysink text-overlay=false sync=false
# restart camera daemon service if not available(forget close camera,...etc)
sudo systemctl restart nvargus-daemon.service