Skip to content

Commit

Permalink
ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Mar 18, 2024
1 parent 2c4d360 commit 8c3e9bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/chapter/devops/ffmpeg.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ ffmpeg -i input.mp4 -c:v libx264 -c:a aac -crf 23 -preset medium output.mp4
-vf "drawtext=text='水印':fontsize=24:x=(w-text_w-10):y=(h-text_h-10):fontcolor=white:box=1:[email protected]:fontfile=/path/to/font.ttf"
```

## 缩略图

``` bash
# 多张预览
ffmpeg -hide_banner -i input.mp4 -an -vf "select='eq(pict_type,PICT_TYPE_I)',thumbnail" -vsync vfr -frames:v 10 output_%03d.jpg
# X宫格
ffmpeg -hide_banner -i input.mp4 -an -vf "select='eq(pict_type,PICT_TYPE_I)',thumbnail,scale=iw/2:-1,tile=2x2" -vsync vfr -frames:v 1 output.jpg
```

## 直播推流

```
Expand Down

0 comments on commit 8c3e9bb

Please sign in to comment.