Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#!/bin/bash
# (find-angg ".emacs" "scast")
# (scast "k")
# (scast "R=6;r;c;g")
# (find-fline "/tmp/")
# (find-fline "/tmp/out.log")
# (find-video "/tmp/out.mp4")
#
# scast - functions to create screencasts.
# This file: 
#   http://angg.twu.net/bin/scast
#   http://angg.twu.net/bin/scast.html
#           (find-angg "bin/scast")
#      See: (find-angg "bin/git-defs")
#
# Usage: we can just source these functions into a shell, with
#
#   . ~/bin/scast
#
# but more typically we call this with a single argument, which is
# interpreted by the "eval" at the end. A call like
#
#   ~/bin/scast 'R=6;r;c;g'
#
# sets the frame rate to 6 FPS, moves to the desktop to the right,
# cleans the files in /tmp/ that can be leftovers of a previous
# screencast recording, and runs "avconv -f x11grab" with the right
# arguments; a call like
#
#   ~/bin/scast 'k'
#
# kills avconv and stops the recording.
#

# Used by: 
# (find-es "git" "git-test-2")
# (find-anggfile ".fvwm/.fvwm2rc" "scast")
#
# (find-angg "eev-videos/0.sh")
# (find-angg "eev-videos/2.sh")
#
# (find-man "avconv")
# (find-man "avconv" "-s 640x480")
# (find-man "avconv" "-r 24")


S=1024x600+0+0
R=5

d () { FvwmCommand "CursorMove +0 +100"; }
r () { FvwmCommand "CursorMove +100 +0"; }
k () { killall -q avconv; }
c () {
  rm -f /tmp/out.mp4
  rm -f /tmp/out.avi
  rm -f /tmp/out.log
}
g () {
  { #echo  avconv -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4
    #nohup avconv -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4 &
    echo  avconv -r $R -s $S -f x11grab -i $DISPLAY /tmp/out.mp4
    nohup avconv -r $R -s $S -f x11grab -i $DISPLAY /tmp/out.mp4 &
  } > /tmp/out.log 2>&1
  # > /dev/null 2>&1 &
}

# A hack to allow non-interactive use.
# (find-bashnode "Bourne Shell Builtins" "`eval'")
eval $1

# (find-eevsh "git-defs 'Diagram'")

# Local Variables:
# coding: raw-text-unix
# mode:   sh
# End: