Jump to content

GstCUDA - Example: cudamux: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 30: Line 30:


== Mixer CUDA library algorithm ==
== Mixer CUDA library algorithm ==
=== 2x 720p 30fps videotestsrc sources mixed to display (in-place=true) ===
====Example pipeline====
<syntaxhighlight lang=bash>
gst-launch-1.0 cudamux name=cuda in-place=true location=./mixer.so videotestsrc pattern=ball is-live=true ! "video/x-raw,width=1280,height=720,format=I420,framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=1280,height=720,format=I420,framerate=30/1" ! queue ! cuda.sink_0 videotestsrc is-live=true ! "video/x-raw,width=1280,height=720,format=I420,framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=1280,height=720,format=I420,framerate=30/1" ! queue ! cuda.sink_1 cuda. ! perf print-arm-load=true ! nvoverlaysink --gst-debug=0
</syntaxhighlight>
====Performance stats====
<syntaxhighlight lang=bash>
GST-PERF INFO -->  Timestamp: 1:04:41.509928234; Bps: 776; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:42.543376206; Bps: 751; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:43.576504024; Bps: 751; fps: 30.0; CPU: 25; 
GST-PERF INFO -->  Timestamp: 1:04:44.576590298; Bps: 776; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:45.609834937; Bps: 751; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:46.609851679; Bps: 776; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:47.609865921; Bps: 776; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:48.643290399; Bps: 751; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:49.676644357; Bps: 751; fps: 30.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:04:50.709835243; Bps: 751; fps: 30.0; CPU: 24;
</syntaxhighlight>
=== 2x 720p 30fps videotestsrc sources mixed to display (in-place=false) ===
=== 2x 720p 30fps videotestsrc sources mixed to display (in-place=false) ===


Line 51: Line 76:
GST-PERF INFO -->  Timestamp: 21:48:41.411104423; Bps: 751; fps: 30.3; CPU: 25;   
GST-PERF INFO -->  Timestamp: 21:48:41.411104423; Bps: 751; fps: 30.3; CPU: 25;   
GST-PERF INFO -->  Timestamp: 21:48:42.411187827; Bps: 776; fps: 30.0; CPU: 24;  
GST-PERF INFO -->  Timestamp: 21:48:42.411187827; Bps: 776; fps: 30.0; CPU: 24;  
</syntaxhighlight>
===1080p 60fps camera stream + 1080p 60fps videotestsrc sources mixed to display (in-place=true)===
====Example pipeline====
<syntaxhighlight lang=bash>
gst-launch-1.0 cudamux name=cuda in-place=true location=./mixer.so nvcamerasrc queue-size=10 sensor-id=0 fpsRange='60 60' ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! queue ! cuda.sink_0 videotestsrc pattern=ball is-live=true ! "video/x-raw,width=640,height=480,format=I420,framerate=60/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! queue ! cuda.sink_1 cuda. ! perf print-arm-load=true ! nvoverlaysink --gst-debug=0
</syntaxhighlight>
====Performance stats====
<syntaxhighlight lang=bash>
GST-PERF INFO -->  Timestamp: 1:07:52.306338304; Bps: 763; fps: 60.3; CPU: 25; 
GST-PERF INFO -->  Timestamp: 1:07:53.306388795; Bps: 776; fps: 60.0; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:07:54.322402666; Bps: 763; fps: 60.3; CPU: 28; 
GST-PERF INFO -->  Timestamp: 1:07:55.322446073; Bps: 776; fps: 60.0; CPU: 28; 
GST-PERF INFO -->  Timestamp: 1:07:56.322744529; Bps: 776; fps: 60.0; CPU: 27; 
GST-PERF INFO -->  Timestamp: 1:07:57.340534213; Bps: 763; fps: 59.98; CPU: 25; 
GST-PERF INFO -->  Timestamp: 1:07:58.356490895; Bps: 764; fps: 60.9; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:07:59.372619293; Bps: 763; fps: 60.3; CPU: 25; 
GST-PERF INFO -->  Timestamp: 1:08:00.389454663; Bps: 763; fps: 60.3; CPU: 24; 
GST-PERF INFO -->  Timestamp: 1:08:01.406149096; Bps: 763; fps: 60.3; CPU: 22; 
</syntaxhighlight>
</syntaxhighlight>


Line 75: Line 125:
GST-PERF INFO -->  Timestamp: 22:05:04.659751376; Bps: 763; fps: 60.3; CPU: 36;   
GST-PERF INFO -->  Timestamp: 22:05:04.659751376; Bps: 763; fps: 60.3; CPU: 36;   
GST-PERF INFO -->  Timestamp: 22:05:05.660301596; Bps: 776; fps: 60.0; CPU: 36;
GST-PERF INFO -->  Timestamp: 22:05:05.660301596; Bps: 776; fps: 60.0; CPU: 36;
</syntaxhighlight>
=== 2x 1080p 60fps camera streams mixed to display (in-place=true) ===
'''Note:''' We only use one camera source that is splitted in two sources by a tee element. One of the video source input branches is flipped by 180 degrees, so the resultant image is a combination of the input image with the same image rotated.
====Example pipeline====
<syntaxhighlight lang=bash>
gst-launch-1.0 cudamux name=cuda in-place=true location=./mixer.so nvcamerasrc queue-size=10 sensor-id=0 fpsRange='60 60' ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! tee name=t t.src_0 ! nvvidconv ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! queue ! cuda.sink_0 t.src_1 ! nvvidconv flip-method=2 ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=I420,framerate=60/1" ! queue ! cuda.sink_1 cuda. ! perf print-arm-load=true ! nvoverlaysink --gst-debug=0
</syntaxhighlight>
====Performance stats====
<syntaxhighlight lang=bash>
GST-PERF INFO -->  Timestamp: 1:09:00.057598052; Bps: 776; fps: 60.0; CPU: 7; 
GST-PERF INFO -->  Timestamp: 1:09:01.058253501; Bps: 776; fps: 60.0; CPU: 15; 
GST-PERF INFO -->  Timestamp: 1:09:02.073875844; Bps: 764; fps: 60.9; CPU: 13; 
GST-PERF INFO -->  Timestamp: 1:09:03.073878080; Bps: 776; fps: 60.0; CPU: 14; 
GST-PERF INFO -->  Timestamp: 1:09:04.074694842; Bps: 776; fps: 60.0; CPU: 13; 
GST-PERF INFO -->  Timestamp: 1:09:05.090132409; Bps: 764; fps: 60.9; CPU: 13; 
GST-PERF INFO -->  Timestamp: 1:09:06.090189398; Bps: 776; fps: 60.0; CPU: 12; 
GST-PERF INFO -->  Timestamp: 1:09:07.091822777; Bps: 775; fps: 59.94; CPU: 15; 
GST-PERF INFO -->  Timestamp: 1:09:08.108071701; Bps: 763; fps: 60.3; CPU: 12; 
GST-PERF INFO -->  Timestamp: 1:09:09.123598348; Bps: 764; fps: 60.9; CPU: 14; 
</syntaxhighlight>
</syntaxhighlight>


Line 100: Line 176:
GST-PERF INFO -->  Timestamp: 22:29:44.606635721; Bps: 763; fps: 60.3; CPU: 26;   
GST-PERF INFO -->  Timestamp: 22:29:44.606635721; Bps: 763; fps: 60.3; CPU: 26;   
GST-PERF INFO -->  Timestamp: 22:29:45.606758423; Bps: 776; fps: 60.0; CPU: 25;
GST-PERF INFO -->  Timestamp: 22:29:45.606758423; Bps: 776; fps: 60.0; CPU: 25;
</syntaxhighlight>
===2x 4K 60fps camera streams camera streams mixed to display (in-place=true)===
====Example pipeline====
<syntaxhighlight lang=bash>
gst-launch-1.0 cudamux name=cuda in-place=true location=./mixer.so nvcamerasrc queue-size=10 sensor-id=0 fpsRange='60 60' ! "video/x-raw(memory:NVMM),width=3840,height=2160,format=I420,framerate=60/1" ! tee name=t t.src_0 ! nvvidconv ! "video/x-raw(memory:NVMM),width=3840,height=2160,format=I420,framerate=60/1" ! queue ! cuda.sink_0 t.src_1 ! nvvidconv flip-method=2 ! "video/x-raw(memory:NVMM),width=3840,height=2160,format=I420,framerate=60/1" ! queue ! cuda.sink_1 cuda. ! perf print-arm-load=true ! nvoverlaysink --gst-debug=0
</syntaxhighlight>
====Performance stats====
<syntaxhighlight lang=bash>
GST-PERF INFO -->  Timestamp: 1:09:53.580481344; Bps: 776; fps: 60.0; CPU: 16; 
GST-PERF INFO -->  Timestamp: 1:09:54.596964159; Bps: 763; fps: 60.3; CPU: 18; 
GST-PERF INFO -->  Timestamp: 1:09:55.612936985; Bps: 764; fps: 60.9; CPU: 17; 
GST-PERF INFO -->  Timestamp: 1:09:56.613082828; Bps: 776; fps: 60.0; CPU: 20; 
GST-PERF INFO -->  Timestamp: 1:09:57.622503818; Bps: 769; fps: 59.46; CPU: 18; 
GST-PERF INFO -->  Timestamp: 1:09:58.634003692; Bps: 767; fps: 59.34; CPU: 18; 
GST-PERF INFO -->  Timestamp: 1:09:59.646157364; Bps: 766; fps: 59.28; CPU: 16; 
GST-PERF INFO -->  Timestamp: 1:10:00.657026108; Bps: 768; fps: 59.40; CPU: 15; 
GST-PERF INFO -->  Timestamp: 1:10:01.667696004; Bps: 768; fps: 59.40; CPU: 18; 
GST-PERF INFO -->  Timestamp: 1:10:02.680801291; Bps: 766; fps: 59.23; CPU: 17; 
</syntaxhighlight>
</syntaxhighlight>


1,433

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.