title: Using ffmpeg convert a file from one format to another
body: <p>I'm new to <code>ffmpeg</code> and I was trying to find out how to convert a audio or video file from one format to another. I don't want to use <code>CLI</code>, I just want to know if I can use <code>ffmpeg</code> as a library and call a function to convert a file from one format to another. I went through the documentation and found functions <code>avcodec_encode_audio</code> and <code>avcodec_encode_video</code> but its not clear how I can use this to convert. A tutorial or an example will be very helpful.  </p>