Hi all,
I've seen many messages about extracting audio from RTP traces. Actually
Ethereal only allows to extract directly into AU if the payload is G.711
A or mu-laws, but the other usual codecs can not be used because of
patents, licenses and so on.
The ITU-T publishes sources for encoding and decoding in different
codecs from and to PCM. If you buy the spec + source codecs you can
compile them; I've been able to decode G.723.1 quite easily:
- open the capture, decode as RTP and filter out the G.723.1
- select the stream and export it as rtpdump format
- run the RTPDUMP -F payload -f file.rtpdump -o file.bits
- run the decoder onto file.bits to obain the file.pcm
- import the file.pcm in, for example Goldwave, as PCM at 8000 bps, 16
bit mono signed format.
For G.729AB it's not as easy because the "bitstream" expected by the
ITU-T decoder routing is quite complex (every individual bit is encoded
as two bytes, 0x81-00 for 1 and 0x7F-00 for 0). I've modified the
RTPDUMP source to parse the payload into this "bitstream" and succeeded,
expect for the silence (annex B) periods which last shorter than
expected (the bitrate for silences and voiced period differs, it can be
30ms rather than 20ms, that's the only explanation I have).
Regards
Jose