[MPlayer-users] Quick question: Aspect or Resize?

Felix Buenemann atmosfear at users.sourceforge.net
Tue Apr 16 00:35:01 CEST 2002


On Monday 15 April 2002 22:22, Troy D. Strum wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi folks.
>
> I'm just wondering if other users of mencoder can give me some quick
> feedback...
>
> When encoding a NTSC DVD that's 16:9 is it better to...
>
> 1) Encode the DVD "as-is" (720x480) without resizing it and just fix it
> with something like "-aspect 16:9" in mplayer (or select 16:9 inside of the
> windows DivX 5 player) during playback.
>
> ... or ...
>
> 2)  Encode the DVD using the appropriate values (like "-vop scale=720:404")
> to format it to the correct aspect ratio when encoding.
>
> I've been using the first method with no problems - it works just fine...
> I'm just wondering if there's anything to be gained (or lost?) from scaling
> it as I'm encoding it.

First thing you always should do is cropping, to crop away black bars at each 
side that eat memory bandwidth and cause encoding artifacts, note that for 
this to work properly you should crop a few pixels into the actual movie 
image. As mpeg2 uses 8x8pixel macroblocks it's best to crop on macroblock 
boundary, this means if there is a 3 pixel black bar on the left this will 
usually "pollute" the complete first 8pixel column, so you crop 8pixel from 
the left, and let's take a typical pal anamorphic dvd with 2.35:1 movie, also 
8px from the right and 80pixel from top and bottom, so you'll end up with 
something like -vop crop=704:416:8:80 resulting in a 704x416 image without 
the black bars. Now you need to correct the aspect of the image, as it is 
2.35:1 in this case you divide 704/2.35~=299.6, but as mpeg4 is based on 
16x16pixel macroblocks, also width and height should be divisable by 16, this 
is already true for 704, but for our 299.6 we divide it by 16 which gives us 
18.7, so we take 19*16=304, so our desired movie res is 704x304 pixel.
Now we need to consider the bitrate we want to encode at, such high res needs 
high bitrate to look good, so this res would be a candiate for 1500-2000kbits 
datarate.
If you want to go lower, eg for long movie (longer then 1:30min), you should 
go for lower res, which decreases sharpness but also gives better looking 
image by decreasing blockiness, so if you go for a 2CD rip and long movie 
choose res of 640x272 (640/2.35=272.34 which is about 272 and divisable by 
16), this res is ok for datarate of about 1000-1500kbits.
If you have very long movie or are goind for a one cd rip you should decrease 
the res further to eg. 576x240 (576/2.35~=245/16=15.3 -> 15*16=240 divisable 
by 16), this res is suitable for datarates of 700-1000kbits, you might even 
want to go down to 512x224, if quality is not satisfying.
If you want to go as low as 500kbits or lower you should choose resolution of 
480x208 or 320x144.

If you are downscaling it's ok to use a bilinear scaler, like -sws 0, if you 
are upscaling and want top qulity you should choose bicubic scaler (-sws 2). 
Some people believe bicubic scaler helps for downscaling too, however I don't 
believe so. (bicubic is slower then bilinear)

Also you should use 2/3pass encoding so the encoder can best choose where to 
spend more bits and where less, while keeping the exact overall datarate, 
resulting in predictable filesize and better quality by spending more 
datarate on complex scenes (like action).

>
> Thanks in advance.
>
>
> - Troy
>

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________




More information about the MPlayer-users mailing list