[FFmpeg-user] Cropping different amounts from top and bottom (or left and right sides)
Phill Clarke
phillclarke at gmail.com
Fri Apr 1 02:20:43 CEST 2011
I'm struggling to understand how to crop a different amount from the top and
bottom of a video. All the documentation and examples seem to show either
cropping the same amount from both top and bottom or cropping from just top
or bottom.
As an example, I have a PAL MPEG2 file at 720x608. The top 32 lines are
VITC. If I want to convert to PAL DV, then I need to crop just those top 32
lines.
-vf crop=720x576 is not good as it takes a centre cut, which is 16 lines off
both the top and bottom. VITC still visible.
-vf crop:720x576:0:32 works well and takes 32 lines off the top.
However, if I use this same file and want to convert to NTSC DV I need a
resolution of 720x480. That's a reduction of 128 lines from the original. I
could use:
-vf crop: 720x408 it works kind of OK, because 64 lines are taken off both
the top and bottom.
However, what I really want it to take 80 lines off the top, to account for
the 32 lines of VITC, and 48 lines off the bottom.
That's what I can't figure out how to do. The examples in the Libavfilter
documentation only show taking the same amounts from both top and bottom:
http://www.ffmpeg.org/libavfilter.html#SEC15
Many thanks
Phill
More information about the ffmpeg-user
mailing list