[MPlayer-dev-eng] samples which look bad when encoded with lavc 2-pass needed

Arpi arpi at thot.banki.hu
Mon Jul 22 00:07:12 CEST 2002


Hi,

> iam currently trying to improve the 2pass bitrate code from libavcodec, but 
> sadly i havnt seen many problems with the current code (i dont do much 
> encoding so thats not surprising)
> 
> can someone upload something which xvid or divx4/5 encodes (much) better than 
> lavc (or is there allready something on mphq which lavc doesnt like?)

Hmm. I don't think that divx4's (xvid use the same) 2pass code is better...
i've hacked it too much to know it's shit. Imho your code is far better,
_but_:
- no one experienced with good values - defaults aren't the best imho
- imho it should change bitrate much more agressively, so decrease more for
simple scenes and increase much for complex parts. i know (at leats i think
i know :)) that it's just a parameter, i even read it somewhere which one :)

> btw, filesize doesnt matter much, allthough something smaller is certainly 
> better
> 
> btw2, please try vqmin=2 and perhaps diffrent values for vqcomp (0.7 or so) 
> and perhaps vrc_strategy=1 first
ah, they are :)
i got much better quality with vrc_strategy in all my tests, the default =2
made even worse quality sometimes than 1pass.

anyway i also experienced - and read on -users too - a possible bug:
when the input media is too low quality, so there are parts where the
maximum reachable bitrate (due to high qmin or missing data) is under the
wanted one (calculated by 2pass algo), it doesn't (or at least it seems it
doesn't) distribute these 'free' bits for the remaining part of the movie.

if you encode the same input with fixed qscale=2, you get few GB file, while
with 2pass it's much lower than wanted bitrate - so telling the users that
'there was no more info in input media' seems to be wrong, anyway we all do
that :)

anyway i can imagine case, where it isn't possible: when teh first half of
the movie if high complexity, whiel the second half is very low - so you
can't use the free bits of part 2 for increasing part 1 quality. anyway
2-pass encoding was invented just to solve this :)


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list