CicadaPlayer icon indicating copy to clipboard operation
CicadaPlayer copied to clipboard

不支持G.711的音频

Open fingerplay opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 用了0.4.4和0.4 版本,发现都不支持G.711,这个ffmpeg应该很早就支持,为什么这里不支持呢?而iOS平台本身的解码器也不支持G.711,导致彻底无法使用。 由于国外版权原因很多APP不能使用AAC,所以希望能支持下

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

fingerplay avatar Jul 12 '24 09:07 fingerplay

可以看看这个问题,或许对你有帮助 https://github.com/alibaba/CicadaPlayer/issues/730#issue-1785463222

developerDaver avatar Aug 02 '24 03:08 developerDaver

可以看看这个问题,或许对你有帮助 #730 (comment)

嗯,我看了,改了下枚举值,但是还是无法解析G711

fingerplay avatar Aug 06 '24 06:08 fingerplay

image 我添加了枚举值之后,在这个地方调用avcodec_find_decoder时,会找不到对应的codec,我传入的参数是AV_CODEC_ID_PCM_ALAW, 按道理ffmpeg应该很早就支持这个格式了,我把代码移植到其他工程也依然有这个问题,但是我用其他版本的ffmpeg是没问题的,我怀疑是4.3.1这个版本改了些什么东西导致的g711不可用

fingerplay avatar Aug 09 '24 04:08 fingerplay

找到ffmpeg_config,添加需要支持的音频格式就可以了

developerDaver avatar Aug 14 '24 03:08 developerDaver