5

I wanted convert 16:9 video to 9:16 and find this: "FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with blurred background on top and bottom sides"

But I want video top and bottom sides black but I couldn't. How can I do this?

Thanks for your help

ibrahimcetin
  • 93
  • 2
  • 7

1 Answers1

7

Here's the final command. The video is padded to 9:16 and placed in the centre.

ffmpeg -i input.mp4 -vf "pad=iw:2*trunc(iw*16/18):(ow-iw)/2:(oh-ih)/2,setsar=1" -c:a copy output.mp4

Gyan
  • 85,394
  • 9
  • 169
  • 201