首页 > 其他 > 详细

FFmpeg合并多个ts视频文件

时间:2021-04-25 23:24:12      阅读:35      评论:0      收藏:0      [点我收藏+]

方法一:

新建file.txt文档

file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-16.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-17.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-18.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-19.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-20.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-21.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-22.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-23.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-24.ts
file F:\Release\StreamMediaServer\html\hd\34020000001310000701\34020000001310000701_live-25.ts

执行ffmpeg命令

# -safe 0: 防止Operation not permitted
ffmpeg.exe -f concat -safe 0 -i file.txt -c copy out.mp4

方法二:

直接写ffmpeg命令,通过“|”来分隔文件名

ffmpeg -i "concat:34020000001310000701_live-16.ts|34020000001310000701_live-17.ts|" -c copy output.mp4

 

参考链接:https://blog.csdn.net/jiuaiwo1314/article/details/106100781

FFmpeg合并多个ts视频文件

原文:https://www.cnblogs.com/nihaorz/p/14701637.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!