_____________ ____________ ____________
| | | | | |
| File source |->-| WAV Parser |->-| Audio Sink |
|_____________| |____________| |____________|
gst-launch playbin uri="${url}"
sudo apt-get install gstreamer1.0-tools \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly
man gst-launch-1.0
# extra plugins (hardware dependents?)
apt-get install apt-file && apt-file update
apt-file search libgst*.so
cat /etc/opkg/base-feeds.conf
opkg list | grep gst
opkg install gstreamer1.0-plugins-good-video4linux2
gst-inspect-1.0
# demo pipeline that displays nothing
gst-launch-1.0 videotestsrc num-buffers=25 ! fakesink
# Display demo video
gst-launch-1.0 videotestsrc num-buffers=25 ! autovideosink
gst-launch-1.0 videotestsrc num-buffers=25 ! fbdevsink
# display window
gst-launch-1.0 videotestsrc ! autovideosink
# tell type
gst-typefind-1.0 /usr/share/sounds/alsa/Noise.wav
/usr/share/sounds/alsa/Noise.wav - audio/x-wav
gst-launch-1.0 videotestsrc num-buffers=10000 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
...
_____________ ____________ ____________
| | | | | |
| File source |->-| WAV Parser |->-| Audio Sink |
|_____________| |____________| |____________|
gst-launch-1.0 \
filesrc location=/usr/share/sounds/alsa/Noise.wav \
! wavparse \
! alsasink
gst-inspect-1.0 | grep 'src:'
alsa: alsasrc: Audio source (ALSA)
(...)
rtsp: rtspsrc: RTSP packet receiver
(...)
autodetect: autovideosrc: Auto video source
gst-inspect-1.0 v4l2src
(...)
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw
format: RGB15
width: [ 1, 32768 ]
height: [ 1, 32768 ]
framerate: [ 0/1, 100/1 ]
(...)
Element Properties:
(...)
device : Device location
flags: readable, writable
String. Default: "/dev/video0"
gst-launch-1.0 -v v4l2src device=/dev/video0 ! autovideosink
Setting pipeline to PAUSED ...
(...)
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstVaapiSink:autovideosink0-actual-sink-vaapi.GstPad:sink: caps = video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1
(...)
gst-launch-1.0 -v \
v4l2src device=/dev/video0 \
! video/x-raw,width=320 \
! autovideosink
gst-launch-1.0 -v \
v4l2src \
! tee name=src \
src. ! queue ! autovideosink \
src. ! queue ! filesink location="out.tmp"
GST_DEBUG=2 \
gst-launch-1.0 \
-v --gst-debug=v4l2:5 \
v4l2src ! fakesink num-buffers=1
(...)
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, (...)
(...)
INFO v4l2 gstv4l2object.c:1247:gst_v4l2_object_fill_format_list:<v4l2src0> got 5 format(s):
(...)
export GST_DEBUG='10'
export GST_DEBUG_DUMP_DOT_DIR="."
export GST_DEBUG_OPTIONS=pretty-tags
export GST_TRACE=all
gst-launch-1.0 -v audiotestsrc num-buffers=16 \
! vorbisenc ! oggmux ! filesink location="tmp.oga"
# *-gst-launch.*.dot
which dot || apt-get install graphviz
for file in *.dot ; do dot -Tsvg "$file" > "$file.svg" ; done
xdg-open *PAUSED_PLAYING*.svg
# states " NULL_READY > READY_PAUSED > PAUSED_PLAYING > PLAYING_PAUSED > PAUSED_READY"
gst-launch \
v4l2src ! "video/x-raw-yuv",width=320,height=240 \
! theoraenc ! oggmux \
! filesink location="video.ogv"
gst-launch-1.0 \
mmssrc location="mms://url/stream.asf" \
! filesink location="mss.wmv"
gst-launch-1.0 \
filesrc location="video.avi" \
! decodebin ! queue ! autovideoconvert ! pngenc \
! multifilesink location="%08d.png"
gst-launch-1.0 \
autoaudiosrc ! audioconvert ! vorbisenc ! oggmux \
! filesink location="vorbis.oga"
gst-launch-1.0 \
filesrc location="dvd.vob" \
! mpegpsdemux name=demux \
! mpegvideoparse \
! queue \
! mpeg2dec \
! autovideosink \
demux. \
! queue \
! mad \
! audioconvert ! audioresample \
! alsasink
gst-launch-1.0 -v v4l2src \
! video/x-raw,width=320,height=240 \
! rtpvrawpay \
! udpsink host=127.0.0.1 port=5004
gst-launch-1.0 -v udpsrc port=5004 \
! application/x-rtp, media=video, clock_rate=9000, \
encoding-name=RAW, sampling=YCbCr-4:2:0, \
depth='(string)8',width='(string)320',height='(string)240',
payload=96 \
! rtpvrawdepay ! decodebin ! autovideosink
gst-launch-1.0 filesrc location="in.wmv" \
! decodebin name=d \
{ oggmux name=mux max-delay=500000000 max-page-delay=500000000 \
! filesink location="out.theora.ogv" } \
{ d. ! queue ! ffmpegcolorspace ! theoraenc bitrate=300 \
! queue ! mux. }