#!/bin/bash

DATE=`date +%Y%m%d`
TIME=`date +%Hh%M`

# Start screencast
xterm -e jack_capture $HOME/Screencasts/screencast_audio_$DATE-$TIME.wav &
ffmpeg -an -f x11grab -r 15 -s 1600x900 -i :0.0 -vf scale=1280:720 -vcodec libx264 -vpre lossless_medium -threads 0 $HOME/Screencasts/screencast_video_$DATE-$TIME.mov

killall jack_capture


syntax highlighted by Code2HTML, v. 0.9.1