Jetson Nano- Encode GStreamer Pipelines
NVIDIA®Jetson Nano™ | |||
---|---|---|---|
![]() | |||
Introduction | |||
|
|||
Development | |||
|
|||
GStreamer | |||
|
|||
Contact Us |
H.264 Encode
OMX
From videotestsrc
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1920, height=1080 ! omxh264enc ! qtmux ! perf ! filesink location=test.mp4
From camera
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! nvvidconv ! omxh264enc ! qtmux ! filesink location=test.mp4 -e
V4L2
H264 Encoding
FILE=filename.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2h264enc bitrate=8000000 ! h264parse ! qtmux ! filesink location=$FILE
Dual H264 Encoding
FILE_A=filenameA.mp4 FILE_B=filenameB.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_A streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_B
H264 Decoding
FILE=filename.mp4 gst-launch-1.0 filesrc location=$FILE ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nv3dsink -e
H264 UDP Streaming
Server:
CLIENT_IP=<IP_ADDRESS> gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2h264enc bitrate=8000000 ! h264parse ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
PC Client
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! xvimagesink sync=false async=false -e