Hi, What you want to do is video transcoding right ? So, what I suggest is simply do that :
Configure the decoder with the input format. Configure the encoder with the output format. For specifying the format, have a look at av_guess_format(...) and avformat_alloc_context(). AVOutputFormat *outForm= av_guess_format(...) ; AVFormatContext *formCtxt = avformat_alloc_context(); And after : AVI file ----> decode video ( avcodec_decode_video2(...) ) -----> frame finish ----> store frame ---> encode video with frame (avcodec_encode_video(...) ) ----> MP4 file. Hope it helps ! Br, Nicolas Braini. 2012/4/13 Vinoth raj <[email protected]> > > Dear All, > > How to use the libavcodec C library to convert video format from avi to > mp4? > I do not want to use ffmpeg from command line but rather want to create a > C/C++ application with the ability to convert AVI to MP4 video format. > > I could not find any samples on video format conversion. Can anyone > suggest what sequence of steps should I follow to handle conversion of > videos? > Or Which methods in the source code should I use for video conversion? > > Kindly help! > > > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > >
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
