Skip to content

Instantly share code, notes, and snippets.

@51114u9
Last active December 26, 2015 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 51114u9/7178527 to your computer and use it in GitHub Desktop.
Save 51114u9/7178527 to your computer and use it in GitHub Desktop.
Record a video (ogv) using as input the screen and the audio channel available
#!/bin/sh
FFMPEG=$(which ffmpeg)
# frame size, widthxheight (execute: xwininfo -root | grep 'geometry' | awk '{print $2;}')
SIZE="1600x900"
# video codec
VCODEC=libtheora
# audio codec
ACODEC=libvorbis
FILE=video_$(date +%Y%m%d.%H%M%S)
$FFMPEG -f alsa -i default -f x11grab -s $SIZE -i :0.0 -c:v $VCODEC -q:v 10 -c:a $ACODEC -q:a 10 -y ~/$FILE.ogv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment