[MPlayer-users] mencoder: effective use of qp, crf params for x264?
Loren Merritt
lorenm at u.washington.edu
Tue Jan 30 04:23:07 CET 2007
On Mon, 29 Jan 2007, matthew.garman at gmail.com wrote:
>
> Anyway that does bring up another question. For reference, I'll
> show those x264encopts again:
>
> -x264encopts bitrate=1400:subq=3:frameref=5:turbo=1:threads=auto:pass=1:bframes=4 -idx -ofps 24000/1001
> -x264encopts bitrate=1400:partitions=all:8x8dct:me=umh:subq=6:frameref=5:threads=auto:pass=2:bframes=4:b_pyramid:weight_b -idx -ofps 24000/1001 -vf spp,hqdn3d=2:1:2
>
> Note that I use lower settings on the first pass. Also, I don't do
> any post-processing (no -vf opts) on the first pass.
>
> What kind of impact does this have on quality? I.e., *should* I
> also be running the post-processing in the first pass? Should I use
> the exact same x264encopts on the first pass?
>
> The docs I've read all suggest that using lower quality settings on
> the first pass will save time. Since nothing is free, I'm assuming
> this does have an impact on quality---but to what degree?
Reduced settings on the first pass is recommended. The idea is, given a
certain quota of total CPU time, it's more effective to spend most of that
time on the 2nd pass. Any imperfections in the 1st pass are one step
farther removed -- they only move bits/quality from one place to another
where it's slightly less useful, not completely waste bits.
That said, you should leave the commandlines the same... because 'turbo=1'
does the reduction for you.
The maximum penalty for reducing the 1st pass settings all the way (i.e.
using turbo=2) is on the order of 2% bitrate, compared to what's possible
if you don't care about speed at all. i.e. using the slow settings for
both passes could have achieved the same quality at about 2% lower
bitrate, but slower.
But the encode with slow settings + 1st pass turbo will be better quality
than an encode in the same total time using medium speed settings on both
passes.
The above results were measured when only the x264 settings change. There
has been no detailed study of munging filters for a faster 1st pass, and
that's more likely to be heavily content dependent. But hqdn3d=2 isn't
very strong, so it should be ok.
--Loren Merritt
More information about the MPlayer-users
mailing list