On 4/21/12 6:30 PM, Jake Alley wrote:
I downloaded the latest win32 build and tried to write to a webm file with this 
example:

http://libav.org/doxygen/master/libavformat_2output-example_8c-example.html

It fails when trying to open the audio codec

static void open_audio(AVFormatContext *oc, AVStream *st)
{
     AVCodecContext *c;

     c = st->codec;

     /* open it */
     if (avcodec_open2(c, NULL, NULL)<  0) {<<<<<<  fails here
         fprintf(stderr, "could not open codec\n");
         exit(1);
     }

The codec seems to be set up OK for libvorbis.

codec = 0x6a693460 {name=0x6a6fd67b "libvorbis" long_name=0x6a6fd685 "libvorbis 
Vorbis" type=AVMEDIA_TYPE_AUDIO ...}


AVI files work fine.  MP4 files output without errors but have bad data.  Is 
there a better example than output_example.c?  Do I have to do more to setup 
the codecs than is shown in output_example.c?


Vorbis might not be supported in MP4, which player are you using to decode/demux it?

lu

_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to