Update ffmpeg.md (#30)

编辑视频剪切部分示例
This commit is contained in:
ryanhex53 2022-11-09 11:25:48 +08:00 committed by GitHub
parent 12b84b8368
commit 816f49004f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,10 @@ $ ffmpeg -r 1 -i input.m2v -r 24 output.avi
<!--rehype:wrap-class=col-span-2-->
```bash
# 从1分45秒开始剪切2分35秒
$ ffmpeg -i <input> -ss 00:01:45 -t 00:02:35 -vcodec copy -acodec copy <output>
# 从1分45秒开始剪切到第4分20秒与上一行等效
$ ffmpeg -i <input> -ss 00:01:45 -to 00:04:20 -codec copy <output>
$ ffmpeg -ss 00:00:30 -i orginalfile.mpg -t 00:00:05 -vcodec copy -acodec copy newfile.mpg
# 从 4.5 秒开始的 5 秒长的视频
$ ffmpeg -i in.mp4 -ss 4.5 -t 5 out.mp4
@ -588,4 +591,4 @@ ffmpeg -i 1.mp4 -b:v 548k -vf delogo=x=10:y=10:w=120:h=45:show=1 output.mp4
- [FFmpeg Cheat Sheet](https://lzone.de/cheat-sheet/ffmpeg) _(lzone.de)_
- [FFmpeg Cheat Sheet](https://devhints.io/ffmpeg) _(devhints.io)_
- [FFmpeg Cheat Sheet](https://github.com/yuanqing/ffmpeg-cheatsheet) _(github.com)_
- [FFmpeg Cheat Sheet](https://cheatography.com/thetartankilt/cheat-sheets/ffmpeg/) _(cheatography.com)_
- [FFmpeg Cheat Sheet](https://cheatography.com/thetartankilt/cheat-sheets/ffmpeg/) _(cheatography.com)_