OpenGL Accelerated HTML Overlay: Examples - GStreamer Usage

From RidgeRun Developer Wiki



  Index  




General

In the following sections, you can see examples of how to use them. You can see more information about the algorithms these elements apply in CUDA ISP Basics. Consider that a patch must be applied to v4l2src to enable captures in bayer10. You can see how to apply this patch in this link: Apply patch to v4l2src.

GStreamer Element

cudashift

This element applies the shifting algorithm. For more information about the element properties and capabilities, check here: cudashift element.

  • Choosing the shift value

On Jetson platforms

gst-launch-1.0 -ve v4l2src io-mode=userptr ! 'video/x-bayer, bpp=10, width=3840, height=2160' ! cudadebayer ! cudaawb algorithm=1 ! 'video/x-raw, format=RGB' ! fakesink

Use cases

In this section, you can find some use cases for the CUDA ISP GStreamer plugins. Both examples were tested on a Jetson Xavier NX.


  • Recording

The following pipeline records a video from a camera sensor, applies the three different algorithms and saves the video into an MP4 file.

GST_DEBUG=WARNING,*cudaawb*:LOG,*cudadebayer*:LOG gst-launch-1.0 -ve v4l2src io-mode=userptr ! 'video/x-bayer, bpp=10, width=3840, height=2160' ! cudashift shift=5 ! cudadebayer ! cudaawb algorithm=2 confidence=0.80 ! 'video/x-raw,format=I420' ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test.mp4 -e


  • Streaming

The following pipeline is an example of a streaming application with the three elements. These pipelines use another RidgeRun product for high-performance streaming called GstRtspSink .

GST_DEBUG=*:ERROR gst-launch-1.0 v4l2src do-timestamp=1 io-mode=userptr ! "video/x-bayer,bpp=10,width=3840,height=2160,framerate=30/1" ! cudashift shift=7 ! queue ! cudadebayer ! queue ! cudaawb algorithm=2 confidence=0.85 ! queue ! "video/x-raw,format=I420" ! nvvidconv ! queue ! nvv4l2h264enc insert-sps-pps=true idrinterval=30 ! "video/x-h264,mapping=/stream1" ! rtspsink service=5000 -vvv



  Index