Difference between revisions of "NVIDIA Jetson Orin/GStreamer Pipelines/Capture and Display"

From RidgeRun Developer Connection
Jump to: navigation, search
m
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{NVIDIA Jetson Orin/Head|previous=GStreamer Pipelines|next=GStreamer Pipelines/H264|keywords=gstreamer,gstreamer pipelines,capture,display,capture and display}}
+
{{NVIDIA Jetson Orin/Head|previous=GStreamer Pipelines|next=GStreamer Pipelines/H264|metakeywords=gstreamer,gstreamer pipelines,capture,display,capture and display}}
 
</noinclude>
 
</noinclude>
  
== USB capture ==
+
{{DISPLAYTITLE:NVIDIA Jetson Orin - Capture and Display GStreamer Pipelines |noerror}}
For this section the USB camera LI-10635 was used.
 
  
 +
__toc__
  
===Performance===
 
  
With the pipeline running, we took the following measurements:
+
This section presents GStreamer pipelines to capture from MIPI CSI-2 and USB cameras and render the video to the display connected to the Orin. Key performance indicators are measured using three power profiles (operation modes). Check our [[NVIDIA_Jetson_Orin/GStreamer_Pipelines|GStreamer Pipelines]] section to find more information about how we extracted the performance metrics presented in this section.
  
'''CPU usage:'''
 
* For the CPU percentage utilization, the tegrastats utility is used as follows: <code> sudo tegrastats -readall</code>. This command shows the percentage utilization of the 12 cores that the Jetson AGX Orin devkit has. For the measurement, we compute the average over 30 samples of the utilization values for the CPU cores.
 
  
{{Review| Reword: For the measurement, we compute the average over 30 samples of the utilization values for the CPU cores.|jcaballero}}
+
==MIPI CSI-2 Camera==
 +
For the pipelines in this section, we used the IMX477 camera.
  
  
'''GPU Usage:'''
+
===1920x1080@30 using nv3dsink===
* The same is done in the case of GPU percentage. The board has 2 GPUs. So, 30 values of each one are taken, and then, the average is obtained.
 
  
'''FPS:'''
+
The pipeline below captures and renders the video to the display connected to the Orin AGX using the nv3dsink element. Table 1 shows the performance metrics for this pipeline.
* For the FPS, the [https://github.com/RidgeRun/gst-perf RidgeRun gst-perf plugin] is used. This plugin computes the FPS means. For the measurement, we compute the average over 30 samples of the FPS means values.
 
{{Review| Reword |jcaballero}}
 
  
'''Latency:'''
+
<pre>
* In the case of the Latency parameter, the [https://developer.ridgerun.com/wiki/index.php?title=GstShark RidgeRun GstShark plugin] is used. For this measurement, it is important to take into account that the measurement is not a glass to glass calculation. What GstShark does is give the time needed by a buffer for travel from the source pad of the source element to the source pad of the remaining elements of the pipeline.
+
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' ! nv3dsink
 +
</pre>
 +
 
 +
 
 +
{| class="wikitable" style="margin: auto;"
 +
|+ Table 1: Performance of pipeline at 1920x1080@30 using nv3dsink
 +
|-
 +
! Operation Mode
 +
! CPU (%)
 +
! GPU 1 (%)
 +
! GPU 2 (%)
 +
! FPS
 +
! latency (ms)
 +
|-
 +
| 0 (max performance)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| 1 (min power)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| 2 (30W)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|}
 +
 
 +
 
 +
 
 +
===1920x1080@30 using xvimagesink===
 +
 
 +
The pipeline below captures and renders the video to the display connected to the Orin AGX, using the xvimagesink element. Table 2 shows the performance metrics for this pipeline.
 +
 
 +
<pre>
 +
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink
 +
</pre>
 +
 
 +
{| class="wikitable" style="margin: auto;"
 +
|+ Table 2: Performance of pipeline at 1920x1080@30 using xvimagesink
 +
|-
 +
! Operation Mode
 +
! CPU (%)
 +
! GPU 1 (%)
 +
! GPU 2 (%)
 +
! FPS
 +
! latency (ms)
 +
|-
 +
| 0 (max performance)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| 1 (min power)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| 2 (30W)
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|}
 +
 
 +
 
 +
 
 +
== USB Camera ==
 +
For the pipelines in this section, we used the LI-10635 USB camera.  
 +
 
 +
 
 +
===1280x720@30 using xvimagesink===
  
=== Capture and Display ===
+
The pipeline below captures and renders the video to the display connected to the Orin AGX, using the xvimagesink element. Table 3 shows the performance metrics for this pipeline.
  
''' 1280x720@30 using xvimagesink '''
+
<pre>
 +
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink
 +
</pre>
  
DISPLAY=:0 GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink sync=true
 
  
Performance:
+
{| class="wikitable" style="margin: auto;"
{| class="wikitable" style="margin-right: 22em;"
 
 
|-
 
|-
 +
|+ Table 3: Performance of pipeline at 1280x720@30 using xvimagesink
 
! Operation Mode  
 
! Operation Mode  
 
! CPU (%)
 
! CPU (%)
Line 66: Line 146:
  
  
''' 1280x720@30 using nv3dsink '''
+
===1280x720@30 using nv3dsink===
 +
 
 +
 
 +
The pipeline below captures and renders the video to the display connected to the Orin AGX, using the nv3dsink element. Table 4 shows the performance metrics for this pipeline.
 +
 
 +
<pre>
 +
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! nv3dsink
 +
</pre>
  
DISPLAY=:0 GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! nv3dsink sync=true
 
  
Performance:
+
{| class="wikitable" style="margin: auto;"
{| class="wikitable" style="margin-right: 22em;"
+
|+ Table 4: Performance of pipeline at 1280x720@30 using nv3dsink
 
|-
 
|-
 
! Operation Mode  
 
! Operation Mode  
Line 102: Line 188:
 
|}
 
|}
  
To change the operation mode see the [https://developer.ridgerun.com/wiki/index.php/NVIDIA_Jetson_Orin/JetPack_5.0/Performance_Tuning/Tuning_Power Performance Tuning - Tuning Power] section.
 
 
=== Remote usage ===
 
 
In case you would to work with the board in a remote way, you need to know the '''DISPLAY''' environment variable. For this, before you continue working in a remote way, you need to connect a mouse and keyboard to the board, open a terminal and  look for the '''DISPLAY''' variable as follows:
 
 
<pre>
 
echo $DISPLAY
 
</pre>
 
<noinclude>
 
 
After doing the above step, you can run the GStreamer Pipeline as such as:
 
 
DISPLAY=:0 GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink
 
 
For example.
 
  
 
{{NVIDIA Jetson Orin/Foot|GStreamer Pipelines|GStreamer Pipelines/H264}}
 
{{NVIDIA Jetson Orin/Foot|GStreamer Pipelines|GStreamer Pipelines/H264}}
 
</noinclude>
 
</noinclude>

Latest revision as of 04:54, 11 February 2023



Previous: GStreamer Pipelines Index Next: GStreamer Pipelines/H264


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






This section presents GStreamer pipelines to capture from MIPI CSI-2 and USB cameras and render the video to the display connected to the Orin. Key performance indicators are measured using three power profiles (operation modes). Check our GStreamer Pipelines section to find more information about how we extracted the performance metrics presented in this section.


MIPI CSI-2 Camera

For the pipelines in this section, we used the IMX477 camera.


1920x1080@30 using nv3dsink

The pipeline below captures and renders the video to the display connected to the Orin AGX using the nv3dsink element. Table 1 shows the performance metrics for this pipeline.

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' ! nv3dsink


Table 1: Performance of pipeline at 1920x1080@30 using nv3dsink
Operation Mode CPU (%) GPU 1 (%) GPU 2 (%) FPS latency (ms)
0 (max performance)
1 (min power)
2 (30W)


1920x1080@30 using xvimagesink

The pipeline below captures and renders the video to the display connected to the Orin AGX, using the xvimagesink element. Table 2 shows the performance metrics for this pipeline.

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink
Table 2: Performance of pipeline at 1920x1080@30 using xvimagesink
Operation Mode CPU (%) GPU 1 (%) GPU 2 (%) FPS latency (ms)
0 (max performance)
1 (min power)
2 (30W)


USB Camera

For the pipelines in this section, we used the LI-10635 USB camera.


1280x720@30 using xvimagesink

The pipeline below captures and renders the video to the display connected to the Orin AGX, using the xvimagesink element. Table 3 shows the performance metrics for this pipeline.

 gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink


Table 3: Performance of pipeline at 1280x720@30 using xvimagesink
Operation Mode CPU (%) GPU 1 (%) GPU 2 (%) FPS latency (ms)
0 (max performance) 32.27 22.2 23.87 30.01 0.13
1 (min power) 23.97 6.27 63.4 30.01 0.13
2 (30W) 27.6 5.87 64.87 30.01 0.16


1280x720@30 using nv3dsink

The pipeline below captures and renders the video to the display connected to the Orin AGX, using the nv3dsink element. Table 4 shows the performance metrics for this pipeline.

 gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! nv3dsink


Table 4: Performance of pipeline at 1280x720@30 using nv3dsink
Operation Mode CPU (%) GPU 1 (%) GPU 2 (%) FPS latency (ms)
0 (max performance) 24.5 31.33 28.27 30.01 1.92
1 (min power) 32.87 17.93 52.17 30.01 2.47
2 (30W) 28.5 14.9 52.63 30.01 2.34



Previous: GStreamer Pipelines Index Next: GStreamer Pipelines/H264