[FFmpeg-user] unable to crop and then resize movie

Etienne Buira etienne.buira.lists at free.fr
Fri Jun 24 23:48:51 CEST 2011


On Fri, Jun 24, 2011 at 02:29:34PM -0700, pgoldweic wrote:
> I am having trouble when I try to resize a movie that is 1920x1080 after
> cropping it.
> 
> Here's the command I am using:
> 
> ffmpeg -i mymovie.mp4 -vf "crop=in_w-2*240:in_h:240:0" -s 480x360 vcodec
> libx264 -acodec copy mymovie-cropped.mp4
> 
> I get the following error:
> [crop @ 0x5eb6fc0] Invalid too big or non positive size for width '0' or
> height '360'
> Error opening filters!
> 
> Can somebody suggest how to fix this?

Hi.

You're best bet is to use filters only, such as -vf
crop=...,scale=480:360

> [buffer @ 0x5f90340] w:1920 h:1080 pixfmt:yuv420p
> [scale @ 0x5f908a0] w:1920 h:1080 fmt:yuv420p -> w:480 h:360 fmt:yuv420p
> flags:0xa0000004
> [crop @ 0x5eb6fc0] w:480 h:360 -> w:0 h:360
> [crop @ 0x5eb6fc0] Invalid too big or non positive size for width '0' or
> height '360'
> Error opening filters!

Which will avoid scaling before croping.


More information about the ffmpeg-user mailing list