gst.md

June 19, 2021 · View on GitHub

GStreamer is a framework of audio and video plugins that can be connected to process audio and video content, such as creating, converting, transcoding, and publishing media content.

Plugins:

The GStreamer docker images are compiled with the following plugin set:

PluginVersionPluginVersion
gst-plugin-base1.19.1gst-plugin-good1.19.1
gst-plugin-bad1.19.1gst-plugin-ugly1.19.1
gst-plugin-vaapi1.19.1gst-plugin-libav1.19.1
gst-video-analyticsv1.4.1SVT-HEVC encoderv1.5.1
gst-python1.19.1SVT-VP9 encoderv0.2.2
SVT-AV1 encoderv0.8.7

The plugins shm and mxf from gst-plugin-bad is disabled as they do not meet security coding guidelines. Please file an issue if you need these plugin features in your project.


GPU Acceleration:

In GPU images, the GStreamer docker images are accelerated through VAAPI. Note that gst-plugin-vaapi requires special setup for X11 authentication. Please see each platform README for setup details.

Examples:

  • Transcode raw yuv420 content to mp4:
gst-launch-1.0 -v filesrc location=test.yuv ! videoparse format=i420 width=320 height=240 framerate=30 ! x264enc ! mpegtsmux ! filesink location=test.ts
  • Encoding with VAAPI:
gst-launch-1.0 -v filesrc location=test.yuv ! videoparse format=i420 width=320 height=240 framerate=30 ! vaapih264enc ! mpegtsmux ! filesink location=test.ts
  • Encoding with SVT encoders:
gst-launch-1.0 -v videotestsrc ! video/x-raw ! svthevcenc! mpegtsmux ! filesink location=hevc.ts
gst-launch-1.0 -v videotestsrc ! video/x-raw ! svtav1enc ! webmmux ! filesink location=av1.mkv
gst-launch-1.0 -v videotestsrc ! video/x-raw ! svtvp9enc ! webmmux ! filesink location=vp9.mkv
  • Use the Intel® OpenVINO inference engine to detect items in a scene:
gst-launch-1.0 -v filesrc location=test.ts ! decodebin ! video/x-raw ! videoconvert ! \
  gvadetect model=<path to xml of model optimized through DLDT's model optimizer> ! queue ! \
  gvawatermark ! videoconvert ! fakesink
  • Use the Intel OpenVINO inference engine to classify items in a scene:
gst-launch-1.0 -v filesrc location=test.ts ! decodebin ! video/x-raw ! videoconvert ! \
  gvadetect model=<full path to xml of model optimized through DLDT's model optimizer> ! queue ! \
  gvaclassify model=<full path to xml of model optimized through DLDT's model optimizer> object-class=vehicle ! queue ! \
  gvawatermark ! videoconvert ! fakesink

See Also: