GStreamer Video Stabilizer for NVIDIA Jetson Boards/Performance/TX1/TX2: Difference between revisions
(→GPU) |
mNo edit summary |
||
(23 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{GStreamer Video Stabilizer for NVIDIA Jetson Boards/Head|previous=Performance|next=Performance/Xavier| | {{GStreamer Video Stabilizer for NVIDIA Jetson Boards/Head|previous=Performance|next=Performance/Xavier|metakeywords=TX1/TX2 pipelines performance, Xavier pipelines performance, examples, performance analysis, GstNvStabilize performance, GstNvStabilize performance analysis, CPU performance, GPU performance, TX1/TX2 performance}} | ||
</noinclude> | </noinclude> | ||
The following section describes some relevant performance measurements during video stabilization for a few standard resolutions. It begins with a summary of the results detailed | The following section describes some relevant performance measurements during video stabilization for a few standard resolutions. It begins with a summary of the results detailed in the following sections, as well as the pipelines used to capture such results. | ||
__TOC__ | __TOC__ | ||
= Summary = | == Summary == | ||
== Benchmarking == | === Benchmarking === | ||
=== Standalone element === | ==== Standalone element ==== | ||
==== | ===== Test Conditions ===== | ||
The following measurements were taken with the board on high-performance mode enabled, which was attained by running the following commands: | |||
<syntaxhighlight lang=bash> | |||
sudo nvpmodel -m 0 | |||
sudo jetson_clocks | |||
</syntaxhighlight> | |||
All the measurements bellow where made using the following minimal pipeline. | All the measurements bellow where made using the following minimal pipeline. | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
PATH_TO_FILE=path_to_file.rgba | PATH_TO_FILE=path_to_file.rgba | ||
Line 25: | Line 29: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note that this pipeline attempts to be as the least invasive as possible so the only processing element is GstNvStabilize. | |||
{| class="wikitable" | ===== Maximum and minimum framerate ===== | ||
These measurements were taken with the pipeline above, but without any limitation regarding to the framerate. In the next table, you can find the maximum, minimum, and average framerate for video input and different resolution stabilized by the plugin. | |||
{| class="wikitable" style="margin: 1em auto 1em auto" | |||
|- | |||
! Resolution !! Maximum framerate !! Minimum framerate !! Average | |||
|- | |||
| 640x480 || 78.37 || 53.94 || 72.20 | |||
|- | |||
| 1280x720 || 49.11 || 39.25 || 46.62 | |||
|- | |||
| 1920x1080 || 23.62 || 17.54 || 21.84 | |||
|- | |||
| 3840×2160 || 11.86 || 5.96 || 7.22 | |||
|} | |||
<!----- | |||
<span style="color:red"> '''Note:''' To take into account the framerate relies on the movement of the video. </span> | |||
----> | |||
{{Ambox | |||
|type=notice | |||
|small=left | |||
|issue=''' To take into account the framerate relies on the movement of the video.''' | |||
|style=width:unset; | |||
}} | |||
[[File:Max-min-framerate-tx2.png|frame|center|Maximum and minimum framerate for different resolutions.]] | |||
===== CPU ===== | |||
{| class="wikitable" style="margin: 1em auto 1em auto" | |||
|- | |- | ||
! Resolution !! CPU 0 !! CPU 1 !! CPU 2 !! CPU 3 !! CPU4 !! CPU5 !! Average (reported by top) | ! Resolution !! CPU 0 !! CPU 1 !! CPU 2 !! CPU 3 !! CPU4 !! CPU5 !! Average (reported by top) | ||
Line 45: | Line 79: | ||
[[File:Cpu tx2.png|frame|center|Cpu usage for different resolutions.]] | [[File:Cpu tx2.png|frame|center|Cpu usage for different resolutions.]] | ||
==== GPU ==== | ===== GPU ===== | ||
{| class="wikitable" | {| class="wikitable" style="margin: 1em auto 1em auto" | ||
|- | |- | ||
! Resolution !! GPU | ! Resolution !! GPU | ||
Line 61: | Line 95: | ||
[[File:GPU tx2.png|frame|center|GPU usage for different resolutions.]] | [[File:GPU tx2.png|frame|center|GPU usage for different resolutions.]] | ||
==== RAM ==== | ===== RAM ===== | ||
{| class="wikitable" | {| class="wikitable" style="margin: 1em auto 1em auto" | ||
|- | |- | ||
! Resolution !! RAM | ! Resolution !! RAM | ||
|- | |- | ||
| 640x480@25Fps || | | 640x480@25Fps || 1199/7861MB | ||
|- | |- | ||
| 1280x720@25Fps || | | 1280x720@25Fps || 1230/7861MB | ||
|- | |- | ||
| 1920x1080@25Fps || | | 1920x1080@25Fps || 1307/7861MB | ||
|- | |- | ||
| 2048×1080@25Fps || | | 2048×1080@25Fps || 1317/7861MB | ||
|} | |} | ||
[[File:RAM tx2.png|frame|center|RAM consumption for different resolutions.]] | [[File:RAM tx2.png|frame|center|RAM consumption for different resolutions.]] | ||
== Glass-to-glass latency == | === Glass-to-glass latency === | ||
Latency was measured as shown in the picture, and the following are the approximate results. It is important to notice that latency can be affected by the parameters selected on the pipeline, specifically the queue-size property of the gst-nvstabilize element, as further explained on the [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Video_Stabilizer_for_NVIDIA_Jetson_Boards/User_Guide User Guide]. The pipeline used was the following: | Latency was measured as shown in the picture, and the following are the approximate results. It is important to notice that latency can be affected by the parameters selected on the pipeline, specifically the queue-size property of the gst-nvstabilize element, as further explained on the [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Video_Stabilizer_for_NVIDIA_Jetson_Boards/User_Guide User Guide]. The pipeline used was the following: | ||
<!-------- | |||
'''Note:''' the following latency measurements were '''NOT''' taken with high-performance enabled, given that the chosen resolution did not require it. | |||
----> | |||
{{Ambox | |||
|type=notice | |||
|small=left | |||
|issue='''The following latency measurements were '''NOT''' taken with high-performance enabled, given that the chosen resolution did not require it.''' | |||
|style=width:unset; | |||
}} | |||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1280,height=720' ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720,format=RGBA' ! nvvidconv ! queue max-size-buffers=1 leaky=downstream ! nvstabilize queue-size=5 ! nvvidconv ! nvoverlaysink sync=false | gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1280,height=720' ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720,format=RGBA' ! nvvidconv ! queue max-size-buffers=1 leaky=downstream ! nvstabilize queue-size=5 ! nvvidconv ! nvoverlaysink sync=false | ||
Line 88: | Line 134: | ||
''' 1280x720@30Fps ''' | ''' 1280x720@30Fps ''' | ||
{| class="wikitable" | {| class="wikitable" style="margin: 1em auto 1em auto" | ||
|- | |- | ||
! queue-size !! Latency (ms) | ! queue-size !! Latency (ms) |
Latest revision as of 11:11, 27 February 2023
GStreamer Video Stabilizer |
---|
Video Stabilization Basics |
User Guide |
Getting Started |
Examples |
Performance |
Contact Us |
The following section describes some relevant performance measurements during video stabilization for a few standard resolutions. It begins with a summary of the results detailed in the following sections, as well as the pipelines used to capture such results.
Summary
Benchmarking
Standalone element
Test Conditions
The following measurements were taken with the board on high-performance mode enabled, which was attained by running the following commands:
sudo nvpmodel -m 0 sudo jetson_clocks
All the measurements bellow where made using the following minimal pipeline.
PATH_TO_FILE=path_to_file.rgba WIDTH=1920 HEIGHT=1080 FRAME_SIZE=$(($WIDTH * $HEIGHT * 4)) gst-launch-1.0 filesrc location=$PATH_TO_FILE blocksize=$FRAME_SIZE ! videoparse format=rgba width=$WIDTH height=$HEIGHT ! nvstabilize ! fakesink sync=true
Note that this pipeline attempts to be as the least invasive as possible so the only processing element is GstNvStabilize.
Maximum and minimum framerate
These measurements were taken with the pipeline above, but without any limitation regarding to the framerate. In the next table, you can find the maximum, minimum, and average framerate for video input and different resolution stabilized by the plugin.
Resolution | Maximum framerate | Minimum framerate | Average |
---|---|---|---|
640x480 | 78.37 | 53.94 | 72.20 |
1280x720 | 49.11 | 39.25 | 46.62 |
1920x1080 | 23.62 | 17.54 | 21.84 |
3840×2160 | 11.86 | 5.96 | 7.22 |
To take into account the framerate relies on the movement of the video. |
CPU
Resolution | CPU 0 | CPU 1 | CPU 2 | CPU 3 | CPU4 | CPU5 | Average (reported by top) |
---|---|---|---|---|---|---|---|
640x480@25Fps | 0.52 | 11.6 | 18.54 | 0.14 | 3.61 | 0.71 | 21.9 |
1280x720@25Fps | 4.7 | 49.3 | 40 | 1.28 | 12.5 | 1.21 | 38.2 |
1920x1080@25Fps | 418 | 34.23 | 34 | 2.8 | 3.11 | 1.73 | 76.6 |
2048×1080@25Fps | 4.13 | 65.22 | 61.4 | 2.86 | 1.86 | 1.52 | 116 |
GPU
Resolution | GPU |
---|---|
640x480@25Fps | 1.64 |
1280x720@25Fps | 3.57 |
1920x1080@25Fps | 8.26 |
2048×1080@25Fps | 9.43 |
RAM
Resolution | RAM |
---|---|
640x480@25Fps | 1199/7861MB |
1280x720@25Fps | 1230/7861MB |
1920x1080@25Fps | 1307/7861MB |
2048×1080@25Fps | 1317/7861MB |
Glass-to-glass latency
Latency was measured as shown in the picture, and the following are the approximate results. It is important to notice that latency can be affected by the parameters selected on the pipeline, specifically the queue-size property of the gst-nvstabilize element, as further explained on the User Guide. The pipeline used was the following:
The following latency measurements were NOT taken with high-performance enabled, given that the chosen resolution did not require it. |
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1280,height=720' ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720,format=RGBA' ! nvvidconv ! queue max-size-buffers=1 leaky=downstream ! nvstabilize queue-size=5 ! nvvidconv ! nvoverlaysink sync=false
1280x720@30Fps
queue-size | Latency (ms) |
---|---|
No stabilizer | 140.8 |
1 | 254 |
2 | 258 |
3 | 288 |
4 | 328.8 |
5 | 412.6 |
6 | 412 |