Created
July 7, 2019 06:32
-
-
Save beilly/e308959d2c75818b8d08b6f34b471f3b to your computer and use it in GitHub Desktop.
一个基于ffmpeg的视频截取合并的过程记录
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file 'cut111.mp4' | |
file 'cut333.mp4' | |
file 'cut222.mp4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//截取A面前部分 | |
ffmpeg -ss 00:00:00 -i A.mp4 -to 00:58:48 -c copy cut111.mp4 | |
//截取A面结尾部分 | |
ffmpeg -ss 00:58:48 -i A.mp4 -to 00:59:20 -c copy cut222.mp4 | |
//截取B面除去开头部分 | |
ffmpeg -ss 00:00:53 -i B.mp4 -to 00:48:55 -c copy cut333.mp4 | |
//合并三部分的视频为一个完整的 | |
ffmpeg -f concat -i filelist.txt -c copy marry-beilly.mp4 | |
//压缩A面视频 | |
ffmpeg -i A.mp4 -r 25 -b:v 3000k -bufsize 3000k 3333.mp4 | |
//压缩B面视频 | |
ffmpeg -i B.mp4 -r 25 -b:v 3000k -bufsize 3000k 4444.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ffmpeg下载:https://ffmpeg.zeranoe.com/builds/
参考文档:https://www.jianshu.com/p/4f660bd805f3