You can do something like that:

   aOutputFmt = guess_format("mp3", NULL, NULL);

in case if format not found you should get error message, shouldn`t you?

26.05.2009, в 16:26, amol mahamuni написал(а):

Hello,
Yes, I am directly appending data to a file.Now, I am looking into output_example.c.
There is again a problem.
AVFormatContext* fmt = guess_format(NULL, "c:/testFile.mp3", NULL) gives NULL.
Any idea why?
I tried number of options AVFormatContext* fmt = guess_format("mp3", "c:/testFile.mp3", "audio/mp3");
AVFormatContext* fmt = guess_format("mp3", "c:/testFile.mp3", NULL);
AVFormatContext* fmt = guess_format("mp3", NULL, NULL);

Everytime it gives fmt is NULL.
I need to assign this AVFormatContext.oformat variable to proceed ahead with output_example.c

Instead of using guess_format(); I used guess_stream_format without sucess.

Thanks,-Amol.

--- On Mon, 5/25/09, Alexandr Kutuzov <[email protected]> wrote:

From: Alexandr Kutuzov <[email protected]>
Subject: Re: [libav-user] Audio encode problem - Urgent
To: "Libav* user questions and discussions" <[email protected]>
Date: Monday, May 25, 2009, 6:12 PM

you simply put encoded frames to file or you are using avformat?

look at libavformat/output-example.c

25.05.2009, в 16:22, amol mahamuni написал(а):

Hello,

I get raw sudio stream from Mic using Microsofts DirectSound APIs. To compress it (MP3) , I used avcodec_encode_audio() function from libavcodec.dll. The function successed and gave be some bytes which I appended to a file. But when I play this file, it plays FASTER.

Any thoughts what I should do to play this file at slower rate?


Thanks,
-Amol.



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

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




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

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

Reply via email to