问题描述
我正在尝试将音频编码的数据包写入MP4容器.我已遵循此示例代码,而不是创建虚拟帧,而是将真实的 G.711 PCMU 编码帧输入到ffmpeg中.写作似乎可以正常工作,并且文件大小正在增加,但是无法使用 ffplay
或在VLC播放器中播放mp4.
I am trying to write audio encoded packets into a MP4 container.I have followed this sample code and instead of creating dummy frame, I am feeding real G.711 PCMU encoded frame into ffmpeg. The writing seems working and file size is increasing, but the mp4 is not playing using ffplay
or in VLC player.
提前谢谢!
推荐答案
mp4
容器不支持G.711 PCM编码的数据.因此,我改用了 mov
多媒体容器.对于 mp4
,我将PCM转码为AAC,而 mp4
支持.有关详细信息,请参见此.
G.711 PCM encoded data is not supported by mp4
container. So I used mov
multimedia container instead. And for mp4
, I transcoded PCM into AAC which is supported by mp4
. See this for details.
这篇关于仅将音频混音到MP4 ffmpeg中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!