Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Screencast make rules
all: generate archive
upload: generate
curl --location --header "authorization: LOW xxxx:yyyy" --upload-file ./${number}-episode-${name}.webm${number}-episode-${name}.webm
curl --location --header "authorization: LOW xxxx:yyyy" --upload-file ./${number}-episode-${name}.mkv${number}-episode-${name}.mkv
archive: ${number}-episode-${name}.webm
cp ${number}-episode-${name}.webm ${ARCHIVE_DIR}
generate: ${number}-episode-${name}.webm ${number}-episode-${name}.mkv
${number}-episode-${name}.webm: episode.mpg
ffmpeg -i episode.mpg -vcodec libvpx -b:v 1000k -threads 2 ${number}-episode-${name}.webm
${number}-episode-${name}.mkv: episode.mpg
ffmpeg -i episode.mpg -acodec pcm_s16le -vcodec libx264 -b:v 350k -threads 2 ${number}-episode-${name}.mkv
episode.mpg: screencast.avi
rm -f screencast-amplified.avi screencast.mpg
ffmpeg -i screencast.avi -vcodec copy -vol 2048 screencast-amplified.avi
ffmpeg -threads 4 -i screencast-amplified.avi -sameq screencast.mpg
cat content/stock/intro.mpg ./screencast.mpg content/stock/outro.mpg > episode.mpg
rm -f screencast.avi
ffmpeg -f x11grab -r 50 -s 1280x800 -i :0.0 -vcodec huffyuv -f alsa -i pulse -sameq screencast.avi
killall showkeys
pristine: clean
rm -f screencast.avi
rm -f episode.*
rm -f *.mpg
rm -f *.mkv
rm -f *.webm
rm screencast-amplified.avi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment