Frage

I have an issue related to the AMR codec in RTP.

I have RTP capture in pcap form having the AMR-NB and AMR-WB codecs.

Now, using the RTP stream analysis, i have extracted the raw output but I am not able to play that extracted raw output in any of the player.

Is there any way i can play that raw output or decode it and it save it raw format or re-encode it to some other format?

Regards Nitin

War es hilfreich?

Lösung

Wireshark does not do the conversion necessary to convert the RTP AMR payloads into the storage format used by .amr files (for playing by audio applications)

RFC 4867 describes the various payload and storage formats. I'd recommend that you read this to become familiar with the different formats. Then you will need to do the following steps:

  1. Figure out what payload format is being used (eg octet-aligned or bandwidth-efficient). This is usually found in the SIP/SDP negotiation
  2. Write a script to convert the payloads into an .amr file using RFC 4867 as your guide
  3. Play the .amr file or convert it to another format using a tool like ffmpeg

I have pasted some example Python code that does the payload conversion here

Andere Tipps

Okay lets write this again: I have a PCAP file which contains RTP packets. There are SIP and AMR messages within it (Wideband or Narrowband) I want to get the corresponding AMR sound file which can be played by every player.

Alex Cohn's approach seems to be easy. By just adding and removing some bits from what can be exported from PCAP. As it seems the raw payload can be exported.

So does that mean that the python script needs this *.raw data as input and converts the file to a playable AMR format and I just need to distinguish AMR-NB or AMR-WB?

What about SID messages. Will there be NO_DATA frames inserted automatically?

So what to do step by step starting at a PCAP?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top