Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

BKM: Collection of Useful GStreamer Commands

xwu2 edited this page Dec 6, 2019 · 1 revision

Media Transcoding

  • 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

Media Analytics

  • 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