gource and ffmpeg reduce video size I try to create video with gource. I succeed with the following command line:

gource $LOG_FILE --log-format custom --stop-at-end --caption-file ${FILENAME}_captions.log --caption-duration 3 --title $TITLE --seconds-per-day 0.7 --auto-skip-seconds 1 --date-format\
 "%d/%m/%y" --hide "mouse,progress" --user-scale 0.6 --caption-size 20 -1380x950 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420\
p -crf 1 -threads 4 -bf 0 $FILENAME.mp4


But the video are too big, 9Go for 4 min. How can I reduce the size with ffmpeg?

I use Fedora.
-preset

Use the slowest preset that is fast enough that it does not drop frames. You can see if ffmpeg is dropping frames in the console output (if I recall correctly). Presets are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow.

-crf

Use the highest -crf value that still provides an acceptable quality level. Range is 0-51. 0 is lossless, 18 is generally considered to be visually lossless or nearly so, 23 is default, and 51 is worst quality. Using a value of 1 will likely result in a huge file.

Also see:


FFmpeg H.264 Video Encoding Guide