[Ffmpeg-devel] Re: crop & pad (again)
Wed Apr 5 16:48:30 CEST 2006
Luca Abeni wrote:
> Hi Baptiste,
> I just tried something like
> ./output_example /tmp/out.yuv
> ./ffmpeg -i /tmp/in.y4m -croptop 50 -padtop 50 /tmp/out.y4m
> and (unless I messed up something - in this case, I apologize) ffmpeg
> produces the same results before and after applying the three patches I
> posted: it crops the 50 lines on top of the image and fills them with
> black. Isn't this the expexted result?
It should be, however It seems it does not for me. Current cvs works
though. It seems to pad correctly but bottom of the picture is cropped.
Final resolution is the same. However cropping alone does work.
>> -croptop 32 -padtop 32 -s 720x576 should crop by 32 pad those 32 and
>> finally rescale to 720x576. Is that actual behaviour Luca ?
> This used to generate a 720x608 picture (because it crops 32 lines, then
> rescales to 720x576, and then pads 32 lines, so we obtain 576 + 32
> lines). This seems to be the expected behaviour (at least, this is what
> I've been told on this mailing list). My patches leave this behaviour
> unchanged - modulo bugs :) I just tried, and the behaviour seems to be
Yes. I just think about it and IMHO it is more intuitive. "-s" should
set the output resolution whatever cropping/padding you apply on the
picture. What is your opinion about that ?
Padding/cropping will alter the resolution accordingly, without "-s".
Btw, I notice that any of the padding/cropping/scaling action should
alter aspect ratio set on the picture (reset or alter), which atm is not
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel