On Wed, 2009-12-16 at 13:08 -0200, Álan Crístoffer wrote:
> Hi,
> 
> I'm trying to create a audio-video converter and I had ffmpeg complaining
> about the [not] choosen samplerate.
> I found out that AVCodec have a property called supported_samplerates, but
> it does not come initilized when
> I call avcodec_find_encoder().
> What do I have to do to initialize it?
> 
> thanks,

It seems you're out of luck since it's not initialized anywhere - try
grepping for supported_samplerates in the source code and you'll see
that it's only ever mentioned in avcodec.h.
I solved this problem using brute force by having a list of "common"
samplerates (48000, 44100, 32000, 22050, 11025, 8000) and calling
avcodec_open() until it succeeds. What actually needs to be done though
is adding this information to all encoders that have such limitations
(mp2, roq_adpcm etc.).

/Tomas


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to