| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/usr/bin/env bash
- OUTPUT="$1"
- shift
- if [ -z "${GOURCE}" ]; then
- GOURCE="$(which gource)"
- if [ -z "${GOURCE}" ]; then
- echo "Gource not set or found!"
- exit 1
- fi
- fi
- if [ -z "${FFMPEG}" ]; then
- FFMPEG="$(which ffmpeg)"
- if [ -z "${ffmpeg}" ]; then
- echo "FFMpeg not set or found!"
- exit 1
- fi
- fi
- GOURCE_OPTS=(
- "--stop-at-end"
- "-s" "0.05" "--highlight-users" "--log-format" "custom"
- "-1920x1080"
- # "--start-date" "2010-01-01"
- "--file-idle-time" "0" "--no-vsync" "--key"
- "--output-ppm-stream" "-" "--output-framerate" "60"
- "-"
- "--hide" "bloom,mouse,progress,filenames"
- "--auto-skip-seconds" ".01" "--multi-sampling"
- )
- cat |
- $GOURCE "${GOURCE_OPTS[@]}" |
- $FFMPEG -y -r 60 -probesize 22023 -f image2pipe -vcodec ppm -i - -b:v 10000000 -vcodec libx265 -crf 24 "$OUTPUT"
- # ffmpeg -y -r 60 -f rawvideo -pixel_format argb -video_size 1920x1080 -i - -b:v 10000000 -vcodec libx264 -crf 24 "$OUTPUT"
|