[MPlayer-users] DVD rip Crop & scale little problems
JiHO
jo.irisson at noos.fr
Tue Aug 3 19:06:38 CEST 2004
Alain Barthélemy wrote:
> Thus how can I calculate manually the cropping and rescaling of the image? Or
> is scale=576:-2 the right way to do it?
don't you want to use the "autoaspect" option of mplayer?
do you absolutely want to scale down the movie?
if the answers are no and yes, in that order ;), the solutions I see are:
Crop and take care of the "16 rule" while scaling:
1/ use cropdetect and check that even the half black pixels of the edges
are taken of. after that you come with cropping dimensions to feed to vf
crop.
2/ play the dvd with mplayer dvd://1 -vf crop "your_dimensions"
in the output of mplayer you can see a line of the form:
VO: [xv] 706x426 => 1004x426 Planar YV12
if you are using xv for example.
3/ from this line you know which dimensions are to be used in order to
have a correct aspect ratio: they are 1004x426 in that example. you can
use a simple factor to scale these down to what you want. let say 576.
1004 -> 576
426 -> ?
the height should be: 426 x 576 / 1004 = 244,4 = 244
4/ then the problem is that the height is not likely to be divisible by
16. you must choose the nearest 16 multiplier which is 15 x 16 = 240.
With this solution you loose no pixel of the video and you distort a
little bit the scale. nevertheless, if the nearest 16 multiplier is
close of your calculated height, you are likely to notice nothing.
Crop and care about the 16 rule before scaling:
same first three steps, then
4/ modify your cropping so that the calculated height is divisible by
16. I looked for a formula that will allow you to calculate it easily
but I can't find a solvable equations system. so I guess it's just trial
and error.
With this method you are likely to crop much more than needed of the
video but your output's scale will be perfect.
hope that helps.
--
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