Wednesday, June 21, 2023

FFmpeg裁剪合并媒体文件

 ffmpeg裁剪媒体文件:

ffmpeg -i in.mp4 -copyts -ss 00:10:00 -to 00:15:00 -map 0 -c copy out.mp4

 

ffmpeg合并媒体文件:

  • 创建要合并的文件清单vlist.txt,写入:

file '/path/to/video1.mp4'
file '/path/to/video2.mp4'
file '/path/to/video3.mp4'

  • ffmpeg -f concat -safe 0 -i vlist.txt -c copy output.mp4

 (经测试,参数顺序会影响命令执行)

 

参考 :

https://superuser.com/questions/377343/cut-part-from-video-file-from-start-position-to-end-position-with-ffmpeg

https://stackoverflow.com/questions/49371422/how-to-merge-two-videos-without-re-encoding 

https://www.cnblogs.com/feipeng8848/p/9601103.html


No comments:

Post a Comment

一些有用的网站

Windows系统安装界面认不到硬盘,加载RST驱动: https://iknow.lenovo.com.cn/detail/419926.html 纯净版Flash: https://gitlab.com/cleanflash/installer/-/releases    ...