简体   繁体   English

从RTP数据包中解析PCM音频数据

[英]Parse PCM audio data from RTP packet

I am building ac application for receiving RTSP audio (16bit, Linear PCM). 我正在构建用于接收RTSP音频的交流应用程序(16位,线性PCM)。 I have completed the RTSP handshakes and getting RTP audio data from server (TCP transport, UDP is not possible in my case, firewall limitation). 我已完成RTSP握手并从服务器获取RTP音频数据(TCP传输,在我的情况下不可能使用UDP,防火墙限制)。 For parsing the audio data (PCM) from RTP payload what should i do. 为了从RTP有效载荷中解析音频数据(PCM)我应该怎么做。 i have tried to remove the RTP header from received packet (First 12 bytes), but the audio i got have continuous jitter. 我试图从收到的数据包(前12个字节)中删除RTP标头,但我得到的音频有连续的抖动。 Is there any example codes or an methods for parsing the payload from RTP packet. 是否有任何示例代码或方法用于从RTP数据包解析有效负载。

Are you sure you fully respect the header specification ? 你确定你完全尊重标题规范吗?

Decoding audio frames can be tricky, I recommend using FFMPEG libraries . 解码音频帧可能很棘手,我建议使用FFMPEG库

Some good examples can be found on Stack Overflow. Stack Overflow上可以找到一些很好的例子

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

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