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

华为交换机option43和60实例

AC: Aruba 651- 10.77.25.1 AP: Aruba 105 - 172.17.2.0/24 SW: 华为S5720  ip pool pool2  gateway-list 172.17.2.1  network 172.17.2.0 mask 255.255...