我是学生,正在开发一个有关 VOIP 的项目,以捕获 VOIP 通信,然后将其转换为音频格式。我正在使用 C 编程语言
我能够使用 winpcap 库捕获网络流量并过滤 RTP 数据包。但我不知道如何用它创建音频文件。
最佳答案
为了分析,使用wireshark捕获并导出RTP流: 参见
https://wiki.wireshark.org/RTP
和/或
https://www.wireshark.org/docs/wsug_html_chunked/ChTelRTPAnalysis.html
要从 C 中提取 RTP 数据包,您可以按照 RFC ( https://www.rfc-editor.org/rfc/rfc3550 ) 重新实现来手动完成,或使用第三方库,如 gstreamer ( https://gstreamer.freedesktop.org/documentation/rtp.html )
关于C : how to convert RTP packet to . 原始文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47249549/