gourceffmpeg.sh 627 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. set -x
  3. INPUT="$1"
  4. shift
  5. OUTPUT="$1"
  6. shift
  7. SPEED="$1"
  8. shift
  9. FFMPEG="${FFMPEG-ffmpeg}"
  10. GOURCE="${GOURCE-gource}"
  11. [ -z "$SPEED" ] && SPEED=0.05
  12. GOURCE_OPTS=(
  13. "--stop-at-end"
  14. "-s" "$SPEED" "--highlight-users" "--log-format" "custom"
  15. "-1920x1080"
  16. "--file-idle-time" "0" "--no-vsync"
  17. "--key" "--output-ppm-stream" "-" "--output-framerate" "60" "$INPUT"
  18. "--hide" "bloom,mouse,progress,filenames"
  19. "--auto-skip-seconds" ".01" "--multi-sampling"
  20. )
  21. "$GOURCE" "${GOURCE_OPTS[@]}" |
  22. "$FFMPEG" -y -r 60 -f image2pipe -vcodec ppm -i - -b:v 10000000 -vcodec libx265 -crf 24 "$OUTPUT"