Skip to content

Instantly share code, notes, and snippets.

@ftomza
Created February 25, 2013 10:09
Show Gist options
  • Save ftomza/5028891 to your computer and use it in GitHub Desktop.
Save ftomza/5028891 to your computer and use it in GitHub Desktop.
if pgrep gst-launch
then
pkill gst-launch
else
DIR=`date "+%Y-%m-%d-%H:%M:%S"`
mkdir $DIR
gst-launch \
flvmux name=camera ! filesink location="$DIR/camera.flv" \
flvmux name=screen ! filesink location="$DIR/screen.flv" \
\
osxaudiosrc ! queue ! audioconvert ! audio/x-raw-int, rate = 44100, channels = 1, depth = 16 ! queue ! ffenc_adpcm_swf ! tee name = audio \
\
qtkitvideosrc ! video/x-raw-yuv, framerate = 30/1, width=320, height=240 ! videorate ! video/x-raw-yuv, framerate = 15/1 ! queue ! ffmpegcolorspace ! queue ! ffenc_flv gop-size = 450 ! camera. \
\
audio. ! queue ! audio/x-adpcm ! camera. \
\
osxscreencapsrc cursor = true ! video/x-raw-rgb, framerate = 5/1 ! ffmpegcolorspace ! ffenc_flashsv gop-size = 150 ! screen. \
\
audio. ! queue ! audio/x-adpcm ! screen.
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment