#!/bin/bash # screencast script with ffmpeg # author: Jorge Ramírez # help: ./record-screen.sh DEST_DIR=./recordings if [ ! -d "$DEST_DIR" ]; then mkdir -p $DEST_DIR fi ffmpeg -f x11grab -r 10 -s 1366x768 -i :0.0 -f alsa -i pulse -vcodec libx264 -preset ultrafast -crf 0 -threads 0 $DEST_DIR/$1.mkv