FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with blurred background on top and bottom sides

后端 未结 2 884
孤城傲影
孤城傲影 2021-01-14 14:33

I know there is a post to do the contrary: FFmpeg: How to convert vertical video with black sides, to video 16:9, with blurred background sides

but i can\'t figure o

2条回答
  •  不思量自难忘°
    2021-01-14 15:21

    I adapted solution proposed by Mulvya

    here is the final result:

    ffmpeg -i input.mp4 -lavfi "[0:v]scale=256/81*iw:256/81*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=iw*81/256"  output.mp4
    

提交回复
热议问题