简体   繁体   中英

FFMPEG, resize and pad a video by and odd number of pixels?

I'm trying to resize and pad a video from 1917 x 1080 to 1920 x 1080 .

I've tried various syntax, which works but doesn't change the size.

ffmpeg -i input.mp4 -filter:v scale=1920:1080,pad=1920:1080 -c:a copy output.mp4

However, I have go to this point by resize, joint audio and rotate. The initial size is 640 x 1136 , I believe this is the source of the problem.

ffmpeg -i input.mp4 -filter:v scale=900:1200 -c:a copy output.mp4

ffmpeg \
-i input.m4a \
-i resize.mp4 -acodec copy -vcodec copy -shortest \
output.mp4

ffmpeg -i input.mp4" -vf "transpose=2" output/mp4

So I'm wondering if I should do something different earlier

Use this on the original video,

ffmpeg -i input.mp4 -filter:v transpose=2,scale=1920:1080,setsar=1 -c:a copy output.mp4

You can add the audio in. if you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM