[Libav-user] hello i need help in using swreample lib.
Rafi Fisher
rafi.fisher at wywy.com
Fri Nov 30 20:51:18 CET 2012
hello
i try to trancode audio frames decoded from mp2 file into wav file.
so from what i understand
my input buffer should be the: *uint8_t *data *field in the*AVFrame
* structure
my output buffer should be allocated using :
int* av_samples_alloc*(uint8_t **audio_data, int *linesize, int
nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align);
what size should i put in* nb_samples* parameter ?
then i understand i should call :
int *swr_convert*(struct SwrContext *s, uint8_t **out, int
out_count, const uint8_t **in , int in_count);
and pass* AVFrame data* filed as input buffer & the allocated
samples buffer as the output buffer.
how do i calculate the* in_count & the out_count*. parameters.
any help will be appreciated . thanks rafi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121130/a8e03aa8/attachment.html>
More information about the Libav-user
mailing list