ffmpeg Pcm 转AAC Specified sample format s16 is invalid or not supported
PCM转AAC
报错如下:
Output #0, adts, to '/var/mobile/Containers/Data/Application/6BD36B53-E9BF-49BF-9BA3-8CEBD98D2233/Documents/TestAAC1.aac':
Stream #0:0: Audio: aac, 44100 Hz, stereo, s16, 64 kb/s
[aac @ 0x14c8a0400] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
查找问题说 pCodecCtx->strict_std_compliance =FF_COMPLIANCE_EXPERIMENTAL; 然后解决。出现下面的错误:
Output #0, adts, to '/var/mobile/Containers/Data/Application/4DF33CCF-C12B-4CB5-8D50-019204860CC7/Documents/TestAAC1.aac':
Stream #0:0: Audio: aac, 44100 Hz, stereo, s16, 64 kb/s
[aac @ 0x14e873200] Specified sample format s16 is invalid or not supported
Failed to open encoder!
Specified sample format s16 is invalid or not supported? 求解