Skip to content

Instantly share code, notes, and snippets.

@beilly
Created July 7, 2019 06:32
Show Gist options
  • Save beilly/e308959d2c75818b8d08b6f34b471f3b to your computer and use it in GitHub Desktop.
Save beilly/e308959d2c75818b8d08b6f34b471f3b to your computer and use it in GitHub Desktop.
一个基于ffmpeg的视频截取合并的过程记录
file 'cut111.mp4'
file 'cut333.mp4'
file 'cut222.mp4'
//截取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
@beilly
Copy link
Author

beilly commented Jul 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment