Extend + scale a portrait video so the aspect rati

2019-06-02 09:20发布

I have a 720 x 1280 pixels video. How do I extend and scale it to 1920 x 1080 such that the aspect ratio is being kept and the black borders are a blurry version of the video, so you don't really notice that it's just a small vertical stripe.

Example

enter image description here

enter image description here

I started with

ffmpeg -i video720x1280.mp4 -vf "scale=608:1080,pad=width=1920:height=1080:x=656:y=0:color=black" video1920x1080.mp4

标签: ffmpeg
1条回答
Emotional °昔
2楼-- · 2019-06-02 09:46

Use

ffmpeg -i video720x1280.mp4
  -filter_complex
      "[0]scale=hd1080,setsar=1,boxblur=20:20[b];
       [0]scale=-1:1080[v];[b][v]overlay=(W-w)/2"   video1920x1080.mp4

Adjust the two values in the boxblur filter for blur strength. Higher = more blurring.

查看更多
登录 后发表回答