NVIDIA Xavier - GStreamer Pipelines

From RidgeRun Developer Connection
< Xavier
Revision as of 12:24, 12 October 2018 by Emadrigal (talk | contribs) (Created page with "<noinclude> {{Xavier/Head}} </noinclude> <!-- If you want a custom title for the page, un-comment and edit this line: {{DISPLAYTITLE:NVIDIA Jetson Xavier - <descriptive page n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



  Index  



Nvidia-preferred-partner-badge-rgb-for-screen.png



Capture

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' \
! fakesink silent=false -v

Capture and Display

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' \
! nvoverlaysink

H264

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' \
! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' \
! h264parse ! qtmux ! filesink location=$FILE -e

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 name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! nvoverlaysink -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' \
! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' \
! h264parse ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false

PC client

server:

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

Latency

  • 1080p@30fps
  • H264
  • Bitrate 4Mbps
  • Latency=216ms

VP9

VP9 encoding

FILE=filename.mkv
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' ! omxvp9enc ! matroskamux ! filesink location=$FILE -e

VP9 decoding

FILE=filename.mkv
gst-launch-1.0 filesrc location=$FILE ! matroskademux name=demux demux.video_0 ! queue ! omxvp9dec ! nvoverlaysink

H265

H265 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' \
! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE -e

Dual H265 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. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_A \
streams. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_B

H265 decoding

FILE=filename.mp4
gst-launch-1.0 filesrc location=$FILE ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e

H265 UDP Streaming

Server

CLIENT_IP=127.0.0.1
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' ! omxh265enc control-rate=2 bitrate=4000000 ! 'video/x-h265, stream-format=(string)byte-stream' \
! h265parse ! rtph265pay 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=H265,payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 \
! xvimagesink sync=false async=false -e

Latency

  • 1080p@30fps
  • H265
  • Bitrate 4Mbps
  • Latency=255ms

MPEG-4

MPEG-4 Decode

FILE=filename.mp4
gst-launch-1.0 -e filesrc location=$FILE  ! qtdemux name=demux demux.video_0 ! queue ! mpeg4videoparse ! omxmpeg4videodec ! nvoverlaysink -e



[[Xavier/<Replace with "previous" page>|Previous: <Replace with "previous" page>]] Index [[Xavier/<Replace with "next" page>|Next: <Replace with "next" page>]]