<p>If I'm encoding files like this:</p>

<pre><code>ffmpeg -v quiet -hide_banner -y -i "$f" -passlogfile "$TEMP_FOLDER/ffmpeg.log" -c:v libx264 -b:v 2.5M -maxrate 2.5M -bufsize 5M -profile:v high -level 4.1 -pass 1 -sn -an -f matroska /dev/null &lt; /dev/null
ffmpeg -v quiet -hide_banner -y -i "$f" -passlogfile "$TEMP_FOLDER/ffmpeg.log" -c:v libx264 -b:v 2.5M -maxrate 2.5M -bufsize 5M -profile:v high -level 4.1 -sn -an -pass 2 -f matroska "${f%.*}".h264 &lt; /dev/null
</code></pre>

<p>Would setting preset speed increase quality? Should I use it on the first pass or the second ?</p>

CC BY-SA 4.0
2020-03-18T05:22:26.430Z
Yes, slower presets will yield better quality or a lower bitrate. Use in both passes.
Gyan
CC BY-SA 4.0
2020-03-18T09:21:07.410Z
Thanks Gyan! If you want to elaborate it and post it I can accept it as answer. I trust you :)
Freedo
<ffmpeg>
Does ffmpeg preset speed affects 2 pass encoding?
Freedo
# Does ffmpeg preset speed affects 2 pass encoding?

(Asked by: username_0 on 2020-03-18)

If I'm encoding files like this:
ffmpeg -v quiet -hide_banner -y -i "$f" -passlogfile "$TEMP_FOLDER/ffmpeg.log" -c:v libx264 -b:v 2.5M -maxrate 2.5M -bufsize 5M -profile:v high -level 4.1 -pass 1 -sn -an -f matroska /dev/null < /dev/null
ffmpeg -v quiet -hide_banner -y -i "$f" -passlogfile "$TEMP_FOLDER/ffmpeg.log" -c:v libx264 -b:v 2.5M -maxrate 2.5M -bufsize 5M -profile:v high -level 4.1 -sn -an -pass 2 -f matroska "${f%.*}".h264 < /dev/null

Would setting preset speed increase quality? Should I use it on the first pass or the second ?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: Yes, slower presets will yield better quality or a lower bitrate. Use in both passes.  
> **username_0**: Thanks username_1! If you want to elaborate it and post it I can accept it as answer. I trust you :)  

---

## 0 answers

