[Live-devel] RTP Audio without sip
Ross Finlayson
finlayson at live555.com
Thu Jun 13 07:20:28 PDT 2024
> On Jun 13, 2024, at 6:24 AM, Guillermo Bernaldo de Quiros Maraver <gbernaldo at cestel.es> wrote:
>
> Hi Ross!
>
> First of all, thank you so much for your answer!
>
> Answering your question, the audio codec is AMR-WB and I have the SDP description too although I know in advance all info related to the media (sample rate, channel number, ...).
>
> Is there any sample code I can use as a guide?
Yes, I suggest using the code for the “testMP3Receiver” and “testMP3Streamer” applications (both are built automatically in the “testProgs” directory) as a guide. I suggest starting with the ‘receiver’ application, and make sure that you can receive the incoming AMR-WB audio OK, before working on the ‘streamer’ (i.e., transmitter) application.
Using the “testMP3Receiver.cpp” code as a guide, you would:
- line 64: Replace this with a call to “AMRAudioFileSink::createNew()"
- line 70: Replace this string with your stream’s (destination) multicast address, or “0.0.0.0” if it is unicast
- line 75: Replace this with the incoming stream’s (destination) port number
- line 107: Replace this with a call to “AMRAudioRTPSource::createNew()”, with relevant parameters. (In particular, you will want the “isWideband” parameter set to True)
This should be enough to give you a ‘receiver’ application that receives the incoming AMR-WB stream into a file (that you can play with a media player like VLC; you may need to give the filename a “.amr” suffix).
For the transmitter application, you could similarly use “testMP3Streamer” as a guide. The most important thing to do here is call
AMRAudioRTPSink::createNew()
instead of
MPEG1or2AudioRTPSink::createNew()
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list