[FFmpeg-user] How to achieve old -croptop

Jim Worrall coniophora at gmail.com
Sat Sep 3 18:44:52 CEST 2011


On Sep 3, 2011, at 9:00 AM, orang Aumori Jepun wrote:
> 
> Hi all.
> 
> I recently installed the latest ffmpeg.
> And I noticed the parameters are little bit changed from
> the old debian ones.
> 
> Now , I want to know how to achieve the old style
> ffmpeg -i INFILE.mpg -croptop 50 test.mpg
> with the latest ffmpeg ( as of 27.Aug.2011)?
> 
> I'm not a native English speaker and I can not succeed in
> understanging the latest ffmpeg man page.
> 
> So , someone please help me understand set up the
> parameter for the latest ffmpeg.
> 
> T.I.A
> 

As I understand,
-vf crop=out_w:out_h:x:y

out_w is the width in pixels of the final output you want
out_h is the height in pixels of the final output you want

    and these are based on the ORIGINAL frame:
x is the pixel position, counting from the left side of the original frame, 
	of the left side of the frame you want to keep
y is the pixel position, counting from the top of the original frame, 
	of the top side of the frame you want to keep

So, for example,
-vf crop=640:480:60:40 will find the point that is 60 pixels from the 
left side of the original and 40 pixels from the top of the original, 
and then save a frame that is 640x480 from there, with that point as
the upper left corner.

If x and y are not given, it defaults to centering the final frame 
in the original frame.



More information about the ffmpeg-user mailing list