NVIDIA Jetson Xavier - H265 encoding, decoding and streaming pipelines

From RidgeRun Developer Connection
Jump to: navigation, search



Previous: GStreamer Pipelines/H264 Index Next: GStreamer Pipelines/VP9



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




H265 encoding

gst-OMX

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' ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE -e

gst-V4L2

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' \
! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE -e

Dual H265 encoding

gst-OMX

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

gst-V4L2

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' ! tee name=streams \
streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_A \
streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_B

H265 decoding

gst-OMX

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

gst-V4L2

FILE=filename.mp4
gst-launch-1.0 filesrc location=$FILE ! qtdemux ! queue ! h265parse ! nvv4l2decoder ! nv3dsink -e

H265 UDP Streaming

Server

gst-OMX

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

gst-V4L2

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' \
! nvv4l2h265enc bitrate=8000000 ! 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 OMX

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



Previous: GStreamer Pipelines/H264 Index Next: GStreamer Pipelines/VP9