[MPlayer-users] Two-passes encoding - What happens exactly?

D Richard Felker III dalias at aerifal.cx
Fri Jun 4 01:43:38 CEST 2004


On Fri, Jun 04, 2004 at 12:02:39AM +0200, Alain Barthélemy wrote:
> Le jeudi 03 juin 2004, 11:54:19 ou environ D Richard Felker III <dalias at aerifal.cx> a écrit:
> > On Thu, Jun 03, 2004 at 09:36:00AM +0200, Alain Barthélemy wrote:
> > > > Is that the highest resolution your tv card is capable of? I use 
> > > > "width=720:height=576".
> > > 
> > > Normally it should be 640x480 but I made lately a quick test with resolution
> > > 720x576 and it worked.
> > 
> > It depends on whether you have NTSC or PAL.
> 
> I have PAL thus it should be 640x480. Thanks for reminding me.

Backwards. PAL is 576 lines, NTSC is 480. You're free to use whatever
horizontal resolution you want with either, but if you want square
pixels it's 640 for NTSC and 768 for PAL.

> > -lavcopts acodec and abitrate are useless unless you're using -oac
> > lavc. For -oac mp3lame you use -lameopts!
> 
> Useless? OK! But you don't enligten me. I must understand that -lavcopts acodec
> and abitrate are *only* useful if I have -oac mp3lame lameopts cbr:br=96. *But*
> does not it do the same as -ovc lavc -lavcopts acodec=mp3:abitrate=mp3. Should
> not I use one or *exclusive* the other option?

You still misunderstand. Here:

Use -lavcopts acodec=???:abitrate=??? if you will be using lavc to
encode audio, i.e. -oac lavc.

Use -lameopts ... if you will be using lame to encode audio, i.e. -oac
mp3lame.

There's no point in using both, since you'll be configuring a module
you're not going to use!

> > > > "-vf denoise3d=5:4:7" should give better quality than "-vf pp=tn" (But 
> > > > needs more CPU-time).
> > > 
> > > I'm not familiar with denoise. Still learning about video compression (and still dumb).
> > 
> > Well don't use pp=tn. It removes noise but ADDS blocking artifacts
> > which are much worse!
> 
> Thanks for this remark. I tried -vf denoise3d=5:4:7 and I did not see anything
> negative. Mencoder is now "touch & try" and I am no specialist of video
> compression.
> 
> Thus I keep now:
> 
> mencoder -tv driver=v4l:width=640:height=480 -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1800:mbd=2:v4mv -oac mp3lame -lameopts cbr:br=96 -vf
> crop=620:460,denoise3d=5:4:7,scale -zoom -xy 640 -sws 1 movie.avi
> 
> ... till someone tells me the image will be completely distorted.

It will, unless your video miraculously happens to be noninterlaced
(actually 2:2 pulldown), which I expect was the case for your example.
You have to use a lot of care to scale interlaced video, or
deinterlace it first. I would recommend against upscaling in any case.
And be sure your final sizes are multiples of 16, etc. Also use the
right capture resolution for PAL, ...

Rich




More information about the MPlayer-users mailing list