Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- pgm="${0##*/}" # Program basename
- [ $# -gt 0 ] || { echo "Usage: $pgm [ssh_options] ssh_host" >&2; exit 1; }
- GOURCE_OPTIONS="
- --1280x800 --auto-skip-seconds 1 --bloom-intensity 0.25
- --file-idle-time 2 --highlight-users --key --log-format custom
- --output-ppm-stream - --seconds-per-day 0.01
- " # END-QUOTE
- FFMPEG_OPTIONS="
- -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264
- -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0
- " # END-QUOTE
- ssh "$@" dwatch -X open | awk 'sub(/\[.*\]:/, "|", $6) {
- (cmd = sprintf("date -jf \"%s\" \"%s\" +\"%%s|\"", "%Y %b %e %T",
- datetime = substr($0, 1, 20))) | getline epoch
- close(cmd)
- execname = $6
- sub(/.*\| /, "M|")
- print epoch execname (path = $0)
- }' | gource $GOURCE_OPTIONS - | ffmpeg $FFMPEG_OPTIONS "${pgm%.*}.mp4"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement