[Ffmpeg-devel] cropping + rescaling broken?

Måns Rullgård mru
Tue Mar 7 12:46:13 CET 2006


Erik Slagter said:
> On Tue, 2006-03-07 at 12:33 +0100, Luca Abeni wrote:
>> ./ffmpeg -i /tmp/test.y4m -s 352x576 -croptop 10 -cropbottom 10 out.y4m
>> the output size is 352x556... This looks wrong, no?
>
> No? ;-)
>
> You are removing 10 pixels from the top and 10 pixels from the bottom,
> so you're removing 20 pixels in total, the frame is 20 pixels smaller in
> the y direction; 576 - 20 = 556. Looks ok to me?
>
> Or are you expecting libavcodec to automatically rescale/zoom to the
> original frame size? That's is not always what you want, so I guess the
> current mode of operation is correct.

That's correct.  Cropping should be exactly cropping.  If you want to retain
the original size, you should apply scaling separately.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list