[FFmpeg-user] scaling failed: height must be an integer

Moritz Barsnick barsnick at gmx.net
Tue Jul 28 10:07:02 CEST 2015


On Tue, Jul 28, 2015 at 09:58:56 +0200, Moritz Barsnick wrote:
> On Tue, Jul 28, 2015 at 09:48:54 +0200, Osztrovszky Zsolt wrote:
> > ffmpeg -i input.mkv -c:v libx265 -preset fast -x265-params crf=20 -vf scale=1280:-1 -c:a copy -y output.mp4
[...]
> > x265 error: picture height must be an integer multiple of the specified chroma subsampling.
> > Can you help me with this error?
> 
> You are kindly asked to show us the complete, uncut console output(s)
> along with the command lines on this list.

Having said that: The message is quite clear if you read your own
command's output. The resulting height is probably an odd number. It
must (like) be divisible by 2 or 4.

Check the documentation of the scale filter on this:

    If one of the values is -n with n > 1, the scale filter will also
    use a value that maintains the aspect ratio of the input image,
    calculated from the other specified dimension. After that it will,
    however, make sure that the calculated dimension is divisible by n
    and adjust the value if necessary.

So, you probably need to change "-vf scale=1280:-1" to "-vf
scale=1280:-2" or "-vf scale=1280:-4".

Moritz


More information about the ffmpeg-user mailing list