This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to play Opus, Silk, speed, PCMU, and PCMA codec

0

My application is using Lib function to choose best of below available CODEC

opus - 48000 HZ
SILK - 16000 Hz
speex - 16000 Hz
speex - 8000 Hz
PCMU - 8000 Hz
PCMA - 8000 Hz

I am new to wireshark, How do i play above Codec as i am not able to see any stream under VoIP call window.

Kindly help me to proceed further.

asked 28 Apr '15, 23:29

Sandy56's gravatar image

Sandy56
6113
accept rate: 0%


2 Answers:

0

This subject has been addressed multiple times, but here's a quick rundown of the important parts.

Wireshark needs to see the signalling protocol to show a VoIP call in that window.

Wireshark needs to see the setup of the media stream (eg. SIP/SDP) to see the RTP stream.

Wireshark can show RTP streams, by setting the dissector preference 'Try to decode RTP outside conversations'.

Wireshark can decode/play the media stream as long as it's PCM encoded, other codecs are not supported.

You can export the RTP contents and use external tools to play the media.

answered 29 Apr '15, 02:21

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

Hi Japp,

Thanks for your quick response, I tried exporting RTP content in .raw format but after saving the file, when i check the properties of the file its getting displayed as just "File" in Type of file field under properties window,is this how the file will be saved.

Do i want to convert this file in to .pcm format to play the audio in player like audacity else is there any other player available play this audio

(30 Apr '15, 00:18) Sandy56

Is it possible to convert this file in to .pcm format file

(30 Apr '15, 00:38) Sandy56

@Sandy56, if still interested almost a year later:

  1. look at the difference between "file name extension" and "file internal format", some hints can be found e.g. in Jaap's answer and my comment to this question. So the fact that Wireshark does not automatically give the file name any "extension" is your advantage: if your decoder needs a particular "extension" to tell it that the file only contains the raw codec data (i.e. there is no descriptor inside the file, like there is in "wav" and "au" files), you just type that extension to the file name manually (.pcm sounds like a good candidate for files containing PCMA and PCMU raw data, but maybe also L16 raw data). But with such files, the decoder will either ask you for additional information necessary to process the file properly, or make a guess and sometimes play the data improperly.

  2. there are two basic categories of audio codecs from the point of view of extraction:

  3. for one of them (a typical case is e.g. L16) the byte stream carried as an RTP payload contains all information about its internal structure necessary for the decoder, so Save Payload as -> Raw is enough if you can then tell the decoder some additional parameters (e.g. sample rate). In the example case of L16, you must tell Audacity the sample rate, the number of channels, the order of bytes, and that's it. But even some compressing codecs can be treated like this.

  4. for the other one, the RTP payload does not represent a continuous stream, so the decoder needs to know the packet borders and thus Save Payload as -> Raw would cause loss of such information. A typical case here is Opus, see details of how to extract the audio from RTP in Jaap's answer to this question and my comments to it. A decoder for Opus is available for free, the script you need to convert tshark packet-by-packet output into an Ogg file is relatively simple.

I'm not sure to which of the two categories SILK and Speex belong, though.

(27 Jan '16, 23:31) sindy

0

I also have the need to convert opus music files to mp3.

then i try many of the software to convert opus files, luckily and finally, i find a step by step guide and a easy-to-use iDealshare VideoGo which can batch convert opus to mp3, wav, wma etc on mac or windows

Step by step guide at http://www.idealshare.net/audio-converter/opus-converter.html

now i like to share it here, hope it also helps for you.

answered 27 Jan '16, 19:26

bestautumnn's gravatar image

bestautumnn
61
accept rate: 0%