如何从 mp4 容器获取 aac 音频? (Windows Phone 7 和 C#)
我编写 Windows Phone 7 应用程序,有一个下一个问题:
我的应用程序获取包含 aac 格式音频的文件流,该文件位于 mp4 容器中。所以我需要从这个只有 aac 数据的字节流序列中获取。我怎样才能做到这一点?
之后我需要在 MediaStreamSource 类中使用这些数据。因此还需要获取aac帧的码率等信息。该信息是在生成的字节序列中,还是也可以从 mp4 容器中获取?
I write windows phone 7 application and there is a next problem:
My app gets a stream of file with audio in aac format which is in mp4 container. So I need get from this stream sequence of bytes with only aac data. How can I do that?
After that I need to use this data in MediaStreamSource class. Therefore it is also necessary to obtain information such as bitrate of aac frames. Will be that information in the resulting sequence of bytes, or it can also be obtained from the mp4 container?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过此链接获取 ACC 帧的标头。
http://wiki.multimedia.cx/index.php?title=ADTS
读取前 9 个字节,然后从中读取相应的位以获取值。
即从 30 到 43 的位给出了帧的总长度。
希望这能帮助您开始。
this is the link from where you can get the header of the ACC Frame.
http://wiki.multimedia.cx/index.php?title=ADTS
Read first 9 bytes and from that read bits accordingly to get the value.
i.e. bit from 30 to 43 gives the total length of the frame.
hope this will help you to start.