Skip to content

Commit

Permalink
Change preset to ultrafast.
Browse files Browse the repository at this point in the history
Also make sure width is divisible by 2 (required by video codec).
  • Loading branch information
AlbertVeli committed Sep 21, 2012
1 parent a116871 commit f1de483
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions record_object.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ alsadev='hw:0,0'
# Video codec for encoding. You might change this
# if your ffmpeg does not support libx264. But
# this setting gives best quality.
vcodec='-vcodec libx264 -vpre lossless_ultrafast'
vcodec='-vcodec libx264 -preset ultrafast -qp 0'


if ! which xwininfo >/dev/null; then
Expand Down Expand Up @@ -59,7 +59,9 @@ height=`echo $txt | sed 's/^.*Height://' | awk '{print $1}'`
read -p "Window is ${width}x${height}, continue (y/n)? "
[ "$REPLY" == "y" ] || exit 1

# Make sure width is divisible by 2
width=$((${width} - $((${width} % 2))))

# ffmpeg may or may not work with the x11grab option, it depends on the platform and compile time flags
ffmpeg -f x11grab -r 25 -s ${width}x${height} -i :0.0${corner} $snd $vcodec -threads 0 output.mkv

CMD="ffmpeg -f x11grab -r 25 -s ${width}x${height} -i :0.0${corner} $snd $vcodec -threads 0 output.mkv"
exec $CMD

0 comments on commit f1de483

Please sign in to comment.