filtergource.sh 966 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env bash
  2. OUTPUT="$1"
  3. shift
  4. if [ -z "${GOURCE}" ]; then
  5. GOURCE="$(which gource)"
  6. if [ -z "${GOURCE}" ]; then
  7. echo "Gource not set or found!"
  8. exit 1
  9. fi
  10. fi
  11. if [ -z "${FFMPEG}" ]; then
  12. FFMPEG="$(which ffmpeg)"
  13. if [ -z "${ffmpeg}" ]; then
  14. echo "FFMpeg not set or found!"
  15. exit 1
  16. fi
  17. fi
  18. GOURCE_OPTS=(
  19. "--stop-at-end"
  20. "-s" "0.05" "--highlight-users" "--log-format" "custom"
  21. "-1920x1080"
  22. # "--start-date" "2010-01-01"
  23. "--file-idle-time" "0" "--no-vsync" "--key"
  24. "--output-ppm-stream" "-" "--output-framerate" "60"
  25. "-"
  26. "--hide" "bloom,mouse,progress,filenames"
  27. "--auto-skip-seconds" ".01" "--multi-sampling"
  28. )
  29. cat |
  30. $GOURCE "${GOURCE_OPTS[@]}" |
  31. $FFMPEG -y -r 60 -probesize 22023 -f image2pipe -vcodec ppm -i - -b:v 10000000 -vcodec libx265 -crf 24 "$OUTPUT"
  32. # ffmpeg -y -r 60 -f rawvideo -pixel_format argb -video_size 1920x1080 -i - -b:v 10000000 -vcodec libx264 -crf 24 "$OUTPUT"