<p><code>preset</code> is a private option that may be defined for an encoder, such as libx264. It is a shorthand method to set a whole bunch of options at once, and won't have any effect if set when using an encoder which doesn't define them.</p>

<hr>

<p>When using x264 to encode to H.264 with preset medium, these are the arguments set:</p>

<pre><code>cabac=1
ref=3
deblock=1:0:0
analyse=0x3:0x113
me=hex
subme=7
psy=1
psy_rd=1.00:0.00
mixed_ref=1
me_range=16
chroma_me=1
trellis=1
8x8dct=1
cqm=0
deadzone=21,11
fast_pskip=1
chroma_qp_offset=-2
threads=12
lookahead_threads=2
sliced_threads=0
nr=0
decimate=1
interlaced=0
bluray_compat=0
constrained_intra=0
bframes=3
b_pyramid=2
b_adapt=1
b_bias=0
direct=1
weightb=1
open_gop=0
weightp=2
keyint=250
keyint_min=25
scenecut=40
intra_refresh=0
rc_lookahead=40
rc=crf
mbtree=1
crf=23.0
qcomp=0.60
qpmin=0
qpmax=69
qpstep=4
ip_ratio=1.40
aq=1:1.00
</code></pre>

<p>The default preset is <code>medium</code>. You can <a href="https://trac.ffmpeg.org/wiki/Encode/H.264#Overwritingdefaultpresetsettings" rel="nofollow noreferrer">override any of the individual variables</a> by adding <code>-x264-params key1=value:key2=value</code> <strong>after</strong> the preset option. But you shouldn't unless you need to.</p>

CC BY-SA 4.0
2023-01-01T02:46:26.950Z
How did you get this list of default settings?
gsgx
CC BY-SA 4.0
2023-01-01T05:42:26.323Z
From the emitted SEI in the output bitstream.
Gyan
CC BY-SA 4.0
2016-12-18T04:55:40.323Z
2019-11-07T18:14:59.677Z
2019-11-07T18:14:59.677Z
Gyan
<p>On the page you linked to it explains it fairly well:</p>

<blockquote>
  <p>A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.</p>
</blockquote>

<p>Basically there are three variables: speed, quality and file size that all depend on each other. With constant quality encodes (using the <code>-crf</code> option) you can change one of the other two. With the same quality setting if you increase the speed then you increase the file size, and if you decrease the speed you will get a smaller file. </p>

<p>What the <code>medium</code> preset is is a balance between encoding speed and file size. You can tip the balance either way, if you have time you can change the preset to slow, slower, veryslow or—for a tiny improvement in file size with big increase in time—placebo. Or if you need something converted on the fly you could increase the speed all the way up to realtime.</p>

<p>But all of the encodes will have the same quality. You change your quality <em>only</em> with the <code>-crf</code> setting. Of course lowering the quality will result in smaller files and vice versa, but that has nothing to do with the preset setting.</p>

CC BY-SA 3.0
2016-12-19T06:41:58.847Z
*all of the encodes will have the same quality.* --> not strictly true. The variance usually won't be much, but they don't produce the same result. I thought the same, but having read the threads at doom9, and done some short testing, I don't hold that anymore. For "simple" videos, it's more true than not, but with fine detail, not so much.
Gyan
CC BY-SA 4.0
2018-09-03T13:13:03.880Z
@Gyan Good to know.
stib
CC BY-SA 3.0
2016-12-19T06:13:15.093Z
2016-12-19T06:13:15.093Z
stib
<p><a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="nofollow noreferrer">Here</a> i found </p>

<pre><code>-preset medium
</code></pre>

<p>I was wondering for what it stand for is it for video quality ?</p>

<ffmpeg><filter>
What -preset medium stand for in ffmpeg
Slobodan Vidovic
# What -preset medium stand for in ffmpeg

(Asked by: username_0 on 2016-12-18)

Here i found 
-preset medium

I was wondering for what it stand for is it for video quality ?

**Tags:** ffmpeg, filter


---

## 2 answers

### Answer by username_1 on 2016-12-18. Score: 2 | Accepted answer

preset is a private option that may be defined for an encoder, such as libx264. It is a shorthand method to set a whole bunch of options at once, and won't have any effect if set when using an encoder which doesn't define them.

When using x264 to encode to H.264 with preset medium, these are the arguments set:
cabac=1
ref=3
deblock=1:0:0
analyse=0x3:0x113
me=hex
subme=7
psy=1
psy_rd=1.00:0.00
mixed_ref=1
me_range=16
chroma_me=1
trellis=1
8x8dct=1
cqm=0
deadzone=21,11
fast_pskip=1
chroma_qp_offset=-2
threads=12
lookahead_threads=2
sliced_threads=0
nr=0
decimate=1
interlaced=0
bluray_compat=0
constrained_intra=0
bframes=3
b_pyramid=2
b_adapt=1
b_bias=0
direct=1
weightb=1
open_gop=0
weightp=2
keyint=250
keyint_min=25
scenecut=40
intra_refresh=0
rc_lookahead=40
rc=crf
mbtree=1
crf=23.0
qcomp=0.60
qpmin=0
qpmax=69
qpstep=4
ip_ratio=1.40
aq=1:1.00

The default preset is medium. You can override any of the individual variables by adding -x264-params key1=value:key2=value after the preset option. But you shouldn't unless you need to.

> **Comments:**
> **username_2**: How did you get this list of default settings?  
> **username_1**: From the emitted SEI in the output bitstream.  

---

### Answer by username_3 on 2016-12-19. Score: 2

On the page you linked to it explains it fairly well:

> A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.

Basically there are three variables: speed, quality and file size that all depend on each other. With constant quality encodes (using the `-crf` option) you can change one of the other two. With the same quality setting if you increase the speed then you increase the file size, and if you decrease the speed you will get a smaller file.

What the `medium` preset is is a balance between encoding speed and file size. You can tip the balance either way, if you have time you can change the preset to slow, slower, veryslow or—for a tiny improvement in file size with big increase in time—placebo. Or if you need something converted on the fly you could increase the speed all the way up to realtime.

But all of the encodes will have the same quality. You change your quality *only* with the `-crf` setting. Of course lowering the quality will result in smaller files and vice versa, but that has nothing to do with the preset setting.

> **Comments:**
> **username_1**: *all of the encodes will have the same quality.* --> not strictly true. The variance usually won't be much, but they don't produce the same result. I thought the same, but having read the threads at doom9, and done some short testing, I don't hold that anymore. For "simple" videos, it's more true than not, but with fine detail, not so much.  
> **username_3**: @username_1 Good to know.  

---

