GStreamer memo

Introduction

Please use the default build-in gtreamer 1.0 on Jetson Nano.
Nvidia upstream the Nvidia plugins (ex: nvarguscamerasrc, nvvidconv, nvvideosink etc) to gstreamer for easy maintain.

Tutorial

If you are not familiar with the concept of "pipeline", please read the following URL. (Use the "translation", and you also can find some Chinese documents on web)
  • GStreamer concepts, HelloWorld, link
  • Dynamic Pipeline, link
Make sure you understand the meaning of the followings:
  • How to create elements with gst_element_factory_make()
  • How to create an empty pipeline with gst_pipeline_new()
  • How to add elements to the pipeline with gst_bin_add_many()
  • How to link the elements with each other with gst_element_link()

Useful Tips

List all installed plugins
$ gst-inspect-1.0
You can inspect any pipeline elements with gst-inspect-1.0 to get more details
$ gst-inspect-1.0 v4l2src
The version of installed gStremer
gst-inspect-1.0 --version
Quick test CSI camera
$ nvgstcapture-1.0
or
$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1' ! nv3dsink -e
How to know the supported format of video capture device ?
$ v4l2-ctl -d /dev/video0 --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
 Index       : 0
 Type        : Video Capture
 Pixel Format: 'RG10'
 Name        : 10-bit Bayer RGRG/GBGB
  Size: Discrete 3264x2464
   Interval: Discrete 0.048s (21.000 fps)
  Size: Discrete 3264x1848
   Interval: Discrete 0.036s (28.000 fps)
  Size: Discrete 1920x1080
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1280x720
   Interval: Discrete 0.017s (60.000 fps)
  Size: Discrete 1280x720
   Interval: Discrete 0.017s (60.000 fps)

Changes

  • The gst-omx plugin is deprecated in Linux for Tegra (L4T) Release 32.1. Use the gst-v4l2 plugin instead.
  • The nvoverlaysink (gst-omx) plugin is deprecated in L4T Release 32.1. Use nvdrmvideosink and nv3dsink instead for render pipelines with gst-v4l2 decoder.

FAQ

Q: What is the difference between 'video/x-raw(memory:NVMM)' and video/x-raw?
A: video/x-raw is CPU buffer. video/x-raw(memory:NVMM) is DMA buffer. link
Use DMA buffer when plugin supported to get best pipeline performance/efficiency.
--
Q: The nvidia proprietary gstreamer-1.0 libraries include ?
A: the followings will copy from Nano build-in folder /usr/lib/aarch64-linux-gnu/gstreamer-1.0/, those will not come from gstreamer
libgstnvarguscamera.so
libgstnvcompositor.so
libgstnvdrmvideosink.so
libgstnveglglessink.so
libgstnveglstreamsrc.so
libgstnvegltransform.so
libgstnvivafilter.so
libgstnvjpeg.so
libgstnvtee.so
libgstnvvidconv.so
libgstnvvideo4linux2.so
libgstnvvideocuda.so
libgstnvvideosink.so
libgstnvvideosinks.so
libgstomx.so

Forum

  • nvcamerasrc is deprecated. Please use nvarguscamerasrc. link

Reference

留言

這個網誌中的熱門文章

以樂透為例,用Python統計馬可夫矩陣

將 Jenkins Job 的歷史結果整理出視覺化的 Daily Report mail (一)

如何用 Jenkins API 取得 Job Build Result