Jetson TX2 GStreamer streaming pipelines for Jetpack prior to 4.2
|
RTP Streaming
H.264
- Server:
CLIENT_IP=<IP_ADDRESS> gst-launch-1.0 nvcamerasrc fpsRange="30 30" intent=3 ! nvvidconv flip-method=6 \ ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! \ 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:
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
Using VLC
- Server:
CLIENT_IP=<IP_ADDRESS> gst-launch-1.0 nvcamerasrc fpsRange="30 30" intent=3 ! nvvidconv flip-method=6 \ ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! \ 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
- Client:
vlc -vv --demux h264 --h264-fps 60 udp://@:5000
h264 parse missing
In case gstreamer complains when running the pipeline for missing the h264parse plugin, run the following command to install it:
sudo apt-get install gstreamer1.0-plugins-bad
Latency
- 1080p30
- H264
- Bitrate 4Mbps
- Latency=138ms
H.265
In order to start streaming H265 you need the h265 payloader, to do this you need to compile the latest version of GStreamer in your Jetson TX2 module. Please follow the instructions to do it. The same instructions can be run on your PC if you want to update the GStreamer version in your host. (in the case of the host I had to recompile the good plugins to get the rtph265pay).
Currently, it is not possible to receive the stream using the PC because there is not a h265 decoder available on GStreamer. In order to evaluate the performance let's receive the stream on the Jetson module as well.
export PKG_CONFIG_PATH=/home/$USER/gst_$VERSION/out/lib/pkgconfig VERSION=1.8.0 export LD_LIBRARY_PATH=/home/$USER/gst_$VERSION/out/lib/
- Server
CLIENT_IP=<IP_ADDRESS> gst-launch-1.0 nvcamerasrc fpsRange="30 30" intent=3 ! nvvidconv flip-method=6 \ ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! \ omxh265enc low-latency=1 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
- Client
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay \ ! h265parse ! queue ! omxh265dec ! nvoverlaysink sync=false async=false -e
Latency
- 1080p30
- H265
- Bitrate 4Mbps
- Latency=251ms