<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>I've had the same problem.  Look at these two questions I raised I figured out:</div><div><br></div><div><a href="http://stackoverflow.com/questions/37806882/mix-pcm-data-from-two-decoded-ffmpeg-avframe-objects">http://stackoverflow.com/questions/37806882/mix-pcm-data-from-two-decoded-ffmpeg-avframe-objects</a></div><div><br></div><div><a href="http://stackoverflow.com/questions/37570129/increase-decrease-audio-volume-using-ffmpeg">http://stackoverflow.com/questions/37570129/increase-decrease-audio-volume-using-ffmpeg</a></div><div><br></div><div>Using a filter graph and amix filter will do the job and won't effect proformance that much.</div><div><br></div><div><br></div><div><br>On 12 Jul 2016, at 13:12, Josef Vosyka <<a href="mailto:pepavo@gmail.com">pepavo@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>I'm successfully using libavcodec.a in my project for video encoding.</span><br><span>Now I need to add audio track to existing video.</span><br><span>It works great from command line using this:</span><br><span></span><br><span>     ffmpeg -i raw_sequence.mp4 -i voices_1.cif -c copy -map 0:v:0</span><br><span>-map 1:a:0 -shortest out.mp4</span><br><span></span><br><span>I can not find how to achieve this same thing by making API calls.</span><br><span>I even tried as desperate option to compile ffmpeg program, rename</span><br><span>main() and call it internally.</span><br><span>This is however failing due to a lot of dependencies.</span><br><span></span><br><span>1. could you help me with a hit how to make the API calls?</span><br><span></span><br><span>2. is the ffmpeg inclusion really stupid or would you give me a hit</span><br><span>for this too? It is quite elegant if you consider that there are a lot</span><br><span>of other use-cases when you need to understand the API calls and this</span><br><span>way you "only" need to understand the command line options.</span><br><span>_______________________________________________</span><br><span>Libav-user mailing list</span><br><span><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a></span><br><span><a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a></span><br></div></blockquote></body></html>