[FFmpeg-user] Cant convert file on Linux, but on Windows ok

Moritz Barsnick barsnick at gmx.net
Fri Jan 9 11:12:54 CET 2015

On Fri, Jan 09, 2015 at 08:31:14 +0100, Damian Głodny wrote:
> Hi, when we try to encode one video file on Linux we are getting following
> errors (on Windows everything is fine):

Please do give us the full, uncut commandline and output of both the
working and non-working command.

>     Stream #0:1[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1440x1080 [SAR 4:3 DAR 16:9], max. 25000 kb/s, 25 fps, 25 t
> [Parsed_pad_1 @ 0x40f75a0] Negative values are not acceptable.
> [Parsed_scale_0 @ 0x4132280] Failed to configure input pad on Parsed_pad_1
> Error opening filters!

> -vf scale=1280:-1,pad=1280:720:0:\(oh-ih\)/2
> We also noticed that when we remove "pad=1280:720:0:\(oh-ih\)/2" from
> command above conversion will start to work on Linux. But we need that
> padding. Any ideas why it is not working on Linux, but on Windows is ok?

That cannot work, neither on Linux nor on Windows. Why do you want to
_pad_ a framesize of 1280x960 to 1280x720?

1440x1080 -> scale 1280x960 -> pad 1280x720:0:-120 That won't work, the
pad filter doesn't know what to do, especially with the negative
offset, and it correctly tells you so. You need to crop, not pad, if
the frame is too large.

That's why I request both command lines - I suspect you are feeding a
different file under Windows!

I think there are examples on the web of filters which fit any video
size into a given target size with scaling and padding.

Let me google that for you:
Some is here:
And this seems more concise:


More information about the ffmpeg-user mailing list