[MPlayer-users] Question about crop, scale, aspect ratio, multiple of 16
Michael C. Shultz
reso3w83 at verizon.net
Thu Dec 16 20:50:41 CET 2004
On Thursday 16 December 2004 11:48 am, nick wrote:
> Hi,
>
> I'm trying to convert my Kill Bill 2 dvd (PAL) to avi. I've read the
> encoding-tips, chapter 7 of the Mplayer documentation and peices of
> the man page., but there are some thing that I don't understand:
>
> 1. It's is stated that the resolution(height/width) you choose to
> encode a movie should both be a multiple of 16. Must I use this rule
> when cropping the movie, or can I also crop the movie as follows:
>
> ... -vf crop=720:428:0:74
>
> These crop values are suggested by cropdetect and cut away the bars
> prefectly. Is it a problem that 428 is not a multiple of 16?
>
> 2. I have a hard time understanding what scaling actually is/does. I
> understand that the croped resolution should be scaled to get a bpp
> value larger that 0.20. Now, when I run the following command, just
> as a test:
>
> mplayer -dvd-device VIDEO_TS dvd://5 -vf
> crop=720:428:0:74,scale=720:200
>
> mplayer gives the following output:
>
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 10 -> 9
> SwScaler: reducing / aligning filtersize 10 -> 9
>
> SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
> VO: [xv] 720x200 => 720x300 Planar YV12
>
> The first thing I don't understand is why the Movie-Aspect says
> 1.78:1. When I look at the back cover of the dvd, is says Ratio
> 2.35:1.
>
> The next part "prescaling to correct movie aspect". What is Mplayer
> doing here? Scaling the croped resolution with the 1.78:1 aspect
> ratio? Scaling the croped resolution with the 2.35:1 aspect ratio?
> Or is Mplayer rescaling the scale parameters I defined, namely
> 720:200? Or perhaps something else?
>
> 3. If the "multiple of 16" rule aplies to scaling, how can I get an
> resolution that has those specifications. Since Mplayer automatically
> adjusts the scaled resolutions accoring to the aspect ratio?
>
> 4. How does the autoaspect parameter work?
> Should I when scaling try to keep as close to 2.35:1 as possible, or
> can I just use autoaspect in the chain to fix the aspect ratio?
>
> Kind Regards,
> Nick
On Thursday 16 December 2004 11:48 am, nick wrote:
> Hi,
>
> I'm trying to convert my Kill Bill 2 dvd (PAL) to avi. I've read the
> encoding-tips, chapter 7 of the Mplayer documentation and peices of
> the man page., but there are some thing that I don't understand:
>
> 1. It's is stated that the resolution(height/width) you choose to
> encode a movie should both be a multiple of 16. Must I use this rule
> when cropping the movie, or can I also crop the movie as follows:
>
> ... -vf crop=720:428:0:74
>
> These crop values are suggested by cropdetect and cut away the bars
> prefectly. Is it a problem that 428 is not a multiple of 16?
>
> 2. I have a hard time understanding what scaling actually is/does. I
> understand that the croped resolution should be scaled to get a bpp
> value larger that 0.20. Now, when I run the following command, just
> as a test:
>
> mplayer -dvd-device VIDEO_TS dvd://5 -vf
> crop=720:428:0:74,scale=720:200
>
> mplayer gives the following output:
>
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 10 -> 9
> SwScaler: reducing / aligning filtersize 10 -> 9
>
> SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
> VO: [xv] 720x200 => 720x300 Planar YV12
>
> The first thing I don't understand is why the Movie-Aspect says
> 1.78:1. When I look at the back cover of the dvd, is says Ratio
> 2.35:1.
>
> The next part "prescaling to correct movie aspect". What is Mplayer
> doing here? Scaling the croped resolution with the 1.78:1 aspect
> ratio? Scaling the croped resolution with the 2.35:1 aspect ratio?
> Or is Mplayer rescaling the scale parameters I defined, namely
> 720:200? Or perhaps something else?
>
> 3. If the "multiple of 16" rule aplies to scaling, how can I get an
> resolution that has those specifications. Since Mplayer automatically
> adjusts the scaled resolutions accoring to the aspect ratio?
>
> 4. How does the autoaspect parameter work?
> Should I when scaling try to keep as close to 2.35:1 as possible, or
> can I just use autoaspect in the chain to fix the aspect ratio?
>
> Kind Regards,
> Nick
>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
This may not exactly answer your question but here is how I get
a scale setting that allways seems to work well:
1.
mplayer KillBill.whatever -vf cropdetect
which you say gives you -vf crop=720:428:0:74
Then I run
(calcbpp.pl is located in Mplayer's tool directory)
crop aspect bitrate fps
calcbpp.pl 720x428 4/3 1500 23.976
output portion is:
720x400, diff 1, new AR 1.80, AR error 0.31% scale=720:400 bpp: 0.217
704x400, diff -8, new AR 1.76, AR error 1.95% scale=704:400 bpp: 0.222
688x384, diff -1, new AR 1.79, AR error 0.15% scale=688:384 bpp: 0.237
672x368, diff 7, new AR 1.83, AR error 1.74% scale=672:368 bpp: 0.253
656x368, diff -2, new AR 1.78, AR error 0.66% scale=656:368 bpp: 0.259
640x352, diff 5, new AR 1.82, AR error 1.31% scale=640:352 bpp: 0.278
624x352, diff -4, new AR 1.77, AR error 1.22% scale=624:352 bpp: 0.285
608x336, diff 3, new AR 1.81, AR error 0.84% scale=608:336 bpp: 0.306
then I use the setting closest to bpp 0.25 without going over,
in this case scale=688:384. The 1500 is just a bit rate I randomly
picked, you decide what work best for you, same with aspect (maybe you
want 16/9?) and frames per second(fps), change that to whatever you
want for your encode. Hope this helped some....
-Mike
More information about the MPlayer-users
mailing list