[MPlayer-users] Two-passes encoding - What happens exactly?
Alain Barthélemy
cassandre at bartydeux.be
Tue Jun 1 11:50:33 CEST 2004
Le lundi 31 mai 2004, 16:11:22 ou environ The Wanderer <inverseparadox at comcast.net> a écrit:
> Alain Barthélemy wrote:
>
> >When I started using MPlayer/Mencoder I had been told to use two-pass
> >encoding to reduce video bitrate and file size. Thus I used
> >two-passes encoding.
> >
> >Now I burn my files on DVD's and I don't care if the file is more
> >than 700Mb.
> >
> >I still have a better quality (subjective?) with a video bitrate of
> >1800kbit/s. Size of file thus about 1400Mb.
> >
> >I read though on this mailing-list that two-passes encoding improve
> >quality. I don't disagree of course but I would like to know how it
> >happens. On the man page, the only thing I read is "vpass activates
> >two pass mode etc ...".
> >
> >--------------
> >
> >Let's have an example. I do a lot of encoding of TV signal. TV signal
> >is never of optimum quality of course. Here is my instruction line:
> >
> >mencoder -tv driver=v4l:width=640:height=480:amode=0 -ovc lavc
> >-lavcopts vcodec=mpeg4:vbitrate=1800:mbd=2:acodec=mp3:v4mv -oac
> >mp3lame -lameopts cbr:br=96:mode=3 -vf crop=620:460,pp=tn/lb,scale
> >-zoom -xy 640 -sws 1 tv:// -o movie.avi -endpos <sec>
> >
> >I am not original. I just try what I read on the list.
>
> Any particular reason you don't use -oac lavc -lavcopts
> acodec=mp3:abitrate=96:... ? Do you just really need mono sound?
No particular reason. Sometimes I need stereo sound, sometimes not (old B/W
movies). Now of course, there are many places where to set stereo or mono sound
(-tv driver .....amode=0, -lameopts ...mode=3, etc...). Now you say it is at
lavcopts ... abitrate=96, which sets only sound bitrate (and -lameopts
cbr:br=96?). Man page is not clear for that. Where do we set sound bitrate and
stereo/mono?
>
> >Now if I want to crop the picture I suppose I do:
> >
> >mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg4,vpass=1|2 -vf
> >crop=620:380,pp=tn/lb,scale -zoom -xy 640 -sws 1 -o
> >/dev/null|movie2.avi
> >
> >As I don't fully understand what happens during the two-passes
> >encoding, I don't know if I have to recopy all the parameters. I
> >explain: -vf is for filtering thus once filtering is done it should
> >not be filtered a second time except, I suppose, if I recrop and
> >rescale. But post-processing? And software scaler (though I read in
> >man page that software scaler had to be used with the -zoom option)?
>
> On this I don't know the engine well enough to say for certain.
Me neither ...
>
> >My question is. Do I have to recopy all the options? Sorry if it is
> >stupid. Thus if I don't make any change in the resolution, video bitrate
> >and
> >size of the movie, I suppose I must type the following line and it should
> >be
> >enough:
> >
> >mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg4,vpass=1|2 -o
> >/dev/null|movie2.avi.
>
> Actually, this does not leave bitrate unchanged. It uses the default
> bitrate, equivalent to vbitrate=800. Other than that, yes, you are
> correct except that...
Yes it leaves the vbitrate changed because it sets it at 800. Thanks because I
know now that I have to retype all the options to avoid to have the default
settings.
>
> >Normally I should have a better (re-)encoding.
>
> ...depends on what you mean by "better". The end result will be
> lower-quality than the original, inevitably because of the transcoding
> process; the only possible advantages are A) potentially smaller
> filesize and B) it will use lavc's codec rather than whatever it had
> before, which may constitute an improvement in compression capability.
Thus two-passes encoding is only useful if you want to change the vbitrate and
other lavcopts options. I suppose that to change the video filtering (-vf
crop..,scale, -zoom -xy..), one pass is enough with mencoder -oac copy -ovc
copy -vf crop,etc.... Confirm/Don't confirm?
>
> --
> The Wanderer
>
--
Alain Barthélemy
cassandre at bartydeux.be
http://bartydeux.be
Linux User #315631
More information about the MPlayer-users
mailing list