I want to capture and decode VoIP conversation using Opus-48 codecs. I am using Wireshark to capture packets. Are there any free decoders available online ?? Wireshark doesn't save two way conversation as it works for other encoding schemes like G-729.
Decode opus RTP pcap using python script here https://github.com/kamanashisroy/opus_stream_tool
Once we have the pcap, we can select an UDP packet in the stream and filter that out either by udp.srcport/udp.dstport or by rtp.ssrc.
Now, we can convert the pcap file into a hex-dump.
tshark -x -r in.pcap -Y "udp.srcport == myport" | cut -d " " -f 1-20 > tmp.txt
Finally we can use the hex_to_opus tool to record ogg encoded opus file.
hex_to_opus.py -x tmp.txt --recordfile out.opus --rtpoffset 42
Normally if it is IPv4 the rtp-offset is 42. Please find the start of the udp payload from the wireshark description of the packet.
You have two choices. Either use the libopus library directly, or else convert your RTP packets into an Ogg Opus files, and then use any player that supports Opus (Firefox, Chrome, VLC, ...) to play the Ogg file. In all cases, you should start at http://opus-codec.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With