Can ffmpeg decode G711 audio

博客围绕接收音频流数据展开,探讨如何使用FFmpeg API解码音频字节流,以及Linux下能否直接播放G.711音频格式。还提到Libav支持G.711,给出相关编解码器ID,并提供了avcodec.h和libav示例的链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 

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

 

https://stackoverflow.com/questions/23429634/can-ffmpeg-decode-g711-audio

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值