Hi,<div>What you want to do is video transcoding right ?</div><div><br></div><div>So, what I suggest is simply do that :</div><div><br></div><div>Configure the decoder with the input format.</div><div>Configure the encoder with the output format.</div>

<div><br></div><div>For specifying the format, have a look at av_guess_format(...) and avformat_alloc_context().</div><div><br></div><div>AVOutputFormat *outForm= av_guess_format(...) ;</div><div>AVFormatContext *formCtxt = avformat_alloc_context();</div>

<div><br></div><div>And after :</div><div><br></div><div>AVI file ----> decode video ( avcodec_decode_video2(...) ) -----> frame finish ----> store frame ---> encode video with frame (avcodec_encode_video(...) ) ----> MP4 file.</div>

<div><br></div><div>Hope it helps !</div><div><br></div><div>Br, </div><div>Nicolas Braini.</div><div><br></div><div><br><div class="gmail_quote">2012/4/13 Vinoth raj <span dir="ltr"><<a href="mailto:vinoth.amu@gmail.com">vinoth.amu@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote">Dear All,<br><br>How to use the libavcodec C library to convert video format from avi to mp4?<br>

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.<br>
<br>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?<br>Or Which methods in the source code should I use for video conversion? <br><br>Kindly help!
</div><br>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>