G.711 is 8 bits, could be an issue. Also, not sure if you need to downsample to 8kHz manually or not. > On Dec 3, 2021, at 5:36 PM, Robert Smith via Libav-user <libav-user at ffmpeg.org> wrote: > > pCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16;