[Ffmpeg-devel] noise in wav converted from mp2
Måns Rullgård
mru
Tue Jul 5 12:11:32 CEST 2005
Alex <alex.ctn at gmail.com> writes:
> I have a raw mp2 file whose sample rate is 44100hz, with bitrate
> 128kb/s. It's okay to be played by RealPlayer or iTune. My following
> code snippet converts it to wav file. It works, but there is also
> some noise. Could you tell me what's wrong?
>
> Thanks.
>
> ------------------------------------------
> av_register_all();
>
> codec = avcodec_find_decoder(CODEC_ID_MP2);
> c = avcodec_alloc_context();
> avcodec_open(c, codec);
>
> ReSampleContext * rsc = audio_resample_init(1, 1, 8000, 44100);
If you resample to 8kHz, noise is to be expected.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list