将HLS(m3u8)转换为MP4 [英] Converting an HLS (m3u8) to MP4

查看:162
本文介绍了将HLS(m3u8)转换为MP4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以建议如何从 HLS 流中构建 MP4 文件(与您通常想要的相反)吗?说我有m3u8-是否有使用 FFMPEG 或其他工具来获得单个 MP4 的简单方法?

Can anyone advise on how to construct an MP4 file from an HLS stream (the reverse of what you usually want)? Say I have the m3u8 - is there a straightforward way of getting a single MP4 using FFMPEG or some other tool?

推荐答案

ffmpeg -i in.m3u8 -acodec copy -vcodec copy out.mp4

对于AAC音频,您还需要添加位ststream过滤器.(感谢@aergistal指出这一点)

For AAC audio you will also need to add the the bit ststream filter. (Thanks @aergistal for pointing that out)

ffmpeg -i in.m3u8 -acodec copy -bsf:a aac_adtstoasc -vcodec copy out.mp4

这篇关于将HLS(m3u8)转换为MP4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆