[FFmpeg-user] Padding in ffmpeg
Jim Worrall
coniophora at gmail.com
Sat Sep 3 18:25:06 CEST 2011
I'm far from an expert, but suspect you may need to scale the video down first, then add the padding. You might try
-s WxH, or
-vf scale=W:H
I don't know what the difference is. I would try to add one of these before your -vf pad=
On Sep 2, 2011, at 1:17 PM, Mark Richards wrote:
Hello all,
I am trying to understand the new padding syntax, but I am struggling to get
it to work.
My source video is 720x576 (5:4)
My output size is 640x360 (16:9)
The source scaled down to 360 pixels high is 450x360.
I want to pillarbox the video, so it ends up with a 94 pixel pillar on each
side of the video.
Since I want the output to be 640x360, these are the params I tried
(roughly)
-vcodec libx264 -fpre libx264-fast.ffpreset -fpre libx264-main.ffpreset
-aspect 16:9 -b 600k ........ -aspect 16:9 -w 640 -h 360 -vf
pad=640:360:94:0:red
But, ffmpeg gives me back this error.
Input area 94:0:734:360 not within the padded area 0:0:440:360 or zero-sized
I guess I clearly don't understand the documentation, cause I've tried every
combination of parameters I can think of, and can't get around that message.
I tried the formula from the documentation, and while it runs, it gives me a
640x640 video that is completely squashed.
vf pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
You help is greatly appreciated!
Mark
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list