Jetson TX2 GStreamer capture and display pipelines for Jetpack 4.2+

From RidgeRun Developer Wiki



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