Gstreamer

From XPUB & Lens-Based wiki
Revision as of 14:25, 17 May 2013 by Michael Murtaugh (talk | contribs) (→‎Raw audio streaming)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

http://gstreamer.freedesktop.org/

Amazing audio/video processing, from the commandline!

Streaming

Transmitter:

gst-launch-0.10 v4l2src ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! videoflip method=5 ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=192.168.0.150 port=3333

Receiver:

gst-launch-0.10 udpsrc port=3333 ! "application/x-rtp, payload=127" ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false

Take a still image

gst-launch v4l2src ! ffmpegcolorspace ! pngenc ! filesink location=test.png

Raw audio streaming

An example of streaming from a Rasberry PI, credits to Stéfan Piat, taken from his blog (http://rearwndw.wordpress.com/2013/05/17/raw-vorbis/), itself based on http://delog.wordpress.com/2011/06/01/stream-raw-vorbis-audio-over-udp-or-tcp-with-gstreamer/

SENDER:

gst-launch -v autoaudiosrc ! audioconvert ! audioresample ! vorbisenc ! udpsink host=192.168.2.102 port=5000

RECEIVER:

gst-launch -v udpsrc port=5000 ! vorbisdec ! audioconvert ! alsasink sync=false