FFmpeg合并多个ts视频文件
2023-02-19 12:21:12 时间
背景
现在很多流媒体支持了hls保存录像,那么下载录像需要怎么支持呢?有人使用了ffmpeg 拉取hls流进行转码保存,这样太耗时,现提供一种节省时间、消耗更低方法。
方法
方法一:
1.新建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'
2.执行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
相关文章
- Jgit的使用笔记
- 利用Github Action实现Tornadofx/JavaFx打包
- 叹息!GitHub Trending 即将成为历史!
- 微软软了?开源社区讨论炸锅,GitHub CEO 亲自来答
- GitHub Trending 列表频现重复项,前后端都没去重?
- Photoshop Elements 2021版本软件安装教程(mac+windows全版本都有)
- (ps全版本)Photoshop 2020的安装与破解教程(mac+windows全版本都有)
- (ps全版本)Photoshop cc2018的安装与破解教程(mac+windows全版本,包括2023
- 环境搭建:Oracle GoldenGate 大数据迁移到 Redshift/Flat file/Flume/Kafka测试流程
- 每个开发人员都要掌握的:最小 Linux 基础课
- 来撸羊毛了!Windows 环境下 Hexo 博客搭建,并部署到 GitHub Pages
- 超实用!手把手入门 MongoDB:这些坑点请一定远离
- 【GitHub日报】22-10-09 zustand、neovim、webtorrent、express 等4款App今日上新
- 【GitHub日报】22-10-10 brew、minio、vite、seaweedfs、dbeaver 等8款App今日上新
- 【GitHub日报】22-10-11 cobra、grafana、vue、ToolJet、redwood 等13款App今日上新
- Photoshop 2018 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2017 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2020 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2023 资源免费下载(mac+windows全版本都有,包括最新的2023)
- 最新版本Photoshop CC2018软件安装教程(mac+windows全版本都有,包括2023