user6421: 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.

user3295: You specify a preset and a quality value at the same time and by that overriding the preset.
I would also recommend you don't encode with ffmpeg while capturing as this would be pretty slow on most PCs.
The "error" in your ffmpeg commandline is the option -crf 1. CRF is a quality setting of x264 and the lower the value the higher the bitrate of the video will be. Setting it to 1 will make the video pretty much lossless. Just leave that command out and maybe use a preset like medium or slow and not ultrafast like you have right now to get a decent quality.

user1760: -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


6421: <p>I try to create video with <a href="http://code.google.com/p/gource/wiki/Videos" rel="nofollow">gource</a>. I succeed with the following command line:</p>

<pre><code>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
</code></pre>

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

<p>I use Fedora.</p>
 3295: <p>You specify a preset and a quality value at the same time and by that overriding the preset.
I would also recommend you don't encode with ffmpeg while capturing as this would be pretty slow on most PCs.</p>

<p>The "error" in your ffmpeg commandline is the option <code>-crf 1</code>. <code>CRF</code> is a quality setting of x264 and the lower the value the higher the bitrate of the video will be. Setting it to <code>1</code> will make the video pretty much lossless. Just leave that command out and maybe use a preset like <code>medium</code> or <code>slow</code> and not <code>ultrafast</code> like you have right now to get a decent quality.</p>
 1760: <h1><code>-preset</code></h1>

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

<h1><code>-crf</code></h1>

<p>Use the highest <code>-crf</code> 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.</p>

<h3>Also see:</h3>

<ul>
<li><a href="https://trac.ffmpeg.org/wiki/Encode/H.264">FFmpeg H.264 Video Encoding Guide</a></li>
</ul>
