Hi,

I am facing similar problem as explained in
https://trac.ffmpeg.org/ticket/3525.

My target is to convert AAC, fltp format to PCM, S16 format.

when i convert AAC to PCM it plays well but a lot of noise is added. I
tried solution given in link but it did not worked for me.

Does any body know the proper fix of this problem?.

Below is my output AVCodecContext used in swr_alloc_set_opts() and
conversion.


AVCodec *out_codec = avcodec_find_encoder(*AV_CODEC_ID_PCM_S16LE*);

*if* (!out_codec) {

*return* -1;

}


out_codec_ctx = avcodec_alloc_context3(out_codec);


out_codec_ctx->profile        = FF_PROFILE_UNKNOWN;

out_codec_ctx->channels       = in_codec_ctx->channels;

out_codec_ctx->sample_rate    = in_codec_ctx->sample_rate ;

out_codec_ctx->channel_layout =
av_get_default_channel_layout(out_codec_ctx->channels);

out_codec_ctx->sample_fmt     = out_codec->sample_fmts[0];  //
*AV_SAMPLE_FMT_S16*

out_codec_ctx->bit_rate       = in_codec_ctx->bit_rate;

out_codec_ctx->frame_size  = codecpar->frame_size;


Any suggestion/pointers are appreciated.


*Thanks,*
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to