Skip to content

Instantly share code, notes, and snippets.

@jorgeramirez
Created January 9, 2015 12:39
Show Gist options
  • Save jorgeramirez/acfb6facc1c12bbcc0bb to your computer and use it in GitHub Desktop.
Save jorgeramirez/acfb6facc1c12bbcc0bb to your computer and use it in GitHub Desktop.

Revisions

  1. jorgeramirez created this gist Jan 9, 2015.
    13 changes: 13 additions & 0 deletions record-screen.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash

    # screencast script with ffmpeg
    # author: Jorge Ramírez <jorgeramirez1990 at gmail dot com>

    # help: ./record-screen.sh <record-name>
    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