[MPlayer-users] Encoding problems / tips needed

JiHO jo.irisson at noos.fr
Mon Aug 2 15:20:17 CEST 2004


thank you for your quick answer.

Loren Merritt wrote:
>>4/. Do video pass 1. You can use -oac copy to ensure good sync.
>>mencoder dvd://1 -alang en -oac copy -vf crop=???,hqdn3d=2:1:2 \
>>-ovc lavc -lavcopts \
>>vcodec=mpeg4:vbitrate=???:v4mv:mbd=2:naq:trell:cmp=3:subcmp=3:mbcmp=3\
>>:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01:autoaspect:vpass=1 \
>>-noskip -skiplimit 0 -noodml -o /dev/null
> 
>>The problems:
>>hicup 1/ Movie duration in step 2 has to be read from lsdvd because
>>mplayer's OSD seems to give a wrong value when playing DVDs.
> 
> Or from step 1. While the duration listed in the OSD can be innacurate, if
> you actually play the movie from start to finish (while extracting audio),
> then the last timestamp listed on the commandline is the duration. (Unless
> you're encoding something funny like multiple episodes with the timestamps
> reset in between.)
> Or from the size of the WAV, or the length of the Ogg.

thanks for the tips. so it is ok if mplayer OSD is wrong. I wondered if 
it was a failure of my settings.

>>hicup 3/ even using nearly all the "quality providing options" of lavc
>>(if you think of others, please do not hesitate)
> 
> vmax_b_frames=1 (usually significant quality gain, but has some
> side-effects, including increased cpu time to decode (+5% on my computer),
> and reduced compatibility with some hardware players)
> preme=2:predia=-4 (helps almost as much as 'dia', and is much faster)
> and several other options with smaller gains for larger speed penalties.

thanks for all this. I will try. I'm right now trying XviD and the 
result seems better than lavc but it's wayyyy longer to encode (at the 
moment, mencoder is planning 4114 minutes for a 2h45 movie....). so 
maybe with these options I can achieve XviD quality faster.

>>at quite high bitrates
>>(up to 1400), I still get some problems with the dark areas of the
>>movie. the dark greys are not very well dealt with and I got big black
>>squares in the darkest parts of the movie, instead of the beautiful
>>gradient of dark greys I hoped (see attached picture if you don't see
>>what I mean - I hope the picture is not too heavy to be sent on this
>>list). does any one have a trick to make things better? some filter
>>options maybe or something like this?
> 
> 1) I don't see any problems in that picture, unless I turn gamma waayy up.
> 2) Remove dark_mask - it decreases the quality of dark areas, hoping you
> won't notice.

my problem was with the big black squares. in fact it switches from 
quite dark gray to complete black very fast when I would like the 
algorithm to use more dark greys. maybe even never use black. indeed 
these black areas are very visible and attrack the eye, particularly on 
flat screens.
the dark_mask might be responsible for this poor management of the dark 
areas but I found this options in the encoding tips of mplayer's 
documentation. I was said to improve the quality in regular movies (not 
anime). so I wonder what to do. more testing needed I think ;-)

>>Remark: Alternative method for MKV with MP3 audio:
> [...]
> 
>>Question: I know that 3 pass encoding is deprecated but don't you think
>>this could be used?
> 
> What do you hope to gain from this alternate method? Just access to
> mencoder's bitrate calc?

yes exactly, because it seems that the formula I mentionned is not 100% 
accurate or at least that the header size is not exactly estimated. for 
example on my last encoding I have more that 30 empty Mo that could have 
been used to improve the video quality (a bit ;-) )
I can't find a way to calculate accurately the header size of an AVI or 
OGM container. in both docs I only find estimates of 1% and 1,2% 
respectively. do you know a documentation ressource where I can find that?

thanks in advance.
-- 
JiHO
---
   Windows, c'est un peu comme le beaujolais nouveau :
à chaque nouvelle cuvée on sait que ce sera dégueulasse,
     mais on en prend quand même, par masochisme.
---




More information about the MPlayer-users mailing list