GstNetBalancer/Examples/Basic pipelines: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{GstNetBalancer/Head|previous=|next=|}}
{{GstNetBalancer/Head|previous=Examples|next=Examples/Demo}}
</noinclude>
</noinclude>
{{DISPLAYTITLE:GstNetBalancer - Basic Example pipelines|noerror}}


This page showcases basic usage examples of the '''netbalancer''' element. It uses videotestsrc streaming over different protocols and shows the results of the received  
This page showcases basic usage examples of the '''netbalancer''' element. It uses videotestsrc streaming over different protocols and shows the results of the received  


== udpsink pipeline ==
== udpsink pipeline ==
The following pipeline uses the netbalancer  
The following pipeline uses the netbalancer element before an udpsink element to limit the packet transmission rate. The results of this pipeline compared to not using the netbalancer element are shown in the example section below.
 
For more details on how to choose and interpreter parameters take a look at the [[GstNetBalancer/User_Guide|User Guide]] page.
<pre>
<pre>
gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! udpsink port=3000 host=127.0.0.1 -v
gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! udpsink port=3000 host=127.0.0.1 -v
</pre>
</pre>


The following images show the difference between using the netbalancer and not using it.
== rtspsink pipeline ==
The following pipeline demonstrates that the netbalancer does not depend on the sink element being used since it does not modify packets at all. This uses rtsp for transmission. The rtspsink element is a RidgeRun product sold separately, more information can be found on its own wiki here: [https://developer.ridgerun.com/wiki/index.php/GstRtspSink GstRtspSink]


== rtspsink pipeline ==
<pre>
<pre>
gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! video/x-h264, mapping=/stream1 ! rtspsink service=3000 -v
gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! video/x-h264, mapping=/stream1 ! rtspsink service=3000 -v
</pre>
</pre>


The following images show the difference between using the netbalancer and not using it.
== Example results ==
 
<gallery widths=800px heights=400px>
 
File:Netbalancer udpsink example base.png|Figure 1. Udpsink pipeline without network balancing, 50kB/ms peaks.
*Note: The rtspsink element is a RidgeRun product sold separately, more information can be found on its own wiki here: [https://developer.ridgerun.com/wiki/index.php/GstRtspSink GstRtspSink]
File:Netbalancer udpsink example.png|Figure 2. Udpsink pipeline with network balancing, 1.35kB/ms peaks
</gallery>


<noinclude>
<noinclude>
{{GstNetBalancer/Foot||}}
{{GstNetBalancer/Foot|Examples|Examples/Demo}}
</noinclude>
</noinclude>

Latest revision as of 19:09, 20 October 2022



Previous: Examples Index Next: Examples/Demo






This page showcases basic usage examples of the netbalancer element. It uses videotestsrc streaming over different protocols and shows the results of the received

udpsink pipeline

The following pipeline uses the netbalancer element before an udpsink element to limit the packet transmission rate. The results of this pipeline compared to not using the netbalancer element are shown in the example section below.

For more details on how to choose and interpreter parameters take a look at the User Guide page.

gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! udpsink port=3000 host=127.0.0.1 -v

rtspsink pipeline

The following pipeline demonstrates that the netbalancer does not depend on the sink element being used since it does not modify packets at all. This uses rtsp for transmission. The rtspsink element is a RidgeRun product sold separately, more information can be found on its own wiki here: GstRtspSink

gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! queue ! x264enc key-int-max=30 bitrate=10000 ! queue ! mpegtsmux alignment=7 ! netbalancer bandwidth=12000 distribution-factor=300 min-delay=1000 ! video/x-h264, mapping=/stream1 ! rtspsink service=3000 -v

Example results



Previous: Examples Index Next: Examples/Demo