On Wed, Jul 6, 2011 at 03:58, 勃 王 <[email protected]> wrote: > The file created only > had video iformation without audio information. I think > there must be some problem here. > > AVOutputFormat *fmt=guess_format ("h264", NULL, NULL); > fmt->audio_codec=CODEC_ID_MP3; > AVFormatContext pFormatCtx=av_alloc_format_contex(); > pFormatCtx-> oformat = fmt;
To mix video with audio you need one of the container formats, like "mp4". "h264" extension belongs to a raw video stream, which is not designed to keep audio. Alex _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
