[Libav-user] Regarding AAC to PCM conversion

Gitanshu Mehndiratta gitanshu39 at gmail.com
Sun Aug 11 14:00:14 EEST 2019


Hello,

Yes...I am using swr_convert after decoding. decoder produces
AV_SAMPLE_FMT_FLTP format.

while creating swr context i am setting above settings to output codec
context. (finding decoder for *AV_CODEC_ID_PCM_S16LE and setting *
*AV_SAMPLE_FMT_S16* )
and i have same sample rate and channels as input. conversion API is
success. only thing issue is that in output i have a lot of noise along
with original sound.

which is exactly similar to problem  https://trac.ffmpeg.org/ticket/3525.
I tried given solution but noise is not removed. Could anybody tell is
there any working solution to above problem ?

For reference These are the steps i am following.

my code is taken similar to transcode_aac.c example, only thing changed is
i am converting from aac to pcm.

Any pointers are welcome.

On Fri, Aug 9, 2019 at 10:16 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> Am Fr., 9. Aug. 2019 um 17:19 Uhr schrieb Gitanshu Mehndiratta
> <gitanshu39 at gmail.com>:
>
> > My target is to convert AAC, fltp format to PCM, S16 format.
>
> If you are using the native "aac" decoder, the output is
> AV_SAMPLE_FMT_FLTP,
> you have to use either the aresample filter or the libswresample
> library directly
> to convert to AV_SAMPLE_FMT_S16.
> There is also an "aac_fixed" decoder but is provides AV_SAMPLE_FMT_S32P
> which you also have to convert.
>
> Note that the format provided by a decoder is not part of the api, it has
> changed in the past and may change in the future so it is a good idea
> to use aresample even if the decoder and encoder (currently) use the
> same sample format.
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190811/fc7b5628/attachment.html>


More information about the Libav-user mailing list