[FFmpeg-user] libavfilter : using amix

Mr Artichaut mr.artichaut at gmail.com
Sat Apr 12 16:55:20 CEST 2014


Hi,

Using ffmpeg as a library, I'm trying to mix 2 audio files. I'm on it for
weeks now, I know I'm close but there is still something that doesn't work.

My graph is setup with 2 abuffers, 1 amix filter and 1 abuffersink. All are
linked. I read the first input file and write it into the first buffer, I
do the same for the second input file into the second buffer and then I
read the sink and write it into the output file.

But all I have at the end is noise; but not random noise : I can recognize
the rhythm of my 2 inputs. I have no error when I run the program.

My buffers and sink are correctly configured, as are my decoding and
encoding functions because when I try a more simple thing (read one file,
pushing it into the graph made only of a buffer and a sink and then pulling
data out of the sink into a file) it works.

My test program is here :
https://gist.github.com/MrArtichaut/0cd9147441b51113db4d
It's a collection of functions extracted from examples because for now I
just want to validate a solution.

If someone know how to use amix (or libavfilter in general), I would be
very grateful if it could point to me what I'm missing.

Thank you very much.


More information about the ffmpeg-user mailing list