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

From RidgeRun Developer Connection
Jump to: navigation, search
(Capture and Display)
Line 31: Line 31:
 
''' 1280x720@30 using xvimagesink '''
 
''' 1280x720@30 using xvimagesink '''
  
  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
+
  gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink sync=true
  
 
Performance:
 
Performance:
Line 68: Line 68:
 
''' 1280x720@30 using nv3dsink '''
 
''' 1280x720@30 using nv3dsink '''
  
  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
+
  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:
 
Performance:

Revision as of 12:55, 23 May 2022



Previous: GStreamer Pipelines Index Next: GStreamer Pipelines/H264


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




USB capture

For this section the USB camera LI-10635 was used.


Performance

With the pipeline running, we took the following measurements:

CPU usage:

  • For the CPU percentage utilization, the tegrastats utility is used as follows: sudo tegrastats -readall. 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.


GPU Usage:

  • 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:

  • For the FPS, the 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.

Latency:

  • In the case of the Latency parameter, the 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.

Capture and Display

1280x720@30 using xvimagesink

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

Performance:

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

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:

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

To change the operation mode see the 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:

echo $DISPLAY


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.


Previous: GStreamer Pipelines Index Next: GStreamer Pipelines/H264