<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GChriss</id>
	<title>XiphWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GChriss"/>
	<link rel="alternate" type="text/html" href="https://wiki.xiph.org/Special:Contributions/GChriss"/>
	<updated>2026-06-08T23:37:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16678</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16678"/>
		<updated>2018-06-15T18:32:49Z</updated>

		<summary type="html">&lt;p&gt;GChriss: Add section on running post-recording video filter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.  Note that GStreamer 0.10 (gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039;) has been deprecated for several years and that use of the newer 1.x series (gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039;) is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Generate Ogg Vorbis audio from MP4 video (+progress monitoring)===&lt;br /&gt;
gst-launch-1.0 filesrc location=original.mp4 ! queue max-size-time=0 max-size-bytes=100000000 ! qtdemux name=demux ! progressreport update-freq=5  demux.audio_0 ! queue ! decodebin ! queue ! audioconvert ! queue ! vorbisenc ! queue ! oggmux ! queue ! filesink location=vorbis-audio.oga&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to an Icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch-0.10 uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch-0.10 --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-1.0 -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (&#039;&#039;e.g.&#039;&#039;, Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;image_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Extract video clips using specified timecodes====&lt;br /&gt;
*mkvmerge --split parts:hh:mm:ss-hh:mm:ss -o clip.mkv recording.mkv&lt;br /&gt;
*Requires recent builds of MKVToolNix&lt;br /&gt;
*With short-duration time codes, extract &#039;&#039;all&#039;&#039; frames from the generated clip using the above GST pipeline for &amp;quot;frame-by-frame&amp;quot; still selection&lt;br /&gt;
*Also generally helpful to split long recordings into manageable sections for further editing&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Dump all JPEGs from Matroska+M-JPEG video, run various G&#039;MIC filters (&#039;&#039;e.g.&#039;&#039;, de-blur), then recreate video===&lt;br /&gt;
*gst-launch-1.0 filesrc location=elphel_recording_.mkv ! queue ! matroskademux ! queue ! multifilesink location=&amp;quot;image_%04d.jpg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Run a mild de-blur filter (slow processing) on all frames:&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg +fx_deblur 1.36,6,17.5,0.3,1,0,0,24,0 -o[1] $i; done&lt;br /&gt;
&lt;br /&gt;
Re-create the video using the image-corrected JPEGs, coping the original audio track:&lt;br /&gt;
*gst-launch-1.0 matroskamux name=mux ! queue ! filesink location=elphel_recording_corrected.mkv  multifilesrc location=&amp;quot;elphel_recording_%04d.jpg&amp;quot; caps=&amp;quot;image/jpeg,framerate=18/1,pixel-aspect-ratio=1/1&amp;quot; ! queue ! jpegdec ! queue ! jpegenc ! mux.  filesrc location=moon.mkv ! queue ! matroskademux ! queue ! vorbisdec ! queue ! vorbisenc ! queue ! mux.&lt;br /&gt;
&#039;&#039;&#039;TODO&#039;&#039;&#039;: Figure out how to avoid decoding/re-encoding audio and video -- should not be a necessary step&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16320</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16320"/>
		<updated>2016-04-08T21:33:44Z</updated>

		<summary type="html">&lt;p&gt;GChriss: clearly differentiate between 0.10 and 1.0 pipelines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.  Note that GStreamer 0.10 (gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039;) has been deprecated for several years and that use of the newer 1.x series (gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039;) is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Generate Ogg Vorbis audio from MP4 video (+progress monitoring)===&lt;br /&gt;
gst-launch-1.0 filesrc location=original.mp4 ! queue max-size-time=0 max-size-bytes=100000000 ! qtdemux name=demux ! progressreport update-freq=5  demux.audio_0 ! queue ! decodebin ! queue ! audioconvert ! queue ! vorbisenc ! queue ! oggmux ! queue ! filesink location=vorbis-audio.oga&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a Icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch-0.10 uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch-0.10 --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-1.0 -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;image_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Extract video clips using specified timecodes====&lt;br /&gt;
*mkvmerge --split parts:hh:mm:ss-hh:mm:ss -o clip.mkv recording.mkv&lt;br /&gt;
*Requires recent builds of MKVToolNix&lt;br /&gt;
*With short-duration time codes, extract &#039;&#039;all&#039;&#039; frames from the generated clip using the above GST pipeline for &amp;quot;frame-by-frame&amp;quot; still selection&lt;br /&gt;
*Also generally helpful to split long recordings into manageable sections for further editing&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16319</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16319"/>
		<updated>2016-04-08T21:25:35Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Generate Ogg Vorbis Audio from MP4 Video: */ new section: found this helpful in generating audio from YouTube-downloaded MP4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Generate Ogg Vorbis Audio from MP4 Video (+Progress Monitoring)===&lt;br /&gt;
gst-launch-1.0 filesrc location=original.mp4 ! queue max-size-time=0 max-size-bytes=100000000 ! qtdemux name=demux ! progressreport update-freq=5  demux.audio_0 ! queue ! decodebin ! queue ! audioconvert ! queue ! vorbisenc ! queue ! oggmux ! queue ! filesink location=vorbis-audio.oga&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;image_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Extract video clips using specified timecodes====&lt;br /&gt;
*mkvmerge --split parts:hh:mm:ss-hh:mm:ss -o clip.mkv recording.mkv&lt;br /&gt;
*Requires recent builds of MKVToolNix&lt;br /&gt;
*With short-duration time codes, extract &#039;&#039;all&#039;&#039; frames from the generated clip using the above GST pipeline for &amp;quot;frame-by-frame&amp;quot; still selection&lt;br /&gt;
*Also generally helpful to split long recordings into manageable sections for further editing&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16301</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16301"/>
		<updated>2016-03-09T03:32:16Z</updated>

		<summary type="html">&lt;p&gt;GChriss: new subsection: mkvmerge video clip extraction via timecode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;image_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Extract video clips using specified timecodes====&lt;br /&gt;
*mkvmerge --split parts:hh:mm:ss-hh:mm:ss -o clip.mkv recording.mkv&lt;br /&gt;
*Requires recent builds of MKVToolNix&lt;br /&gt;
*With short-duration time codes, extract &#039;&#039;all&#039;&#039; frames from the generated clip using the above GST pipeline for &amp;quot;frame-by-frame&amp;quot; still selection&lt;br /&gt;
*Also generally helpful to split long recordings into manageable sections for further editing&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16300</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16300"/>
		<updated>2016-03-07T03:42:05Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode */ &amp;quot;blah&amp;quot; -&amp;gt; &amp;quot;image&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;image_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16299</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16299"/>
		<updated>2016-03-04T05:34:23Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Extract a series of individual JPEGs from Matroska+M-JPEG into a folder */ expand pipeline to provide visual fast-forward&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG video into a folder and monitor progress in &amp;quot;fast forward&amp;quot; mode===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/5 ! queue ! tee name=split ! jpegdec ! queue ! videoconvert ! queue ! xvimagesink sync=false  split. ! multifilesink post-messages=true location=&amp;quot;blah_%04d.jpg&amp;quot; sync=false &amp;amp;&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons in input filenames to avoid BASH interpretation issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills.  &amp;quot;1/5&amp;quot; translates to &amp;quot;one image per five seconds of video.&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*To add EXIF timestamps to individual JPGs:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hexadecimal.  Use the gimp-gmic plugin to interactively find values that work well for your particular photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16298</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16298"/>
		<updated>2016-03-03T18:19:16Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Extract a series of individual JPEGs from Matroska+M-JPEG into a folder */ re-add debug part for EXIF timestamps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink  location=&amp;quot;recording_%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16297</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16297"/>
		<updated>2016-03-03T18:04:14Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Extract a series of individual JPEGs from Matroska+M-JPEG into a folder */ update extraction pipeline for gst-launch-1.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*gst-launch-1.0 filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink  location=&amp;quot;recording_%04d.jpg&amp;quot; sync=false&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16164</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16164"/>
		<updated>2015-12-19T19:48:06Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts or Skype (Linux only) */  make  section more generic&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://gstreamer.freedesktop.org/ GStreamer] is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, as a video4linux loopback device / webcam (Linux-only)===&lt;br /&gt;
*Requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch pipeline above then run video-conferencing software (e.g., Firefox Hello, Skype, Google[+] Hangouts)&lt;br /&gt;
*Synchronized audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*It may be helpful to re-nice video processes to &#039;-15&#039;.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16161</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16161"/>
		<updated>2015-12-14T17:52:48Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only) */ &amp;#039;tee&amp;#039; workaround&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts or Skype (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin] or proprietary Skype&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] will generate GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures; the finial &#039;tee&#039; element is a workaround for this issue.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! tee ! queue max-size-bytes=100000000 max-size-time=0 ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16132</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16132"/>
		<updated>2015-10-29T02:52:06Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* HDMI2USB.tv capture (timvideos.us) */ edit title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/timvideos/HDMI2USB HDMI2USB] (timvideos.us) capture with ALSA audio input===&lt;br /&gt;
*The board produces 15FPS at JPEG quality 85, resulting in a large recording file size.&lt;br /&gt;
*a/v sync is not yet addressed&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16131</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16131"/>
		<updated>2015-10-29T02:40:23Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* HDMI2USB.tv capture (timvideos.us) */ update pipeline using actual hardware&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===HDMI2USB.tv capture (timvideos.us)===&lt;br /&gt;
*Big recording; a/v sync not yet addressed.&lt;br /&gt;
*gst-launch-1.0 -e v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720 !  queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux   alsasrc device=hw:CARD=CODEC latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=test4.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16129</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16129"/>
		<updated>2015-10-28T17:39:10Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* hdmi2usb capture (timvideos.us) */ change to 1:1 PAR (is this needed?)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===hdmi2usb capture (timvideos.us)===&lt;br /&gt;
*Big recording; a/v sync not yet addressed.  Prototyping pipeline:&lt;br /&gt;
*gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,framerate=\(fraction\)30000/1001,width=1280,height=720 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,pixel-aspect-ratio=\(fraction\)1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc quality=90 idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux audiotestsrc is-live=true freq=432 ! audio/x-raw,channels=2,rate=48000 ! vorbisenc ! queue ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=hdmi2usb_recording_`date +%s`.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16128</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16128"/>
		<updated>2015-10-28T17:13:44Z</updated>

		<summary type="html">&lt;p&gt;GChriss: new section: timvideos.us&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===hdmi2usb capture (timvideos.us)===&lt;br /&gt;
*Big recording; a/v sync not yet addressed&lt;br /&gt;
*gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,framerate=\(fraction\)30000/1001,width=1280,height=720 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,pixel-aspect-ratio=\(fraction\)32/27 ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc quality=90 idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux audiotestsrc is-live=true freq=432 ! audio/x-raw,channels=2,rate=48000 ! vorbisenc ! queue ! mux.  mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=hdmi2usb_recording_`date +%s`.mkv&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16054</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=16054"/>
		<updated>2015-10-15T22:02:24Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast */ include explicit pulsesrc device name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*The pulseaudio/pulsesrc device may need to be changed depending on the machine: run &#039;pactl list short sources | cut -f2&#039; to see options&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15822</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15822"/>
		<updated>2015-05-09T21:40:43Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen */ deprecate GST 0.10 example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15821</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15821"/>
		<updated>2015-05-09T21:38:24Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast */ update for gstreamer 1.x // pulsesrc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with Desktop Audio (Pulse) -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown ximagesrc use-damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1680,height=1050 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=350 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux  pulsesrc ! queue max-size-bytes=100000000 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.2Mbits/sec)&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15554</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15554"/>
		<updated>2015-03-25T22:33:15Z</updated>

		<summary type="html">&lt;p&gt;GChriss: hold down control key = rapid prototyping technique&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
Hold down the &#039;control&#039; key in combination with BASH cursor-left (left arrow) or cursor-right (right arrow) to quickly edit the commands listed here.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15553</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15553"/>
		<updated>2015-03-25T22:28:16Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Mix Three Video Sources Side-by-Side-by-Side */  replace w/ gstreamer-1.x version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*May be sensitive to internal element-construction race conditions using gst-launch -- this is largely a proof-of-concept template for programming applications.&lt;br /&gt;
*gst-launch-1.0 --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=trivideo ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false  videotestsrc pattern=22 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.  videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15547</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15547"/>
		<updated>2015-03-24T20:16:13Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Add EXIF Metadata to generated image stills */ change default GPS lat-long to MIT Strata Center, update camera model&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.36160 -GPSLatitudeRef=N -GPSLongitude=71.09064 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15538</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15538"/>
		<updated>2015-03-20T19:24:53Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast */  bump framerate +1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0 --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15537</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15537"/>
		<updated>2015-03-20T14:04:13Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Live-stream an Elphel 353L camera...*/ add max-errors=-1 ; camera occassionally produces bad frames&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=3/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv &lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15536</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15536"/>
		<updated>2015-03-20T13:51:32Z</updated>

		<summary type="html">&lt;p&gt;GChriss: new section: 1280x800 GNOME desktop broadcast w/ GStreamer 1.x&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1280x800 (1680x1050) GNOME Desktop -&amp;gt; Ogg Theora -&amp;gt; Icecast===&lt;br /&gt;
gst-launch-1.0  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw,framerate=3/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv &lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch-0.10  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15056</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=15056"/>
		<updated>2014-10-28T03:44:35Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only) */ pointer to v4l2loopback bug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters).  Note an unresolved [https://github.com/umlaeute/v4l2loopback/issues/60 v4l2loopback bug] may trigger GStreamer &amp;quot;Internal data flow error&amp;quot; pipeline failures.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14435</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14435"/>
		<updated>2014-01-31T04:55:37Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only) */ some stability issues: re-prioritization shuffle helps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters)&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;GoogleTalkPlugin&#039; and both &#039;plugin-container&#039; processes to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14425</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14425"/>
		<updated>2014-01-27T04:16:11Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add tested kernel version to GTalk pipeline example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters)&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;abrowser&#039;, &#039;GoogleTalkPlugin&#039; and &#039;gst-launch-1.0&#039; to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + linux-libre-3.12 + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14419</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14419"/>
		<updated>2014-01-24T05:49:01Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add Google+ Hangout instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Select an Elphel 353L camera as the video source, widescreen, in Google[+] Video Chat/Hangouts (Linux only)===&lt;br /&gt;
*Requires a [https://www.google.com/tools/dlpage/hangoutplugin/download.html proprietary Google plugin]&lt;br /&gt;
*Also requires the [https://github.com/umlaeute/v4l2loopback v4l2loopback kernel module] loaded (w/o parameters)&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay !  queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! &amp;quot;video/x-raw,framerate=(fraction)30/1&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw,width=640,height=480&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! &amp;quot;video/x-raw,format=(string)YUY2,pixel-aspect-ratio=(fraction)1/1&amp;quot; ! v4l2sink  device=/dev/video0&lt;br /&gt;
*Launch Google Talk/Google+ Hangout and select &#039;Loopback video device 0&#039; as the video input source.  Syncroniced audio &#039;&#039;via&#039;&#039; the v4l2 API is untested -- select an ALSA audio source as appropriate.&lt;br /&gt;
*Re-nice &#039;abrowser&#039;, &#039;GoogleTalkPlugin&#039; and &#039;gst-launch-1.0&#039; to &#039;-15&#039;.  Tested on  Abrowser 26.0 + Trisquel + google-talkplugin ver. 4.9.1.0-1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14297</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14297"/>
		<updated>2013-11-03T06:49:26Z</updated>

		<summary type="html">&lt;p&gt;GChriss: refer readers to GEntrans, TI example pipelines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.  [http://gentrans.sourceforge.net/ GEntrans] is a command-line tool helpful in visualizing queue states (i.e., static/under/overfilled), dynamically, for a given gst-launch pipeline.  Queues can have a large impact on &amp;quot;even&amp;quot; pipeline performance, for example in avoiding intermittent frame pauses as the pipeline blocks on some other operation.&lt;br /&gt;
&lt;br /&gt;
Texas Instruments offers a [http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines list of example pipelines] for TI mobile devices.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14273</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14273"/>
		<updated>2013-10-11T04:22:09Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Same as above, but simultaneously broadcast in H.264 */ it&amp;#039;s been a while, update section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [https://gitorious.org/moment-archive Moment Video Server] (in theory)&lt;br /&gt;
&lt;br /&gt;
For crtmpserver:&lt;br /&gt;
*Remove a &#039;tags_written++&#039; line from &#039;./gst/flv/gstflvmux.c&#039; as per [https://bugzilla.gnome.org/show_bug.cgi?id=661624 Bug 661624]&lt;br /&gt;
*crtmpserver.lua should be customized for the streaming application (a mostly undocumented step...)&lt;br /&gt;
&lt;br /&gt;
For Moment:&lt;br /&gt;
*Remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
&lt;br /&gt;
For both:&lt;br /&gt;
*Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
*Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
*&#039;rtmpsink&#039; isn&#039;t yet(?) compatible with Akamai&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/gNewSense&amp;diff=14272</id>
		<title>GST cookbook/gNewSense</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/gNewSense&amp;diff=14272"/>
		<updated>2013-10-10T17:19:35Z</updated>

		<summary type="html">&lt;p&gt;GChriss: retire page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Migrated to: [https://gitorious.org/openvideo_reference_build https://gitorious.org/openvideo_reference_build]&lt;br /&gt;
&lt;br /&gt;
[https://wiki.xiph.org/index.php?title=GST_cookbook/gNewSense&amp;amp;oldid=14073 View the archived gNewSense build instructions]&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14271</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14271"/>
		<updated>2013-10-03T02:17:05Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Debayer + convert to RGB a single JP46 frame using Elphel 353L */ ...and might as well crank up PNG compression&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=9 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14270</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14270"/>
		<updated>2013-10-03T02:16:41Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Debayer + convert to RGB a single JP46 frame using Elphel 353L */ typo fix: missing the word &amp;#039;queue&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! queue max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14268</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14268"/>
		<updated>2013-10-02T16:27:26Z</updated>

		<summary type="html">&lt;p&gt;GChriss: fix typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build Script]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14267</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14267"/>
		<updated>2013-10-02T16:26:54Z</updated>

		<summary type="html">&lt;p&gt;GChriss: updating Trisquel6 build notes to new reference build script; removing GNUsense pending refresh&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[[https://gitorious.org/openvideo_reference_build &#039;Open Video&#039; Reference Build]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14266</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14266"/>
		<updated>2013-10-02T16:24:57Z</updated>

		<summary type="html">&lt;p&gt;GChriss: post a moving sign&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to: [https://gitorious.org/openvideo_reference_build https://gitorious.org/openvideo_reference_build]&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14236</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14236"/>
		<updated>2013-08-28T01:03:50Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Pidgin */ +line break&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;`#Every line in this page is executable in BASH.  Have fun\!`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Release 6.0 (toutatis) GStreamer Build Instructions`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Tested on a Lenovo x201i by GChriss / 15-April-2013`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Prepare live USB key as documented:`&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Run through install prompts and reboot`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open Terminal:`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Get this stuff outta here...`&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
`#(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libsoupcutter-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create this file and add the line that follows:`&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local `#--&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but helpful step for realtime audio processing`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
`#&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m`&amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#reboot and check for PREEMPT`&amp;lt;br&amp;gt;&lt;br /&gt;
uname -a |grep PREEMPT&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc `#-&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#YASM is optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
#vi /etc/security/limits.conf `#-&amp;gt; add the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf `#-&amp;gt; create file with the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss `#--&amp;gt; subsitute &#039;gchriss&#039; for your username`&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#At this point UI volume controls are missing/non-functional, but alsamixer works.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Build pulseaudio if needed, but otherwise optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Also optional (but recommended):`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
`#See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012`&amp;lt;br&amp;gt;&lt;br /&gt;
`#--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: The following builds but fails to connect to pulseaudio... debug needed?`&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open abrowser, download:`&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[all &#039;make check&#039; tests pass]`&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libvpx-v1.1.0.tar.bz2 &amp;amp;&amp;amp; cd libvpx-v1.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but really helpful:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create the following block entries for automatic execution @ user login`&amp;lt;br&amp;gt;&lt;br /&gt;
`#The first two entries are specific to managing Thinkpad-series laptops`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/cpufreq-selector.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=cpu-freq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=cpufreq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/echo.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/gnome-terminal.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=gnome-terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/qjackctl.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#network-manager can sometimes be flaky, issue on an as-needed basis:`&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
`#This section is for building Pidgin and Farsight from source.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev binutils-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.93.tar.gz&amp;lt;br /&amp;gt;&lt;br /&gt;
tar -xvzf fontconfig-2.10.93.tar.gz &amp;amp;&amp;amp; cd fontconfig-2.10.93&amp;lt;br /&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
wget http://projects.palaso.org/attachments/download/384/graphite2-1.2.3.tgz&amp;lt;br /&amp;gt;&lt;br /&gt;
tar -xvzf graphite2-1.2.3.tgz &amp;amp;&amp;amp; cd graphite2-1.2.3&amp;lt;br /&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX:PATH=/packages/openvideopro . &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make all &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.19.tar.bz2&amp;lt;br /&amp;gt;&lt;br /&gt;
bzip2 -d harfbuzz-0.9.19.tar.bz2 &amp;amp;&amp;amp; tar -xvf harfbuzz-0.9.19.tar&amp;lt;br /&amp;gt;&lt;br /&gt;
cd harfbuzz-0.9.19/&amp;lt;br /&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-graphite2 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Skip the following two blocks if building Pidgin against GStreamer 1.0]`&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[/skip]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
`#[/end experimental section]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get -y install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Include support for non-libre standards implemented using free software...]`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Optional extra Totem plugins]`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get -y install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]`&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
==LightWorks (proprietary, tethered application)==&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/libcg_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb libcg_3.0.0016-0ubuntu1_amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libportaudio2 libportaudiocpp0 libgsf-1-114 libgsf-1-common libjack-jackd2-0&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.lwks.com/betas-linux --&amp;gt; Register, agree to terms of service, download lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
lightworks &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14235</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14235"/>
		<updated>2013-08-28T01:03:20Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Pidgin */ make a 2nd pass at Pidgin 2.10.7 --&amp;gt; no sound w/ GST 0.10, but no undefined symbols;  Pidgin master has Makefile errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;`#Every line in this page is executable in BASH.  Have fun\!`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Release 6.0 (toutatis) GStreamer Build Instructions`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Tested on a Lenovo x201i by GChriss / 15-April-2013`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Prepare live USB key as documented:`&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Run through install prompts and reboot`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open Terminal:`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Get this stuff outta here...`&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
`#(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libsoupcutter-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create this file and add the line that follows:`&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local `#--&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but helpful step for realtime audio processing`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
`#&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m`&amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#reboot and check for PREEMPT`&amp;lt;br&amp;gt;&lt;br /&gt;
uname -a |grep PREEMPT&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc `#-&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#YASM is optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
#vi /etc/security/limits.conf `#-&amp;gt; add the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf `#-&amp;gt; create file with the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss `#--&amp;gt; subsitute &#039;gchriss&#039; for your username`&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#At this point UI volume controls are missing/non-functional, but alsamixer works.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Build pulseaudio if needed, but otherwise optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Also optional (but recommended):`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
`#See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012`&amp;lt;br&amp;gt;&lt;br /&gt;
`#--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: The following builds but fails to connect to pulseaudio... debug needed?`&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open abrowser, download:`&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[all &#039;make check&#039; tests pass]`&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libvpx-v1.1.0.tar.bz2 &amp;amp;&amp;amp; cd libvpx-v1.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but really helpful:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create the following block entries for automatic execution @ user login`&amp;lt;br&amp;gt;&lt;br /&gt;
`#The first two entries are specific to managing Thinkpad-series laptops`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/cpufreq-selector.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=cpu-freq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=cpufreq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/echo.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/gnome-terminal.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=gnome-terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/qjackctl.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#network-manager can sometimes be flaky, issue on an as-needed basis:`&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
`#This section is for building Pidgin and Farsight from source.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev binutils-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.93.tar.gz&amp;lt;br /&amp;gt;&lt;br /&gt;
tar -xvzf fontconfig-2.10.93.tar.gz &amp;amp;&amp;amp; cd fontconfig-2.10.93&amp;lt;br /&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
wget http://projects.palaso.org/attachments/download/384/graphite2-1.2.3.tgz&amp;lt;br /&amp;gt;&lt;br /&gt;
tar -xvzf graphite2-1.2.3.tgz &amp;amp;&amp;amp; cd graphite2-1.2.3&amp;lt;br /&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX:PATH=/packages/openvideopro . &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make all &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.19.tar.bz2&amp;lt;br /&amp;gt;&lt;br /&gt;
bzip2 -d harfbuzz-0.9.19.tar.bz2 &amp;amp;&amp;amp; tar -xvf harfbuzz-0.9.19.tar&amp;lt;br /&amp;gt;&lt;br /&gt;
cd harfbuzz-0.9.19/&amp;lt;br /&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-graphite2 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br /&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Skip the following two blocks if building Pidgin against GStreamer 1.0]`&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[/skip]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
`#[/end experimental section]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get -y install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Include support for non-libre standards implemented using free software...]`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Optional extra Totem plugins]`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get -y install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]`&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
==LightWorks (proprietary, tethered application)==&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/libcg_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb libcg_3.0.0016-0ubuntu1_amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libportaudio2 libportaudiocpp0 libgsf-1-114 libgsf-1-common libjack-jackd2-0&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.lwks.com/betas-linux --&amp;gt; Register, agree to terms of service, download lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
lightworks &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14231</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14231"/>
		<updated>2013-08-10T21:24:19Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Run color-correction on the extracted JPEGs with G&amp;#039;MIC */ gmic &amp;#039;smoothness&amp;#039; has issues; add that colors must be in RGB&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 0,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
*The specified reference color must be in RGB, not hex.  Use the gimp-gmic plugin to interactively find values that work well for your photoset.&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14230</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14230"/>
		<updated>2013-08-10T18:21:03Z</updated>

		<summary type="html">&lt;p&gt;GChriss: re-arrange image dump section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Extract a series of individual JPEGs from Matroska+M-JPEG into a folder===&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*After the above command is run the images should be generated.  To add EXIF timestamps to each JPG:&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
====Run color-correction on the extracted JPEGs with G&#039;MIC====&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --apply_curve 1,1,1,10,1,116,172,183,204,255,255 -o[1] $i,90; done&lt;br /&gt;
*for i in *jpg; do mv $i tmp.jpg ; gmic tmp.jpg --balance_gamma 68,68,68 -o[1] $i,90; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14228</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14228"/>
		<updated>2013-08-09T06:13:15Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Dump high-resolution image stills --&amp;gt; create timestamps (new section) */  1/2 way there maybe?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Dump high-resolution image stills from Matroska containers into a folder===&lt;br /&gt;
*gst-launch filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink location=&amp;quot;image%04d.jpg&amp;quot; sync=false&lt;br /&gt;
&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
====Same as above, but also generate a log file with images generated + corresponding time offset====&lt;br /&gt;
*Useful for generating exact EXIF timestamps for each image...&lt;br /&gt;
*GST_DEBUG=GST_BUS:5 gst-launch-0.10  filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink post-messages=true location=&amp;quot;image%04d.jpg&amp;quot; sync=false 2&amp;gt;gst-bus-debug.log&lt;br /&gt;
*cat gst-bus-debug.log | grep timestamp | grep dispatch | sed -e s/^.*filename[=].string.//g  -e s/..stream.time.*//g -e s/[,].*\)/=/g -e s/000000000//g &amp;gt;timestamps.log&lt;br /&gt;
*[TODO: create a BASH script or similar for the next step]&lt;br /&gt;
*exiftool -DateTimeOriginal=&amp;quot;`date -d @start-of-recording_unixtimestamp+offset-for-this-image-from-log-file --rfc-3339=seconds`&amp;quot; -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14227</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14227"/>
		<updated>2013-08-07T02:38:14Z</updated>

		<summary type="html">&lt;p&gt;GChriss: adjust make/model in exiftool&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Dump high-resolution image stills from Matroska containers into a folder===&lt;br /&gt;
*gst-launch filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink location=&amp;quot;image%04d.jpg&amp;quot; sync=false&lt;br /&gt;
&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel Inc.&#039; -model=&#039;Elphel NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14226</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14226"/>
		<updated>2013-08-06T22:35:56Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Add EXIF Metadata to generated image stills */ linking to MediaGoblin homepage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Dump high-resolution image stills from Matroska containers into a folder===&lt;br /&gt;
*gst-launch filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink location=&amp;quot;image%04d.jpg&amp;quot; sync=false&lt;br /&gt;
&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with [http://mediagoblin.org/ MediaGoblin]&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel&#039; -model=&#039;NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14225</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14225"/>
		<updated>2013-08-06T22:34:59Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* EXIF  */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Dump high-resolution image stills from Matroska containers into a folder===&lt;br /&gt;
*gst-launch filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink location=&amp;quot;image%04d.jpg&amp;quot; sync=false&lt;br /&gt;
&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&lt;br /&gt;
===Add EXIF Metadata to generated image stills===&lt;br /&gt;
*This command will &#039;&#039;replace&#039;&#039; images in a directory with the same image, metadata included - be sure to have backup copies.&lt;br /&gt;
*&amp;quot;-flash#=0x0020&amp;quot; indicates that the camera has no flash capability.&lt;br /&gt;
*Generally compatible with MediaGoblin&lt;br /&gt;
*exiftool  -Author=&#039;Your name&#039; -Copyright=&#039;copyright license + URL&#039; -make=&#039;Elphel&#039; -model=&#039;NC353L-369-12V&#039;  -Xresolution=72 -Yresolution=72  -resolutionunit=inches -flash#=0x0020 -DateTimeOriginal=&#039;2012:05:04 10:00:00-5&#039; -exposuremode=&#039;Manual&#039; -FNumber=&#039;1.4&#039; -UserComment=&#039;Lens or adapter used, or other notes&#039; -GPSLatitude=42.360857 -GPSLatitudeRef=N -GPSLongitude=71.09122 -GPSLongitudeRef=W  -overwrite_original *.jpg&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14224</id>
		<title>GST cookbook</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook&amp;diff=14224"/>
		<updated>2013-08-02T17:53:43Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add JP46 single-image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GStreamer is a powerful multimedia infrastructure for applications—providing a number of programming language constructs and bindings—but also provides easy-to-use rapid prototyping tools to test new multimedia pipelines.  Additionally, Gstreamer usually has good support for Xiph-related formats.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it can be rather difficult to figure out an appropriate pipeline without a starting point.  This page is a collection of gst-launch pipelines that can be used on an as-needed basis.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #ffffff; border: 1px solid #000000; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;&amp;quot;&amp;gt;Note that some examples are &amp;quot;high-performance&amp;quot; pipelines which require purpose-built systems.&amp;lt;br&amp;gt;[[GST_cookbook/gNewSense|gNewSense build notes]] | [[GST_cookbook/Trisquel6|Trisquel Build Notes]]&amp;lt;/div&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Encode a .wav to Vorbis:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.wav&amp;quot;  ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=&amp;quot;OUTPUT.ogg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Dump a Theora video to PNGs:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.ogv&amp;quot; !  oggdemux ! theoradec ! ffmpegcolorspace ! pngenc snapshot=false ! multifilesink location=&amp;quot;OUTPUT%04d.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Transmux a MKV (containing vorbis and theora) to Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.mkv&amp;quot; ! matroskademux name=d ! video/x-theora ! queue ! theoraparse ! oggmux name=mux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot; d. ! audio/x-vorbis ! queue ! vorbisparse ! queue ! mux.&lt;br /&gt;
&lt;br /&gt;
===Encode a y4m to lossless Dirac in Ogg:===&lt;br /&gt;
*gst-launch filesrc location=&amp;quot;INPUT.y4m&amp;quot; ! decodebin ! schroenc force-profile=vc2_main rate-control=lossless ! oggmux ! filesink location=&amp;quot;OUTPUT.ogv&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pull from a windows media stream, transcode to Ogg/Theora+Vorbis and send to a icecast server:===&lt;br /&gt;
(may require purchasing Fluendo plugins for decoding the encumbered codecs)&lt;br /&gt;
*gst-launch uridecodebin uri=mms://SOURCE.SERVER.COM/path name=d ! queue max-size-time=100000000 ! ffmpegcolorspace ! theoraenc bitrate=800 ! oggmux name=mux ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv d. ! queue max-size-time=100000000 ! audioconvert ! vorbisenc ! mux.&lt;br /&gt;
&lt;br /&gt;
===Capture video from a webcam, encode to an Ogg Theora file, decode and display on screen, write to a file whose name is the current date+time, and stream to an IceCast server===&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src ! &#039;video/x-raw-yuv, width=640, height=480&#039; ! videorate ! &#039;video/x-raw-yuv, framerate=15/1&#039; ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=150 ! oggmux ! tee name=ogged ! queue max-size-bytes=100000000 max-size-time=0 ! oggdemux ! theoradec ! xvimagesink sync=false force-aspect-ratio=true ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=`date +%F_%T`.ogv ogged. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=YOURICECAST.SERVER.COM port=8000 password=YOURPASSWORD mount=/OUTPUTFILENAME.ogv streamname=YOURSTREAMNAME description=YOURDESCRIPTION genre=YOURGENRE url=YOURSTREAMURL ogged.&lt;br /&gt;
&lt;br /&gt;
===A v4l2 source + ALSA source -&amp;gt; Dual Ogg Theora + Ogg Vorbis Streams -&amp;gt; Icecast ===&lt;br /&gt;
*dov4l -i [0|1] -m NTSC&lt;br /&gt;
*gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video0 ! queue max-size-bytes=100000000 max-size-time=0 ! deinterlace mode=interlaced ! queue max-size-bytes=100000000 max-size-time=0  ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=360,height=240,pixel-aspect-ratio=1/1 ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! audioamplify amplification=[1-6 or so] ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.ogv  vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=server.com port=[80|8000] password=hackme mount=/mountpoint.oga&lt;br /&gt;
&lt;br /&gt;
:Note that the above pipeline will slowly lose audio/video synchronization due to hardware-level limitations in audio vs. video capture of media samples.  FireWire and SDI-based capture does not have these limitations.&lt;br /&gt;
&lt;br /&gt;
===Two v4l2 sources combined side-by-side into rectangular video + ALSA -&amp;gt; Ogg Theora -&amp;gt; IceCast===&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video0:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*mplayer tv:// -tv device=/dev/video1:driver=v4l2:norm=NTSC:width=320:height=240:outfmt=uyvy:input=1:buffersize=16: -ao null&lt;br /&gt;
*gst-launch --eos-on-shutdown v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! queue max-size-bytes=100000000 max-size-time=0 ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0  ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:1,0 latency-time=100 ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0  ! shout2send ip=icecast-server.com password=hackme mount=/mountpoint.ogv  v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240,interlaced=true ! gamma gamma=1.2 ! queue max-size-bytes=100000000 max-size-time=0 ! videobalance saturation=1.9 brightness=0.00 contrast=1.4 hue=0.06 !  queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=5/1 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0  ! videobox border-alpha=0 fill=green left=-320 ! mix.&lt;br /&gt;
&lt;br /&gt;
===Create a video with an alpha channel from a sequence of PNG files===&lt;br /&gt;
*gst-launch-0.10 multifilesrc location=images%05d.png caps=&amp;quot;image/png,framerate=1/1,pixel-aspect-ratio=1/1&amp;quot; num-buffers=95 ! pngdec ! videorate ! alphacolor ! &amp;quot;video/x-raw-yuv,format=(fourcc)AYUV&amp;quot; ! matroskamux ! filesink location=images_raw.mkv&lt;br /&gt;
&lt;br /&gt;
===Capture from a 1680x1050 GNOME Desktop, Combine with ALSA -&amp;gt; Ogg Theora + Vorbis -&amp;gt; Icecast===&lt;br /&gt;
*gst-launch  --eos-on-shutdown ximagesrc ! capsfilter caps=video/x-raw-rgb,framerate=3/1,width=1680,height=1050  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-rgb, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=mux alsasrc device=hw:0,0 ! audio/x-raw-init,rate=44100,channels=1 ! queue max-size-bytes=100000000 ! audioconvert ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=icecast-server.com  password=hackme mount=/mountpoint.ogv&lt;br /&gt;
*Icecast will need to be built from SVN (ver. 2.3.2 fails to relay data due to a bug)&lt;br /&gt;
*Viewers will need better-than-average internet connectivity (around 1.5Mbits/sec)&lt;br /&gt;
*The simplest way to capture audio events is to place a mic next to computer speakers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Live-stream a high-resolution Mac OSX Desktop at 1 FPS===&lt;br /&gt;
*Tested on Version 10.6.8, newer releases not compatible with [https://github.com/davibe/osximagesrc osximagesrc]&lt;br /&gt;
&lt;br /&gt;
gst-launch --eos-on-shutdown osximagesrc ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! videoscale method=4-tap ! video/x-raw-yuv, width=960, height=600 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=360 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=host.com password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
If the screen resolution is set to mirrored 1024x640 (?), start the following &#039;&#039;then&#039;&#039; plug in the video display cable:&lt;br /&gt;
*gst-launch --eos-on-shutdown osximagesrc ! queue max-size-time=0 max-size-bytes=100000000 ! ffmpegcolorspace ! queue max-size-time=0 max-size-bytes=100000000 ! videocrop right=256 top=32 ! queue max-size-time=0 max-size-bytes=100000000 ! videoscale ! video/x-raw-yuv, width=658, height=486 ! queue max-size-time=0 max-size-bytes=100000000 ! theoraenc bitrate=300 keyframe-auto=false keyframe-force=3 keyframe-freq=3 speed-level=0 drop-frames=false ! queue max-size-time=0 max-size-bytes=100000000 ! oggmux ! queue  max-size-time=0 max-size-bytes=100000000 ! shout2send ip=host.com port=8000 password=hackme mount=/mountpoint.ogv&lt;br /&gt;
&lt;br /&gt;
*Streamed Keynote talks will stream the Presenter&#039;s View -- no switching between display mirrors&lt;br /&gt;
*Full-screen Flash video doesn&#039;t stream, but doesn&#039;t halt the pipeline&lt;br /&gt;
&lt;br /&gt;
===Live-stream an Elphel 353L camera, combine with on-laptop audio capture, save a high-res copy to disk, and view live audio+video on-screen===&lt;br /&gt;
*Tested on an 2.4GHz Core i3 running at ≥2.0GHz.  Both CPU cores should be at ~50% continuously-smooth utilization after the first ~15 seconds; battery-only power or overheating may throttle the CPU leading to dropped frames.&lt;br /&gt;
*Set the camera to 2592x1120 @ 18FPS.  Adjust camera controls to ensure the camera achieves this framerate.&lt;br /&gt;
*Kill/renice any resource-competitive applications (file indexing services, Firefox, Audacity, etc.)&lt;br /&gt;
*qjackctl &amp;amp;  → Start JACK in realtime priority&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;0.10&#039;&#039;&#039; -e &amp;lt;span style=&amp;quot;color:#8B0000&amp;quot;&amp;gt;rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;halfres&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=&amp;lt;/span&amp;gt;&#039;&#039;&#039;jackaudio&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#C71585&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#4B0082&amp;quot;&amp;gt;mux.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;mux.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FFB6C1&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=450 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream&amp;lt;/span&amp;gt; &#039;&#039;&#039;jackaudio.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#4682B4&amp;quot;&amp;gt;queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc  ! queue max-size-bytes=100000000 max-size-time=0&amp;lt;/span&amp;gt; ! &amp;lt;span style=&amp;quot;color:#006400&amp;quot;&amp;gt;livestream.&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;livestream.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#CD5C5C;&amp;quot;&amp;gt; queue max-size-bytes=0 max-size-time=0 !  shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv&amp;lt;/span&amp;gt;{{pad|1em}}&#039;&#039;&#039;halfres.&#039;&#039;&#039; ! &amp;lt;span style=&amp;quot;color:#FF8C00;&amp;quot;&amp;gt;videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&amp;lt;/span&amp;gt; jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*gst-launch-&#039;&#039;&#039;1.0&#039;&#039;&#039; -e  rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name=&amp;quot;GStreamer Input&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 !  tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio !  queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=500 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. !  queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false  jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*Expect a ~50GB recording for 8hrs. of recording depending on image complexity.  The Matroska recording may be viewed directly in VLC (≥2.0 recommended) and may be transcoded to commonly-used formats &#039;&#039;via&#039;&#039; [http://www.mirovideoconverter.com/ Miro Video Converter] or [http://firefogg.org/ Firefogg].&lt;br /&gt;
:Alternatively: ffmpeg -i elphel_recording.mkv -acodec libfaac -ab 128k -pass 1 -vcodec libx264 -vpre slow -vpre main -b 8000k -threads 8 -f mp4 -y elphel_recording.mp4 &lt;br /&gt;
&lt;br /&gt;
====Same as above, but simultaneously broadcast in H.264 ====&lt;br /&gt;
*Experimental; use latest git checkouts&lt;br /&gt;
*Tested with [http://www.rtmpd.com/ crtmpserver] (works) and [http://momentvideo.org/ Moment Video Server] (in theory)&lt;br /&gt;
:If Moment, remove &#039;pingTimerTick&#039; &#039;from moment/rtmp_connection.cpp&#039; to avoid stream resets&lt;br /&gt;
:Test stream availability with [http://dl.dropbox.com/u/2918563/flvplayback.swf this tool.]&lt;br /&gt;
:Toggle &#039;byte-stream=[true|false]&#039; and &#039;[tcpclientsink|rtmpsink]&#039; as necessary, possibly &#039;[flvmux|mp4mux]&#039; if needed.&lt;br /&gt;
::&#039;rtmpsink&#039; isn&#039;t yet compatible with Akamai&lt;br /&gt;
*Substitute &#039;videotestsrc is-live=true&#039; for &#039;rtspsrc ... jpegdec&#039; and &#039;audiotestsrc freq=432&#039; for &#039;jackaudiosrc connect=1&#039; for testing.&lt;br /&gt;
&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.0.9:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=18/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mkvmux jackaudiosrc connect=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mkvmux. mkvmux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=elphel_recording_`date +%F_%T`.mkv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv, width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=quarterres !  queue max-size-bytes=100000000 max-size-time=0 ! x264enc sliced-threads=true cabac=true intra-refresh=false quantizer=22 rc-lookahead=15 bitrate=600 tune=zerolatency byte-stream=false ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux streamable=true name=flvmux jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! faac ! queue max-size-bytes=100000000 max-size-time=0 ! flvmux.  flvmux. ! queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=127.0.0.1 port=6666  quarterres. ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=600 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;div id=ElphelJP46&amp;gt;Live-stream an Elphel 353L camera set at &#039;FullHD&#039; JP46, combine with realtime audio, save a high-res copy to disk, and monitor live audio+video on-screen&amp;lt;/div&amp;gt;===&lt;br /&gt;
*[https://media.xiph.org/jp46_cookbook/ Video samples]&lt;br /&gt;
*Setup a high-performance system: tested on Gigabyte GA-MA785GMT-UD2H + (non-overclocked) Phenom II X4 [[GST_cookbook/gNewSense|built using gNewSense.]]  CPU utilization approaches 100%, continuously, across all four 3.2GHz cores.&lt;br /&gt;
*Set the camera to 1920x1088, JPEG Image Quality @ 90%, JP46 color mode&lt;br /&gt;
In separate tabs:&lt;br /&gt;
*jackd -R -d alsa -C -d hw:2 -r 48000 -i 1&lt;br /&gt;
*gst-launch-0.10 -e rtspsrc location=rtsp://192.168.1.50:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! queue max-size-bytes=1000000000 max-size-time=0 ! videorate force-fps=18 ! queue max-size-bytes=1000000000 max-size-time=0 ! jpegdec max-errors=-1 idct-method=2 ! queue max-size-bytes=1000000000 max-size-time=0 ! jp462bayer threads=4 ! &amp;quot;video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! bayer2rgb2 method=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! &amp;quot;video/x-raw-yuv, format=(fourcc)I420&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! videobalance saturation=1.9 ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=fullHD ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux  jackaudiosrc connect=1 ! queue max-size-time=0 ! audio/x-raw-float,channels=1 ! queue max-size-time=0 ! tee name=jackaudio ! queue max-size-time=0 ! vorbisenc max-bitrate=80000 ! queue max-size-time=0 ! tee name=vorbisaudio ! queue max-size-time=0 ! mux.  mux. ! queue max-size-bytes=1000000000 max-size-time=0 ! filesink location=elphel_recording_`date +%s`.mkv sync=false  fullHD. ! queue max-size-bytes=1000000000 max-size-time=0 ! videoscale ! &amp;quot;video/x-raw-yuv, width=640, height=363, aspect-ratio=(fraction)1/1&amp;quot; ! queue max-size-bytes=1000000000 max-size-time=0 ! tee name=downsample ! queue max-size-bytes=1000000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=1000000000 max-size-time=0 ! ximagesink pixel-aspect-ratio=1/1 sync=false downsample. ! queue max-size-bytes=100000000 max-size-time=0 ! queue max-size-bytes=1000000000 max-size-time=0 ! theoraenc bitrate=550 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux name=livestream  vorbisaudio. ! queue max-size-time=0 ! livestream.  livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=host.com port=[80|8000] password=hackme mount=/mountpoint.ogv  jackaudio. ! queue max-size-time=0 ! audioconvert ! queue max-size-time=0 ! alsasink&lt;br /&gt;
&lt;br /&gt;
===Debayer + convert to RGB a single JP46 frame using Elphel 353L===&lt;br /&gt;
*Use the following to extracting the highest-quality image possible (save JP4):&lt;br /&gt;
*Set the Elphel camera to operate in JP46 mode using full-frame imaging (&#039;&#039;i.e.&#039;&#039;, 2592x1936)&lt;br /&gt;
*&amp;quot;Shift+Click&amp;quot; on the &amp;quot;view image&amp;quot; icon in the Elphel Camera Control Interface to save an image still&lt;br /&gt;
*gst-launch-0.10 filesrc location=&amp;quot;/path/to/elphelimg_nnnnnnn.jp46&amp;quot;  ! queue max-size-bytes=1000000000 ! jpegdec idct-method=2  ! queue max-size-bytes=1000000000 !  jp462bayer ! &amp;quot;video/x-raw-bayer, width=(int)2592, height=(int)1936, format=(string)grbg&amp;quot; ! queue max-size-bytes=1000000000 ! bayer2rgb2 method=4 ! queue max-size-bytes=1000000000 ! pngenc compression-level=1 ! max-size-bytes=1000000000 ! filesink location=&amp;quot;/path/to/outputimage.png&amp;quot;&lt;br /&gt;
*Open with GIMP&lt;br /&gt;
&lt;br /&gt;
===Dump high-resolution image stills from Matroska containers into a folder===&lt;br /&gt;
*gst-launch filesrc location=recording.mkv ! queue ! matroskademux ! queue ! videorate ! image/jpeg,framerate=1/10 ! queue ! multifilesink location=&amp;quot;image%04d.jpg&amp;quot; sync=false&lt;br /&gt;
&lt;br /&gt;
*Remove any colons input filenames to avoid BASH issues&lt;br /&gt;
*Change the framerate to control the time interval between image stills and number of produced stills&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mix Three Video Sources Side-by-Side-by-Side===&lt;br /&gt;
*gst-launch --eos-on-shutdown videotestsrc pattern=6 is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! clockoverlay halignment=1 valignment=1 shaded-background=true font-desc=&amp;quot;Sans Bold 80&amp;quot; ypad=80 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=green left=-320 ! queue max-size-bytes=100000000 max-size-time=0 ! videomixer name=mix ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! ximagesink sync=false videotestsrc is-live=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! queue max-size-bytes=100000000 max-size-time=0 ! ffmpegcolorspace ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw-yuv,framerate=15/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videobox border-alpha=0 fill=blue left=-640 ! queue max-size-bytes=100000000 max-size-time=0 !  mix.  videotestsrc pattern=11 ! &amp;quot;video/x-raw-yuv, width=352, height=240&amp;quot; ! queue max-size-bytes=100000000 max-size-time=0 ! mix.&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14119</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14119"/>
		<updated>2013-05-05T17:46:04Z</updated>

		<summary type="html">&lt;p&gt;GChriss: line break&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;`#Every line in this page is executable in BASH.  Have fun\!`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Release 6.0 (toutatis) GStreamer Build Instructions`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Tested on a Lenovo x201i by GChriss / 15-April-2013`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Prepare live USB key as documented:`&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Run through install prompts and reboot`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open Terminal:`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Get this stuff outta here...`&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
`#(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libsoupcutter-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create this file and add the line that follows:`&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local `#--&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but helpful step for realtime audio processing`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
`#&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m`&amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#reboot and check for PREEMPT`&amp;lt;br&amp;gt;&lt;br /&gt;
uname -a |grep PREEMPT&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc `#-&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#YASM is optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
#vi /etc/security/limits.conf `#-&amp;gt; add the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf `#-&amp;gt; create file with the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss `#--&amp;gt; subsitute &#039;gchriss&#039; for your username`&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#At this point UI volume controls are missing/non-functional, but alsamixer works.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Build pulseaudio if needed, but otherwise optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Also optional (but recommended):`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
`#See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012`&amp;lt;br&amp;gt;&lt;br /&gt;
`#--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: The following builds but fails to connect to pulseaudio... debug needed?`&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open abrowser, download:`&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[all &#039;make check&#039; tests pass]`&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libvpx-v1.1.0.tar.bz2 &amp;amp;&amp;amp; cd libvpx-v1.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but really helpful:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create the following block entries for automatic execution @ user login`&amp;lt;br&amp;gt;&lt;br /&gt;
`#The first two entries are specific to managing Thinkpad-series laptops`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/cpufreq-selector.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=cpu-freq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=cpufreq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/echo.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/gnome-terminal.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=gnome-terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/qjackctl.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#network-manager can sometimes be flaky, issue on an as-needed basis:`&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
`#This section is for building Pidgin and Farsight from source.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Skip the following two blocks if building Pidgin against GStreamer 1.0]`&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[/skip]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
`#[/end experimental section]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get -y install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Include support for non-libre standards implemented using free software...]`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Optional extra Totem plugins]`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get -y install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]`&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
==LightWorks (proprietary, tethered application)==&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/libcg_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb libcg_3.0.0016-0ubuntu1_amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libportaudio2 libportaudiocpp0 libgsf-1-114 libgsf-1-common libjack-jackd2-0&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.lwks.com/betas-linux --&amp;gt; Register, agree to terms of service, download lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
lightworks &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14118</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14118"/>
		<updated>2013-05-05T17:45:46Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add executable comments, hopefully helps w/ prepping for puppitization while maintaining manual-build readability&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;`#Every line in this page is executable in BASH.  Have fun\!`&lt;br /&gt;
`#Trisquel Release 6.0 (toutatis) GStreamer Build Instructions`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Tested on a Lenovo x201i by GChriss / 15-April-2013`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Prepare live USB key as documented:`&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Run through install prompts and reboot`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open Terminal:`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Get this stuff outta here...`&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
`#(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libsoupcutter-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create this file and add the line that follows:`&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local `#--&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but helpful step for realtime audio processing`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
`#&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m`&amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#reboot and check for PREEMPT`&amp;lt;br&amp;gt;&lt;br /&gt;
uname -a |grep PREEMPT&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc `#-&amp;gt; add the following:`&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#YASM is optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
#vi /etc/security/limits.conf `#-&amp;gt; add the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf `#-&amp;gt; create file with the following line:`&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss `#--&amp;gt; subsitute &#039;gchriss&#039; for your username`&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#At this point UI volume controls are missing/non-functional, but alsamixer works.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Build pulseaudio if needed, but otherwise optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Also optional (but recommended):`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
`#See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012`&amp;lt;br&amp;gt;&lt;br /&gt;
`#--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;`&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#TODO: The following builds but fails to connect to pulseaudio... debug needed?`&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Open abrowser, download:`&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[all &#039;make check&#039; tests pass]`&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libvpx-v1.1.0.tar.bz2 &amp;amp;&amp;amp; cd libvpx-v1.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Optional but really helpful:`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Create the following block entries for automatic execution @ user login`&amp;lt;br&amp;gt;&lt;br /&gt;
`#The first two entries are specific to managing Thinkpad-series laptops`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/cpufreq-selector.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=cpu-freq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=cpufreq-selector`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Set 2.4GHz (x4)`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/echo.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=Spin up x201i Fan`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/gnome-terminal.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=gnome-terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=GNOME Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Just to get things started...`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cat ~/.config/autostart/qjackctl.desktop&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Desktop Entry]`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Type=Application`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Hidden=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#NoDisplay=false`&amp;lt;br&amp;gt;&lt;br /&gt;
`#X-GNOME-Autostart-enabled=true`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name[en_US]=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Name=qjackctl`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment[en_US]=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Comment=Launch openvideopro qjackctl / -GChriss`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#network-manager can sometimes be flaky, issue on an as-needed basis:`&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
`#This section is for building Pidgin and Farsight from source.`&amp;lt;br&amp;gt;&lt;br /&gt;
`#Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Skip the following two blocks if building Pidgin against GStreamer 1.0]`&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[/skip]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]`&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
`#[/end experimental section]`&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get -y install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Include support for non-libre standards implemented using free software...]`&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#[Optional extra Totem plugins]`&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get -y install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
`#[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]`&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
`#Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal`&amp;lt;br&amp;gt;&lt;br /&gt;
==LightWorks (proprietary, tethered application)==&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/libcg_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb libcg_3.0.0016-0ubuntu1_amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get -y install libportaudio2 libportaudiocpp0 libgsf-1-114 libgsf-1-common libjack-jackd2-0&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.lwks.com/betas-linux --&amp;gt; Register, agree to terms of service, download lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
lightworks &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14117</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14117"/>
		<updated>2013-05-05T17:22:43Z</updated>

		<summary type="html">&lt;p&gt;GChriss: +libsoupcutter-dev + WebM + LightWorks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trisquel Release 6.0 (toutatis) GStreamer Build Instructions&amp;lt;br&amp;gt;&lt;br /&gt;
Tested on a Lenovo x201i by GChriss / 15-April-2013 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare live USB key as documented:&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition&amp;lt;br&amp;gt;&lt;br /&gt;
Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run through install prompts and reboot&amp;lt;br&amp;gt;&lt;br /&gt;
Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open Terminal:&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Get this stuff outta here...&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libsoupcutter-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create this file and add the line that follows:&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local --&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but helpful step for realtime audio processing&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m &amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot and check for PREEMPT in &#039;uname -a&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Linux x201 3.8.6-gnu #1 SMP PREEMPT Sat Apr 13 02:07:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc -&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
YASM is optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.conf -&amp;gt; add the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf -&amp;gt; create file with the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss --&amp;gt; subsitute &#039;gchriss&#039; for your username&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At this point UI volume controls are missing/non-functional, but alsamixer works.&amp;lt;br&amp;gt;&lt;br /&gt;
Build pulseaudio if needed, but otherwise optional:&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also optional (but recommended):&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012&amp;lt;br&amp;gt;&lt;br /&gt;
--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: The following builds but fails to connect to pulseaudio... debug needed?&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Rebuild Totem + PiTiVi&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open abrowser, download:&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
[all &#039;make check&#039; tests pass]&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libvpx-v1.1.0.tar.bz2 &amp;amp;&amp;amp; cd libvpx-v1.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
 make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but really helpful:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
Create the following block entries for automatic execution @ user login&amp;lt;br&amp;gt;&lt;br /&gt;
The first two entries are specific to managing Thinkpad-series laptops&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/cpufreq-selector.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=cpu-freq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Name=cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/echo.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Name=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/gnome-terminal.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=gnome-terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Name=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/qjackctl.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Name=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
network-manager can sometimes be flaky, issue on an as-needed basis:&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
This section is for building Pidgin and Farsight from source.&amp;lt;br&amp;gt;&lt;br /&gt;
Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Skip the following two blocks if building Pidgin against GStreamer 1.0]&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[/skip]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
[/end experimental section]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Include support for non-libre standards implemented using free software...]&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Optional extra Totem plugins]&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
==LightWorks (proprietary, tethered application)==&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://mirrors.us.kernel.org/ubuntu/pool/multiverse/n/nvidia-cg-toolkit/libcg_3.0.0016-0ubuntu1_amd64.deb&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i nvidia-cg-toolkit_3.0.0016-0ubuntu1_amd64.deb libcg_3.0.0016-0ubuntu1_amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install libportaudio2 libportaudiocpp0 libgsf-1-114 libgsf-1-common libjack-jackd2-0&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.lwks.com/betas-linux --&amp;gt; Register, agree to terms of service, download lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i lwks-11.1.H-amd64.deb&amp;lt;br&amp;gt;&lt;br /&gt;
lightworks &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14116</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14116"/>
		<updated>2013-05-04T17:16:47Z</updated>

		<summary type="html">&lt;p&gt;GChriss: /* Totem */ add grilo plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trisquel Release 6.0 (toutatis) GStreamer Build Instructions&amp;lt;br&amp;gt;&lt;br /&gt;
Tested on a Lenovo x201i by GChriss / 15-April-2013 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare live USB key as documented:&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition&amp;lt;br&amp;gt;&lt;br /&gt;
Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run through install prompts and reboot&amp;lt;br&amp;gt;&lt;br /&gt;
Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open Terminal:&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Get this stuff outta here...&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create this file and add the line that follows:&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local --&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but helpful step for realtime audio processing&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m &amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot and check for PREEMPT in &#039;uname -a&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Linux x201 3.8.6-gnu #1 SMP PREEMPT Sat Apr 13 02:07:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc -&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
YASM is optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.conf -&amp;gt; add the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf -&amp;gt; create file with the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss --&amp;gt; subsitute &#039;gchriss&#039; for your username&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At this point UI volume controls are missing/non-functional, but alsamixer works.&amp;lt;br&amp;gt;&lt;br /&gt;
Build pulseaudio if needed, but otherwise optional:&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also optional (but recommended):&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012&amp;lt;br&amp;gt;&lt;br /&gt;
--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: The following builds but fails to connect to pulseaudio... debug needed?&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Rebuild Totem + PiTiVi&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open abrowser, download:&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
[all &#039;make check&#039; tests pass]&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but really helpful:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
Create the following block entries for automatic execution @ user login&amp;lt;br&amp;gt;&lt;br /&gt;
The first two entries are specific to managing Thinkpad-series laptops&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/cpufreq-selector.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=cpu-freq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Name=cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/echo.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Name=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/gnome-terminal.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=gnome-terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Name=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/qjackctl.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Name=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
network-manager can sometimes be flaky, issue on an as-needed basis:&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
This section is for building Pidgin and Farsight from source.&amp;lt;br&amp;gt;&lt;br /&gt;
Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Skip the following two blocks if building Pidgin against GStreamer 1.0]&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[/skip]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
[/end experimental section]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Include support for non-libre standards implemented using free software...]&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Optional extra Totem plugins]&amp;lt;br&amp;gt;&lt;br /&gt;
sudo apt-get install libdconf-dbus-1-0 libgssdp-1.0-dev libgupnp-1.0-dev libgupnp-av-1.0-dev libgupnp-dlna-1.0-dev libdmapsharing-3.0-dev libgdata-dev libquvi-dev libtracker-sparql-0.14-dev&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/0.2/grilo-plugins-0.2.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-plugins-0.2.6.tar.xz &amp;amp;&amp;amp; cd grilo-plugins-0.2.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[TODO: Fix HTTP (&#039;urisource-http&#039;) downloads]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd&amp;lt;br&amp;gt;&lt;br /&gt;
totem &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launch Totem a few time to clear extraneous GStreamer plugin messages from being printed on the Terminal&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14115</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14115"/>
		<updated>2013-05-04T07:14:46Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add first-past Totem instructions + edits to main build instructions.  Totem works just fine, if not a little rough on edges&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trisquel Release 6.0 (toutatis) GStreamer Build Instructions&amp;lt;br&amp;gt;&lt;br /&gt;
Tested on a Lenovo x201i by GChriss / 15-April-2013 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare live USB key as documented:&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition&amp;lt;br&amp;gt;&lt;br /&gt;
Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run through install prompts and reboot&amp;lt;br&amp;gt;&lt;br /&gt;
Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open Terminal:&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Get this stuff outta here...&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libgnome-media-profiles-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools libfam-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create this file and add the line that follows:&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local --&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but helpful step for realtime audio processing&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m &amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot and check for PREEMPT in &#039;uname -a&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Linux x201 3.8.6-gnu #1 SMP PREEMPT Sat Apr 13 02:07:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc -&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig:/packages/openvideopro/lib64/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnu.org/gnu/automake/automake-1.13.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf automake-1.13.1.tar.gz &amp;amp;&amp;amp; cd automake-1.13.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
YASM is optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.conf -&amp;gt; add the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf -&amp;gt; create file with the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss --&amp;gt; subsitute &#039;gchriss&#039; for your username&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At this point UI volume controls are missing/non-functional, but alsamixer works.&amp;lt;br&amp;gt;&lt;br /&gt;
Build pulseaudio if needed, but otherwise optional:&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also optional (but recommended):&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012&amp;lt;br&amp;gt;&lt;br /&gt;
--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: The following builds but fails to connect to pulseaudio... debug needed?&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Rebuild Totem + PiTiVi&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open abrowser, download:&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.37/glib-2.37.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.37.0.tar.xz &amp;amp;&amp;amp; cd glib-2.37.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
[all &#039;make check&#039; tests pass]&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but really helpful:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
Create the following block entries for automatic execution @ user login&amp;lt;br&amp;gt;&lt;br /&gt;
The first two entries are specific to managing Thinkpad-series laptops&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/cpufreq-selector.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=cpu-freq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Name=cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/echo.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Name=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/gnome-terminal.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=gnome-terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Name=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/qjackctl.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Name=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
network-manager can sometimes be flaky, issue on an as-needed basis:&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
This section is for building Pidgin and Farsight from source.&amp;lt;br&amp;gt;&lt;br /&gt;
Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Skip the following two blocks if building Pidgin against GStreamer 1.0]&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[/skip]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install&lt;br /&gt;
[/end experimental section]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Totem==&lt;br /&gt;
apt-get install itstool libclutter-gst-dev libclutter-gtk-1.0-dev gsettings-desktop-schemas-dev libbonobo2-dev libgail-dev libxtst-dev libgmime-2.6-dev libsoup-gnome2.4-dev gobject-introspection libpeas-dev libvala-0.16-dev valac-0.16-vapi valac-0.16 pylint liblircclient-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Include support for non-libre standards implemented using free software...]&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install libbz2-dev libcurl4-gnutls-dev libfaad-dev libmms-dev libgio2.0-cil-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf opus-1.0.2.tar.gz &amp;amp;&amp;amp; cd opus-1.0.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.0.7.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-bad-1.0.7.tar.xz &amp;amp;&amp;amp; cd gst-plugins-bad-1.0.7&amp;lt;br&amp;gt;&lt;br /&gt;
OPUS_CFLAGS=&#039;-I/packages/openvideopro/include&#039; ./configure --enable-experimental --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-2.0.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf clutter-gst-2.0.0.tar.xz &amp;amp;&amp;amp; cd clutter-gst-2.0.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf atk-2.8.0.tar.xz &amp;amp;&amp;amp; cd atk-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-core-2.8.0.tar.xz &amp;amp;&amp;amp; cd at-spi2-core-2.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf at-spi2-atk-2.8.1.tar.xz &amp;amp;&amp;amp; cd at-spi2-atk-2.8.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gtk+-3.6.4.tar.xz &amp;amp;&amp;amp; cd gtk+-3.6.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --disable-glibtest &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.36/gobject-introspection-1.36.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gobject-introspection-1.36.0.tar.xz &amp;amp;&amp;amp; cd gobject-introspection-1.36.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf py2cairo-1.10.0.tar.bz2 &amp;amp;&amp;amp; cd py2cairo-1.10.0&amp;lt;br&amp;gt;&lt;br /&gt;
./waf configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf build &amp;amp;&amp;gt;gsc_build.log&amp;lt;br&amp;gt;&lt;br /&gt;
./waf install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.1.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pygobject-3.9.1.tar.xz &amp;amp;&amp;amp; cd pygobject-3.9.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --disable-glibtest --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/3.4/totem-pl-parser-3.4.4.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-pl-parser-3.4.4.tar.xz &amp;amp;&amp;amp; cd totem-pl-parser-3.4.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.acc.umu.se/pub/GNOME/sources/grilo/0.2/grilo-0.2.5.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf grilo-0.2.5.tar.xz &amp;amp;&amp;amp; cd grilo-0.2.5&amp;lt;br&amp;gt;&lt;br /&gt;
./configure  --disable-debug --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/GNOME/sources/totem/3.8/totem-3.8.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf totem-3.8.0.tar.xz &amp;amp;&amp;amp; cd totem-3.8.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14112</id>
		<title>GST cookbook/Trisquel6</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GST_cookbook/Trisquel6&amp;diff=14112"/>
		<updated>2013-05-02T18:39:33Z</updated>

		<summary type="html">&lt;p&gt;GChriss: add Pidgin build notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trisquel Release 6.0 (toutatis) GStreamer Build Instructions&amp;lt;br&amp;gt;&lt;br /&gt;
Tested on a Lenovo x201i by GChriss / 15-April-2013 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare live USB key as documented:&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
transmission-gtk trisquel_6.0_amd64.iso.torrent &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M&amp;lt;br&amp;gt;&lt;br /&gt;
sync&amp;lt;br&amp;gt;&lt;br /&gt;
cd /media/trisquel\ 6.0\ amd64/&amp;lt;br&amp;gt;&lt;br /&gt;
md5sum -c md5sum.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Boot USB key in BIOS -&amp;gt; Install to disk -&amp;gt; Manual partition&amp;lt;br&amp;gt;&lt;br /&gt;
Use a smaller &#039;/&#039; partition (~20GB), ~2GB swap space, the remainder as &#039;/home&#039;, all primary partitions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run through install prompts and reboot&amp;lt;br&amp;gt;&lt;br /&gt;
Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Trisquel Menu -&amp;gt; System Settings -&amp;gt; Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open Terminal:&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Get this stuff outta here...&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/init.d/apparmor stop&amp;lt;br&amp;gt;&lt;br /&gt;
update-rc.d -f apparmor remove&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get update&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;echo &amp;quot;linux-image-generic hold&amp;quot; | dpkg --set-selections&amp;lt;br&amp;gt;&lt;br /&gt;
(To undo: echo &amp;quot;linux-image-generic install&amp;quot; | dpkg --set-selections )&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get dist-upgrade&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libglib2.0-dev libglib2.0-dev libgnome-media-profiles-dev libgtk2.0-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 0755 /usr/bin/cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create this file and add the line that follows:&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/modprobe.d/thinkpad_acpi.conf &amp;lt;br&amp;gt;&lt;br /&gt;
options thinkpad_acpi fan_control=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/rc.local --&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
chmod 666 /proc/acpi/ibm/fan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
indicator-multiload &amp;amp;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but helpful step for realtime audio processing&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
cd /usr/src&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
cd linux-3.8.6/&amp;lt;br&amp;gt;&lt;br /&gt;
cp /boot/config-3.2.0-38-generic .config&amp;lt;br&amp;gt;&lt;br /&gt;
make oldconfig -&amp;gt; hold down enter key to accept defaults&amp;lt;br&amp;gt;&lt;br /&gt;
make gconfig&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;CONFIG_PREEMPT=y&#039; + ALSA built as modules, &#039;CONFIG_HZ_100=y&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m &amp;lt;br&amp;gt;&lt;br /&gt;
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &amp;amp;&amp;gt;gsc_make-deb-pkg.log&amp;lt;br&amp;gt;&lt;br /&gt;
dpkg -i ../*.deb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot and check for PREEMPT in &#039;uname -a&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Linux x201 3.8.6-gnu #1 SMP PREEMPT Sat Apr 13 02:07:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/lib &amp;amp;&amp;amp; mkdir -p /packages/openvideopro/bin&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
chown -R gchriss:users /packages&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
rm -Rf ~/.gstreamer-0.10&amp;lt;br&amp;gt;&lt;br /&gt;
vi ~/.bashrc -&amp;gt; add the following:&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_SYSTEM_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export GST_PLUGIN_PATH=&amp;quot;/packages/openvideopro/lib&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig&amp;lt;br&amp;gt;&lt;br /&gt;
export PATH=/packages/openvideopro/bin:$PATH&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://repo.or.cz/nasm.git nasm_14april2013 &amp;amp;&amp;amp; cd nasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
YASM is optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://github.com/yasm/yasm.git yasm_14april2013 &amp;amp;&amp;amp; cd yasm_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh --no-configure &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://code.entropywave.com/git/orc.git orc_14april2013 &amp;amp;&amp;amp; cd orc_14april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz &amp;amp;&amp;amp; cd jack-audio-connection-kit-0.121.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-optimize --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo su&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.conf -&amp;gt; add the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio          -       rtprio          99&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
vi /etc/security/limits.d/audio.conf -&amp;gt; create file with the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - rtprio 95&amp;lt;br&amp;gt;&lt;br /&gt;
@audio - memlock unlimited&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
usermod -a -G audio gchriss --&amp;gt; subsitute &#039;gchriss&#039; for your username&amp;lt;br&amp;gt;&lt;br /&gt;
exit&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At this point UI volume controls are missing/non-functional, but alsamixer works.&amp;lt;br&amp;gt;&lt;br /&gt;
Build pulseaudio if needed, but otherwise optional:&amp;lt;br&amp;gt;&lt;br /&gt;
rm -rf  ~/.pulse* /tmp/.esd*&amp;lt;br&amp;gt;&lt;br /&gt;
sudo -rf /tmp/pulse*&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf pulseaudio-3.0.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir -p /packages/openvideopro/var/run/pulse &amp;amp;&amp;amp;  mkdir -p /packages/openvideopro/var/lib/pulse&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gstreamer-0.10.36.tar.gz &amp;amp;&amp;amp; cd gstreamer-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-base-0.10.36.tar.gz &amp;amp;&amp;amp; cd gst-plugins-base-0.10.36&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-plugins-good-0.10.31.tar.gz &amp;amp;&amp;amp; cd gst-plugins-good-0.10.31&amp;lt;br&amp;gt;&lt;br /&gt;
See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012&amp;lt;br&amp;gt;&lt;br /&gt;
--&amp;gt; Remove line containing &#039;vbuffer.input&#039; in &#039;sys/v4l2/gstv4l2bufferpool.c&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf gnome-media-2.91.2.tar.bz2 &amp;amp;&amp;amp; cd gnome-media-2.91.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro  &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: The following builds but fails to connect to pulseaudio... debug needed?&amp;lt;br&amp;gt;&lt;br /&gt;
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 &amp;amp;&amp;amp; cd pavucontrol_15april2013&amp;lt;br&amp;gt;&lt;br /&gt;
./bootstrap.sh &amp;amp;&amp;gt;gsc_bootstrap.log&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TODO: Rebuild Totem + PiTiVi&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libogg-1.3.0.tar.gz &amp;amp;&amp;amp; cd libogg-1.3.0&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libvorbis-1.3.3.tar.gz &amp;amp;&amp;amp; cd libvorbis-1.3.3/&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libtheora-1.1.1.tar.bz2 &amp;amp;&amp;amp; cd libtheora-1.1.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Open abrowser, download:&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; tar -xvzf libjpeg-turbo-1.2.90.tar.gz &amp;amp;&amp;amp; cd libjpeg-turbo-1.2.90&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jpeg8 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libebml-1.2.2.tar.bz2 &amp;amp;&amp;amp; cd libebml-1.2.2&amp;lt;br&amp;gt;&lt;br /&gt;
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf libmatroska-1.3.0.tar.bz2 &amp;amp;&amp;amp; cd libmatroska-1.3.0/&amp;lt;br&amp;gt;&lt;br /&gt;
CXXFLAGS=&#039;-I/packages/openvideopro/include&#039; make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libshout-2.3.1.tar.gz &amp;amp;&amp;amp; cd libshout-2.3.1&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf glib-2.34.3.tar.xz &amp;amp;&amp;amp; cd glib-2.34.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;make check&#039; failures are &amp;quot;OK&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf alsa-lib-1.0.27.tar.bz2 &amp;amp;&amp;amp; cd alsa-lib-1.0.27&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gstreamer-1.0.6.tar.xz &amp;amp;&amp;amp; cd gstreamer-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-failing-tests --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-base-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-base-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make check &amp;amp;&amp;gt;gsc_check.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvJf gst-plugins-good-1.0.6.tar.xz &amp;amp;&amp;amp; cd gst-plugins-good-1.0.6&amp;lt;br&amp;gt;&lt;br /&gt;
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_configure.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Optional but really helpful:&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages &amp;amp;&amp;amp; wget &amp;quot;http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf qjackctl-0.3.10.tar.gz &amp;amp;&amp;amp; cd qjackctl-0.3.10&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
Create the following block entries for automatic execution @ user login&amp;lt;br&amp;gt;&lt;br /&gt;
The first two entries are specific to managing Thinkpad-series laptops&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/cpufreq-selector.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;/usr/bin/cpufreq-selector -c 0 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 1 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 2 -g performance &amp;amp; /usr/bin/cpufreq-selector -c 3 -g performance&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=cpu-freq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Name=cpufreq-selector&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Set 2.4GHz (x4)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/echo.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;echo level 7 &amp;gt; /proc/acpi/ibm/fan&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Name=Spin up x201i Fan&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Substitute &#039;disengaged&#039; for &#039;7&#039; for max speed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$ cat ~/.config/autostart/gnome-terminal.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=gnome-terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Name=GNOME Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Just to get things started...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
gsc@host:~$  cat ~/.config/autostart/qjackctl.desktop &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Desktop Entry]&amp;lt;br&amp;gt;&lt;br /&gt;
Type=Application&amp;lt;br&amp;gt;&lt;br /&gt;
Exec=sh -c &amp;quot;PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Hidden=false&amp;lt;br&amp;gt;&lt;br /&gt;
NoDisplay=false&amp;lt;br&amp;gt;&lt;br /&gt;
X-GNOME-Autostart-enabled=true&amp;lt;br&amp;gt;&lt;br /&gt;
Name[en_US]=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Name=qjackctl&amp;lt;br&amp;gt;&lt;br /&gt;
Comment[en_US]=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
Comment=Launch openvideopro qjackctl / -GChriss&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
sudo updatedb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stress-test CPU temperature stability (often necessary, proceed at own risk):&amp;lt;br&amp;gt;&lt;br /&gt;
burnMMX &amp;amp; burnMMX &amp;amp; burnMMX &amp;amp; burnMMX&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
network-manager can sometimes be flaky, issue on an as-needed basis:&amp;lt;br&amp;gt;&lt;br /&gt;
service network-manager restart&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Start JACK either via command-line or &#039;Start&#039; button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Pidgin==&lt;br /&gt;
This section is for building Pidgin and Farsight from source.&amp;lt;br&amp;gt;&lt;br /&gt;
Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
apt-get install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf gst-python-0.10.22.tar.gz &amp;amp;&amp;amp; cd gst-python-0.10.22&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf libnice-0.1.4.tar.gz &amp;amp;&amp;amp; cd libnice-0.1.4&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Skip the following two blocks if building Pidgin against GStreamer 1.0]&amp;lt;br&amp;gt;&lt;br /&gt;
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.1.2.tar &amp;amp;&amp;amp; cd farstream-0.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==&amp;gt; download file&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvjf pidgin-2.10.7.tar.bz2 &amp;amp;&amp;amp; cd pidgin-2.10.7&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[/skip]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Experimental section; builds and launches but Pidgin&amp;lt;-&amp;gt;GStreamer 1.0 lockups triggered on events...]&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
wget &amp;quot;http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
tar -xvzf farstream-0.2.3.tar.gz &amp;amp;&amp;amp; cd farstream-0.2.3&amp;lt;br&amp;gt;&lt;br /&gt;
./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
cd /packages&amp;lt;br&amp;gt;&lt;br /&gt;
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 &amp;amp;&amp;amp; cd pidgin_1may2013&amp;lt;br&amp;gt;&lt;br /&gt;
NOCONFIGURE=1 ./autogen.sh &amp;amp;&amp;gt;gsc_autogen.log&amp;lt;br&amp;gt;&lt;br /&gt;
GTK_LIBS=&#039;-L/packages/openvideopro/lib -lgstvideo-1.0&#039; ./configure --prefix=/packages/openvideopro &amp;amp;&amp;gt;gsc_config.log&amp;lt;br&amp;gt;&lt;br /&gt;
[TODO: Fix &#039;GtkSpell support&#039; issues]&amp;lt;br&amp;gt;&lt;br /&gt;
make V=1 &amp;amp;&amp;gt;gsc_make.log&amp;lt;br&amp;gt;&lt;br /&gt;
sudo make install &amp;amp;&amp;gt;gsc_install.log&amp;lt;br&amp;gt;&lt;br /&gt;
[/end experimental section]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>GChriss</name></author>
	</entry>
</feed>