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

pgoldweic pgoldweic at northwestern.edu
Fri Jun 24 23:29:34 CEST 2011


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?

The complete output is:
------------------------------------------------------
ffmpeg version 0.7-rc1, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 14 2011 12:55:59 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration: --enable-libvpx --enable-libfaac --enable-shared
--enable-memalign-hack --enable-gpl --enable-libtheora --enable-libmp3lame
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
--enable-postproc --enable-avfilter --enable-swscale --enable-pthreads
--enable-libfreetype --arch=x86_64
  libavutil    50. 40. 1 / 50. 40. 1
  libavcodec   52.120. 0 / 52.120. 0
  libavformat  52.108. 0 / 52.108. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 77. 0 /  1. 77. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 0 codec frame rate differs from container frame rate: 59.94
(60000/1001) -> 29.97 (2997/100)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'open.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2011-06-22 16:50:18
  Duration: 00:00:15.55, start: 0.000000, bitrate: 825 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR
16:9], 662 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc
    Metadata:
      creation_time   : 2011-06-22 16:50:18
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 157 kb/s
    Metadata:
      creation_time   : 2011-06-22 16:50:18
File 'opencroppedresized-standard.mp4' already exists. Overwrite ? [y/N] y
[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!


----------------------------------------------------------
Thanks!


--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/unable-to-crop-and-then-resize-movie-tp3623660p3623660.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list