Domanda

I am receiving audio data in RTP stream. The audio can be either in G711 A-law or u-law depending on the source. How to decode the audio byte stream using ffmpeg api's? Can ALSA on Linux directly play the G711 audio format?

È stato utile?

Soluzione

Libav for sure supports G.711. The associated codec ID are AV_CODEC_ID_PCM_MULAW and AV_CODEC_ID_PCM_ALAW. I suggest you start from the example program they provide and modify audio_decode_example() in order to use G.711.

avcodec.h: http://libav.org/doxygen/master/avcodec_8h.html libav example: http://libav.org/doxygen/master/avcodec_8c-example.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top