Jonas Kongslund
Jonas Kongslund

Reputation: 5268

Convert RTP packets to WAV or AU using ffmpeg

I have a file containing a sequence of RTP packets wrapped in UDP/IP packets. I want to convert this file to a WAV or AU file and was told that ffmpeg may be able to do the job. However the tool does not behave as I would expect. For some reason it is expecting an SDP file but I do not have such a file and I am wondering why it is needed since the RTP packets seem to contain enough information in order to do the conversion. Also it is reporting the wrong payload type.

Any ideas? Below is what I have tried. The RTP packets in the input file alaw.rtp only have payload types 8 (A-law) and 72 (RTCP related) so I do not know where payload type 105 is coming from.

$ ffmpeg -f rtp -i alaw.rtp alaw.au
...
[rtp @ 0x9dbdfe0] Unsupported RTP version packet received
    Last message repeated 89 times
[rtp @ 0x9dbdfe0] Unable to receive RTP payload type 105 without an SDP file describing it
[rtp @ 0x9dbdfe0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtp, from 'alaw.rtp':
  Duration: N/A, bitrate: N/A
File 'alaw.au' already exists. Overwrite ? [y/N] y
Output #0, au, to 'alaw.au':
Output file #0 does not contain any stream

This is the version of ffmpeg that I have used

ffmpeg version 0.10.6-6:0.10.6-0ubuntu0jon1~lucid2
built on Nov 12 2012 15:20:22 with gcc 4.4.3

Upvotes: 2

Views: 7332

Answers (1)

Prakash GiBBs
Prakash GiBBs

Reputation: 315

If your intention is to hear the voice present in .pcap file you can follow the below steps.

Install Wireshark:

  1. File -> open filename.pcap

  2. Analyze -> Decode As

    select RTP from the list then click on apply

  3. Telephony -> RTP -> Show All Streams -> Analyze

  4. Then click on Player -> Decode

  5. Enable the check box appearing for each file and play

  6. Now you can here the streams.

Note: Make sure that you have latest version of Wireshark installed.

Upvotes: 0

Related Questions