bin - Personal scripts
ssh://anon@thyssentishman.com/bin
Log | Files | Refs | Feed | Contribute | README

screencast (448B) (RAW)


      1 #!/bin/sh
      2 
      3 # Record screen and save video as $1.
      4 
      5 trap 'notify "Screencast saved as $FILE"' INT EXIT
      6 
      7 FILE="${1:-/tmp/screencast_$(date -u '+%Y%m%d%H%M%S').mp4}"
      8 
      9 ffmpeg -f x11grab \
     10 	-i :0.0 \
     11 	-codec:v libx264 \
     12 	-pix_fmt yuv420p \
     13 	-y "$FILE"
     14 
     15 # when using multiple monitors
     16 # ffmpeg -f x11grab \
     17 # 	-video_size 1920x1200 \
     18 # 	-i :0.0+1920,0 \
     19 # 	-codec:v libx264 \
     20 # 	-pix_fmt yuv420p \
     21 # 	-y "$FILE" \
     22 # 	&& notify "Screencast saved as $FILE"