Jetson Nano/Gstreamer/Example Pipelines/Streaming: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{JetsonNano/Head|previous=Gstreamer/Example_Pipelines/Decoding|next=Contact_Us|keywords=gstreamer,gstreamer pipelines}}
{{JetsonNano/Head|previous=Gstreamer/Example_Pipelines/Decoding|next=Gstreamer/Example_Pipelines/Transforming|metakeywords=gstreamer,gstreamer pipelines,streaming,RTP streaming,H264,VP8,H265,OMX Sender,V4L2 Sender,PC Client||title=NVIDIA Jetson Nano GStreamer streaming pipelines|metadescription=This page provides the gstreamer example pipelines for H264, H265 and VP8 streaming using OMX and V4L2 interface on Jetson platform.}}
</noinclude>
</noinclude>


=UDP Streaming=
<table>
<tr>
<td><div class="clear; float:right">__TOC__</div></td>
<td valign=top>
{{GStreamer debug}}
</td>
</table>


== H.264 ==
==RTP Streaming==


=== OMX Sender ===
=== H.264 ===
 
==== OMX Sender ====
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
CLIENT_IP=<IP_ADDRESS>
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'
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
! h264parse ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
</pre>


=== V4L2 Sender ===
==== V4L2 Sender ====


<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
CLIENT_IP=<IP_ADDRESS>
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
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
</pre>


=== PC Client ===
==== PC Client ====
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
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
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
</pre>
</pre>


==H.265==
===H.265===


===OMX Serder ===
====OMX Serder ====


<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
CLIENT_IP=127.0.0.1
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' ! 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-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! omxh265enc control-rate=2 bitrate=8000000  ! video/x-h265, stream-format=byte-stream ! rtph265pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
</pre>


===V4L2===
====V4L2 Serder====


<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
CLIENT_IP=<IP_ADDRESS>
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' ! nvv4l2h265enc bitrate=8000000 ! h265parse ! rtph265pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvv4l2h265enc bitrate=8000000 ! rtph265pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
</pre>


===PC Client===
====PC Client====
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
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
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
</pre>
</pre>


===VP8===
====OMX Serder ====
<pre style="background:#d6e4f1">
CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxvp8enc ! rtpvp8pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
====V4L2 Serder====
<pre style="background:#d6e4f1">
CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2vp8enc ! rtpvp8pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
</pre>
====PC Client====
<pre style="background:#d6e4f1">
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=VP8,payload=96 ! rtpvp8depay ! queue ! avdec_vp8 ! xvimagesink sync=false async=false
</pre>
==RTSP Streaming ==
For RTSP streaming we use RidgeRun rtspsink element, for more information visit: [[GstRtspSink| RidgeRun GstRtspSink ]]
=== H.264 ===
==== OMX Sender ====
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, mapping=/stream1 ! rtspsink service=5000
</pre>
==== V4L2 Sender ====
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! video/x-h264, mapping=/stream1 ! rtspsink service=5000
</pre>
==== PC Client ====
<pre style="background:#d6e4f1">
IP_ADDRESS=<board IP address>
PORT=5000
MAPPING=/stream1
vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}
</pre>
=== VP8 ===
==== OMX Sender ====
<pre style="background:#d6e4f1">
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxvp8enc ! video/x-vp8, mapping=/stream1 ! rtspsink service=5000
</pre>
==== V4L2 Sender ====
<pre style="background:#d6e4f1">
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2vp8enc ! video/x-vp8, mapping=/stream1 ! rtspsink service=5000
</pre>
==== PC Client ====
<pre style="background:#d6e4f1">
IP_ADDRESS=<board IP address>
PORT=5000
MAPPING=/stream1
vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}
</pre>


<noinclude>
<noinclude>
{{JetsonNano/Foot|Gstreamer/Example_Pipelines/Decoding|Contact_Us}}
{{JetsonNano/Foot|Gstreamer/Example_Pipelines/Decoding|Gstreamer/Example_Pipelines/Transforming}}
</noinclude>
</noinclude>

Latest revision as of 11:03, 10 February 2023



Previous: Gstreamer/Example_Pipelines/Decoding Index Next: Gstreamer/Example_Pipelines/Transforming





Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.

RTP Streaming

H.264

OMX Sender

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false

V4L2 Sender

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! 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

H.265

OMX Serder

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! omxh265enc control-rate=2 bitrate=8000000  ! video/x-h265, stream-format=byte-stream ! rtph265pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false

V4L2 Serder

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvv4l2h265enc bitrate=8000000 ! 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


VP8

OMX Serder

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxvp8enc ! rtpvp8pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false

V4L2 Serder

CLIENT_IP=<IP_ADDRESS>
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2vp8enc ! rtpvp8pay 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=VP8,payload=96 ! rtpvp8depay ! queue ! avdec_vp8 ! xvimagesink sync=false async=false

RTSP Streaming

For RTSP streaming we use RidgeRun rtspsink element, for more information visit: RidgeRun GstRtspSink

H.264

OMX Sender

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, mapping=/stream1 ! rtspsink service=5000

V4L2 Sender

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! video/x-h264, mapping=/stream1 ! rtspsink service=5000

PC Client

IP_ADDRESS=<board IP address>
PORT=5000
MAPPING=/stream1

vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}


VP8

OMX Sender

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxvp8enc ! video/x-vp8, mapping=/stream1 ! rtspsink service=5000

V4L2 Sender

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2vp8enc ! video/x-vp8, mapping=/stream1 ! rtspsink service=5000

PC Client

IP_ADDRESS=<board IP address>
PORT=5000
MAPPING=/stream1

vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}


Previous: Gstreamer/Example_Pipelines/Decoding Index Next: Gstreamer/Example_Pipelines/Transforming