meta données pour cette page
  •  

GStreamer pipeline cheat sheet For Windows

raw live webcam display

gst-launch-1.0.exe autovideosrc ! videoconvert ! capsfilter caps=video/x-raw,width=640,height=480 ! autovideosink

Creating VP8 Test Source video

gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm

Display VP8 video

gst-launch-1.0 -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! videoconvert ! videoscale ! autovideosink

Live encoding VP8 video from raw Webcam

gst-launch-1.0 -v autovideosrc ! videoconvert ! queue !  vp8enc ! queue ! webmmux ! queue ! filesink location=testvp8.webm

Live encoding VP8 video from raw Webcam with two thread (Not sure it works)

gst-launch-1.0 -ev autovideosrc ! timeoverlay ! queue ! videoconvert ! vp8enc cpu-used=2 ! queue ! matroskamux ! queue ! filesink location=test.mkv

Live encoding VP9 video from raw Webcam high latency low rate vp9 encoding 320/240 (cpu 50%)

gst-launch-1.0 -v autovideosrc ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 ! vp9enc target-bitrate=30000 end-usage=cbr ! webmmux ! filesink location=testvp9.webm

Live encoding VP9 video from raw Webcam high latency low rate vp9 encoding 320/240 (cpu 50%) SSIM and undershoot 50%

gst-launch-1.0 -v autovideosrc ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 ! vp9enc target-bitrate=30000 end-usage=cbr tuning=ssim undershoot=50 ! webmmux ! filesink location=testvp9.webm

Paramètres VP9

https://www.webmproject.org/docs/encoder-parameters/

Explication SSIM/PSNR

http://www.hardware.fr/articles/828-5/mesurer-qualite-psrn-ssim-leurs-travers.html

Live encoding VP9 video from raw Webcam with low framerate 5fps high latency low rate vp9 encoding 320/240 (cpu 50%) SSIM and undershoot 50%

gst-launch-1.0 -v autovideosrc ! videoconvert ! videoscale ! video/x-raw,framerate=25/1,width=320,height=240 ! videorate drop-only=true ! video/x-raw,framerate=5/1 ! vp9enc target-bitrate=30000 end-usage=cbr tuning=ssim undershoot=50 cpu-used=4 threads=16 ! webmmux ! filesink location=testvp9.webm

Display VP9 video

gst-launch-1.0 -v filesrc location=testvp9.webm ! matroskademux ! vp9dec ! videoconvert ! videoscale ! autovideosink

Live low latency encoding X264 video from raw Webcam

gst-launch-1.0 -v autovideosrc ! videoconvert ! queue ! x264enc tune=zerolatency ! matroskamux ! filesink location= videotestsrc.mkv

Live encoding AVIvideo from raw Webcam

gst-launch-1.0 autovideosrc ! timeoverlay ! queue ! videoscale method=1 ! video/x-raw,width=320,height=240 ! avimux  ! filesink location=webcam.avi

Live encoding X264 low latency low bitrate(60kbits) from raw Webcam 320/240

gst-launch-1.0 -v autovideosrc ! videoconvert ! video/x-raw,width=320,height=240 ! queue ! x265enc tune=zerolatency  bitrate=60 ! matroskamux ! filesink location=videotestsrc.mkv

Live encoding X264 low latency low bitrate(60kbits) from raw Webcam 320/240

gst-launch-1.0 -v autovideosrc ! videoconvert ! video/x-raw,framerate=5/1,width=320,height=240 ! queue ! x264enc tune=zerolatency bitrate=30 ! matroskamux ! filesink location=videotestsrc.mkv

Low Latency low bitrate VP8 high cpu usage

gst-launch-1.0 -v autovideosrc ! videoconvert ! video/x-raw,framerate=5/1,width=320,height=240 ! queue ! vp8enc end -usage=cbr target-bitrate=60000 sharpness=2 threads=5 ! webmmux ! filesink location=testvp8.webmgst-launch-1.0 -v aut ovideosrc ! videoconvert ! video/x-raw,framerate=5/1,width=320,height=240 ! queue ! vp8enc end-usage=cbr target-bitrate=60000 sharpness=2 threads=5 ! webmmux ! filesink location=testvp8.webm

plugin list https://gstreamer.freedesktop.org/documentation/plugins.html https://blogs.gnome.org/rbultje/2015/09/28/vp9-encodingdecoding-performance-vs-hevch-264/

rtp x264 sender 320×240 5 fps zerolatency 30kbits

gst-launch-1.0 -v autovideosrc ! videoconvert ! video/x-raw,framerate=5/1,width=320,height=240 ! queue ! x264enc tune=zerolatency bitrate=30 ! rtph264pay ! udpsink host=127.0.0.1 port=50000

rtp x264 receiver

gst-launch-1.0 udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H 264, payload=(int)96" port=50000 ! rtph264depay ! decodebin ! videoconvert ! autovideosink

rtp vp9 sender 320×240 5 fps 3/4 seconds latency 30kbits

gst-launch-1.0 -v autovideosrc ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 ! vp9enc target-bitrate=30000 end-usage=cbr ! rtpvp9pay ! udpsink host=127.0.0.1 port=50000

rtp VP9 Receiver

gst-launch-1.0 udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP9, payload=(int)96" port=50000 ! rtpvp9depay ! decodebin ! videoconvert ! autovideosink

Exemples de commandes GStreamer :

https://blog.42pillistreet.com/doku.php?id=blog:gstreamer_pipeline_cheat_sheet