gpt4 book ai didi

wireshark - 使用 Wireshark 解码 Opus-48

转载 作者:行者123 更新时间:2023-12-05 04:17:18 30 4
gpt4 key购买 nike

我想使用 Opus-48 编解码器捕获和解码 VoIP 对话。我正在使用 Wireshark 来捕获数据包。网上有免费的解码器吗?? Wireshark 不保存双向对话,因为它适用于 G-729 等其他编码方案。

最佳答案

在此处使用 python 脚本解码作品 RTP pcap https://github.com/kamanashisroy/opus_stream_tool

一旦我们有了 pcap,我们就可以在流中选择一个 UDP 数据包,并通过 udp.srcport/udp.dstport 过滤掉它rtp.ssrc.

现在,我们可以将 pcap 文件转换为十六进制转储。

tshark -x -r in.pcap -Y "udp.srcport == myport" | cut -d " " -f 1-20 > tmp.txt

终于可以使用hex_to_opus工具来录制ogg编码的opus文件了。

hex_to_opus.py -x tmp.txt --recordfile out.opus --rtpoffset 42

通常如果是 IPv4 则 rtp-offset 是 42。请从数据包的 wireshark 描述中找到 udp 负载的开始。

关于wireshark - 使用 Wireshark 解码 Opus-48,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23683317/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com