JetsonTX2/GStreamer/Jetpack4.2+/Capture and Display: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "<noinclude> {{JetsonTX2/Head|next=|previous=|keywords=}} </noinclude> == Capture == In order to capture there are two ways: Using v4l2 or using nvarguscamerasrc. ===nvargu...")
 
mNo edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{JetsonTX2/Head|next=|previous=|keywords=}}
{{JetsonTX2/Head|next=GStreamer/Encoding|previous=GStreamer/Example pipelines for Jetpack 4.2+|metakeywords=Jetson TX2 Capture and Display pipelines, Jetpack4.2, Jetpack4.2+, Capture and Display GStreamer pipelines, nvarguscamerasrc, nvcamerasrc plugin, nvvidconv}}
</noinclude>
</noinclude>


{{DISPLAYTITLE: Jetson TX2 GStreamer capture and display pipelines for Jetpack 4.2+|noerror}}
<table>
<tr>
<td><div class="clear; float:right">__TOC__</div></td>
<td valign=top>
{{GStreamer debug}}
</td>
</table>


== Capture ==
== Capture ==
In order to capture there are two ways: Using v4l2 or using nvarguscamerasrc.
   
   
===nvarguscamerasrc===
===nvarguscamerasrc===
This plugin came to replace the nvcamerasrc plugin, which is reported as deprecated on the latest release. It was created by NVIDIA and it has access to the ISP that helps converting from bayer to yuv suitable for the video encoders. However, it seems that its usage is limited to the ov5693 sensor until NVIDIA releases its source code or until it adds support to v4l2 to use the ISP.
This plugin came to replace the nvcamerasrc plugin, which is reported as deprecated on the latest release. It was created by NVIDIA and it has access to the ISP that helps to convert from Bayer to YUV suitable for the video encoders. However, it seems that its usage is limited to the ov5693 sensor until NVIDIA releases its source code or until it adds support to v4l2 to use the ISP.


Let’s consider the following pipeline:
Let’s consider the following pipeline:
Line 22: Line 30:
| 1929/7852MB (lfb 990x4MB) || 29.86 || 27.13 || 29.65 || 27.95 || '''28.63''' || 45.26
| 1929/7852MB (lfb 990x4MB) || 29.86 || 27.13 || 29.65 || 27.95 || '''28.63''' || 45.26
|}
|}
== Capture and Display ==
== Capture and Display ==
=== nvarguscamerasrc ===
=== nvarguscamerasrc ===
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 48: Line 58:
</syntaxhighlight>
</syntaxhighlight>


<pre style='background-color:yellow'>
<pre style='background-color:khaki'>
NOTE:
NOTE:
For Jetpack 4.2, the '''nv3dsink''' plugin reports in its capabilities that it supports several formats. However, after some testing, it was noticed that only NV12 is supported.  
For Jetpack 4.2, the nv3dsink plugin reports in its capabilities that it supports several formats. However, after some testing, it was noticed that only NV12 is supported.  
</pre>
</pre>


<noinclude>
<noinclude>
{{JetsonTX2/Foot||}}
{{JetsonTX2/Foot|GStreamer/Example pipelines for Jetpack 4.2+|GStreamer/Encoding}}
</noinclude>
</noinclude>

Latest revision as of 19:12, 24 October 2023



Previous: GStreamer/Example pipelines for Jetpack 4.2+ Index Next: GStreamer/Encoding






Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.

Capture

nvarguscamerasrc

This plugin came to replace the nvcamerasrc plugin, which is reported as deprecated on the latest release. It was created by NVIDIA and it has access to the ISP that helps to convert from Bayer to YUV suitable for the video encoders. However, it seems that its usage is limited to the ov5693 sensor until NVIDIA releases its source code or until it adds support to v4l2 to use the ISP.

Let’s consider the following pipeline:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv flip-method=2 ! fakesink silent=false -v

The nvvidconv is required normally to convert the memory type, however, on this case it is used to flip the image. The performance results are the following:

RAM CPU 0 CPU 1 CPU 2 CPU 3 Average CPU GPU
1929/7852MB (lfb 990x4MB) 29.86 27.13 29.65 27.95 28.63 45.26

Capture and Display

nvarguscamerasrc

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

The following chart summarizes the overall consumption of the presented pipeline:

RAM CPU 0 CPU 1 CPU 2 CPU 3 Average CPU GPU
1889/7852MB (lfb 1016x4MB) 17.5 21.5 18 15.5 18.125 42.7


There are several sink elements available for different applications and backends. Consider the following minimal pipelines as a point of reference.

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nv3dsink
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! nveglglessink -e
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! xvimagesink
NOTE:
For Jetpack 4.2, the nv3dsink plugin reports in its capabilities that it supports several formats. However, after some testing, it was noticed that only NV12 is supported. 


Previous: GStreamer/Example pipelines for Jetpack 4.2+ Index Next: GStreamer/Encoding