> ## Content Index
> Fetch the complete content index at: https://blog.k3s.9zf.net/llms.txt
> Use this file to discover other available public pages before exploring further.

# ffmpeg横版改竖版加模糊
- URL: https://blog.k3s.9zf.net/ffmpeg-e6-a8-aa-e7-89-88-e6-94-b9-e7-ab-96-e7-89-88-e5-8a-a0-e6-a8-a1-e7-b3-8a/
- Published: 2021-11-29T15:49:11.000Z
- Updated: 2021-11-29T15:49:11.000Z
- Author: liu
- Tags: 生活日记, #wordpress, #Import 2026-10-29 06:11

## 模糊

```
ffmpeg -i input_test.mp4 -vf "split[a][b];[a]scale=600:900,boxblur=20:5[1];[b]scale=600:ih*600/iw[2];[1][2]overlay=4:(H-h)/2" -c:v libx264 -crf 18 -preset veryfast -aspect 9:16 -f mp4 output_test.mp4 -y

```

## 黑边

```
ffmpeg -i input.mp4 -vf 'scale=-1:720,pad=1280:720:(1280-iw)/2:0:black' -c:v libx264 -crf 21 -preset veryfast -aspect 16:9 -c:a copy -f mp4 output.mp4 -y
```

## 来源

- https://zhuanlan.zhihu.com/p/357211558
- https://blog.csdn.net/yu540135101/article/details/103025957
- https://blog.csdn.net/qq\_20288327/article/details/114652060
- https://blog.csdn.net/qq\_20288327/article/details/114652060