[Libav-user] Mix audio with video sample API calls

William Troup williamtroup at gmail.com
Tue Jul 12 14:38:30 CEST 2016


I've had the same problem.  Look at these two questions I raised I figured out:

http://stackoverflow.com/questions/37806882/mix-pcm-data-from-two-decoded-ffmpeg-avframe-objects

http://stackoverflow.com/questions/37570129/increase-decrease-audio-volume-using-ffmpeg

Using a filter graph and amix filter will do the job and won't effect proformance that much.



> On 12 Jul 2016, at 13:12, Josef Vosyka <pepavo at gmail.com> wrote:
> 
> I'm successfully using libavcodec.a in my project for video encoding.
> Now I need to add audio track to existing video.
> It works great from command line using this:
> 
>     ffmpeg -i raw_sequence.mp4 -i voices_1.cif -c copy -map 0:v:0
> -map 1:a:0 -shortest out.mp4
> 
> I can not find how to achieve this same thing by making API calls.
> I even tried as desperate option to compile ffmpeg program, rename
> main() and call it internally.
> This is however failing due to a lot of dependencies.
> 
> 1. could you help me with a hit how to make the API calls?
> 
> 2. is the ffmpeg inclusion really stupid or would you give me a hit
> for this too? It is quite elegant if you consider that there are a lot
> of other use-cases when you need to understand the API calls and this
> way you "only" need to understand the command line options.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160712/2886660b/attachment.html>


More information about the Libav-user mailing list