Last active
March 28, 2020 18:58
-
-
Save dsgpaiva/9e7e08d0b09581db378b6b74b0ed2f0e to your computer and use it in GitHub Desktop.
Gource + FFmpeg configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TITLE="Switchblade development (13/05/2018 - 13/07/2019)" | |
OUTPUT="1920x1080" | |
FRAMES_PER_SECOND="60" | |
ICON_LOCATION="./icon.png" | |
BACKGROUND_COLOR="000000" | |
SECONDS_PER_DAY="7" | |
FONT_SIZE="22" | |
printf "Opening Gource and recording visualization...\n\n" | |
gource -s .001 -${OUTPUT} -auto-skip-seconds .001 --multi-sampling --stop-at-end --key --highlight-users --hide mouse,progress --seconds-per-day ${SECONDS_PER_DAY} --file-idle-time 0 --max-files 0 --background ${BACKGROUND_COLOR} --font-size ${FONT_SIZE} --logo ${ICON_LOCATION} --title "${TITLE}" --output-ppm-stream gource.ppm --output-framerate ${FRAMES_PER_SECOND} | |
printf "Recording finished. Encoding file as mp4...\n\n" | |
ffmpeg -y -r ${FRAMES_PER_SECOND} -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.x264.mp4 | |
printf "Encoding finished. Removing original gource.ppm file...\n\n" | |
rm -rf gource.ppm | |
printf "Done! File gource.x264.mp4 generated successfully.\n\n" | |
printf "File specifications:\nTitle: ${TITLE}\nResolution: ${OUTPUT}\nFrames Per Second: ${FRAMES_PER_SECOND}fps" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment