MPEG-4 文件中的多个音频流
MPEG-4 文件格式允许文件中存在多个流。 这对于包含多种语言音频的视频非常有用。 在这种视频的情况下,音频流与视频同步。
是否可以创建包含不同步音频流(即音轨依次播放)的 MPEG-4 文件?
我想设计一个包含音乐专辑的 MPEG-4 文件,因此由媒体播放器(例如 VLC。 当我使用 MP4Box(来自 GPAC 框架)时,VLC 将生成的文件识别为具有同步音频流。 MPEG-4 文件格式的哪个框负责此操作? 或者我如何告诉 VLC 这些音频流不同步?
提前致谢!
The MPEG-4 file format allows multiple streams to be present in a file.
This is useful for videos containing audio in multiple languages. In the case of such a video, the audio streams are synchronized to the video.
Is it possible to create a MPEG-4 file the contains desynchronized audio streams, i.e. the audio track are played on after another?
I want to design a MPEG-4 file that contains a music album, so it is crucial that the tracks are played one after another by media players such as VLC.
When I use MP4Box (from the GPAC framework) the resulting file is recognised by VLC as having synchronized audio streams. Which box of the MPEG-4 file format is responsible for this? Or how can I tell VLC that these audio streams are not synchronized?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以想到两种方法可以做到这一点,但这两种方法都会有一些问题。
您可以将所有音频流连接到 MP4 文件中的一个音轨中。 由于一些明显的原因,这并不理想。 一方面,这并不完全是您所要求的。
您也可以将曲目存储为同步音频流,但设置计时信息,使得第二首曲目的第一个样本在第一个曲目完成播放之前不会开始播放,等等。
我不知道有什么可以执行此操作的工具,但文件格式将支持这种方案。 由于这是一种在 MP4 文件中存储音频的不寻常方式,因此我预计玩家也会遇到这样的问题。
I can think of two ways you could do that, and both would be somewhat problematic.
You could concatenate all the audio streams into one audio track in the MP4 file. This won't be ideal, for some obvious reasons. For one thing, it's not exactly what you were asking for.
You could also just store the tracks as synchronized audio streams, but set the timing information in such a way that the first sample of the second track won't start playing until the first track finished playing, etc.
I'm not aware of any tools that can do this, but the file format will support such a scheme. Since it's an unusual way to store audio in an MP4 file, I would expect players to have problems with this, too.
连接所有流是可行的,并且可以通过添加章节来处理各个轨道。 它至少可以与 VLC 配合使用。
chapters.txt
看起来像这样:但这只是一个 hack。
我正在寻找的解决方案应该将轨道保留为单独的流。
Concatenating all streams would work and the individual tracks can be addressed by adding chapters. It works at least with VLC.
The
chapters.txt
would look something like this:But this is only a hack.
The solution I'm looking for should preserve the tracks as individual streams.