简体   繁体   English

如何查找AAC-LC(非ADTS)音频数据包长度

[英]How to find AAC-LC (non-ADTS) audio packet length

I have AAC-LC audio stream coming directly from audio encoder. 我有直接来自音频编码器的AAC-LC音频流。

Its a raw stream, No ADTS headers, no container data as I want to stream encoded audio directly as it arrives.(before file gets saved). 它是一个原始流,没有ADTS标头,没有容器数据,因为我想在它到达时直接传输编码音频。(在文件保存之前)。

I want to determine the frame boundaries/frame lengths/packets lengths in incoming encoded raw AAC stream. 我想确定输入编码的原始AAC流中的帧边界/帧长度/分组长度。 (AAC has variable packet lengths.) (AAC具有可变的数据包长度。)

Can I search for any fixed frame headers/patterns so that I can determine frame boundaries? 我可以搜索任何固定的帧头/模式,以便我可以确定帧边界吗?

Is it possible with AAC? AAC可以吗?

Thanks in advance for your valuable inputs. 提前感谢您的宝贵意见。

If you are taking AAC encoded data directly from encoder then it's up to encoder to send frame by frame. 如果您直接从编码器获取AAC编码数据,则由编码器逐帧发送。 It should not send "packets", but single frames. 它不应该发送“数据包”,而是单帧。 Otherwise I don't see a way you can parse for frames. 否则我没有看到你可以解析帧的方法。

I'd first check if it really sends more than one frame at a time? 我首先检查它是否确实一次发送多个帧?

If yes, then one solution would be to tell encoder to send ADTS header, then parse info from ADTS, and finally strip down ADTS from the frame and stream it as raw. 如果是,那么一个解决方案是告诉编码器发送ADTS头,然后从ADTS解析信息,最后从帧中剥离ADTS并将其作为原始流传输。

Does that help? 这有帮助吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM