[Libav-user] Merging several audio streams into one

Gustav González xtingray at gmail.com
Fri Apr 22 17:31:45 EEST 2022


Hi!

This C example gets two WAV audio files and merges them to generate a new
WAV file using ffmpeg-4.4 API. Tip: The key of the process is to use these
filters: abuffer, amix and abuffersink.

https://github.com/xtingray/audio_mixer/

Although it doesn't support MP3 format as the output, it gives you the
basics to understand how to implement your own requirements. I hope it can
be handy for anyone looking for references about this specific topic.

On Sun, Mar 20, 2022 at 9:28 AM Gustav González <xtingray at gmail.com> wrote:

> Hi,
> In my current implementation, I was able to process several audio files,
> extract their streams, and added them to a new mp4 file successfully. The
> outcome of my latest test is an MP4 file with a video stream and three
> audio streams.
> When I reproduce the file, I can watch the video but the player only
> reproduce the first audio stream, the other two are ignored.
> I am guessing I will have to merge all the audio streams in just one. So,
> my question is this: is it possible to merge several audio streams into
> just one? I appreciate any hint.
> Thanks.
>
> --
> --
>   Gustav Gonzalez
>   xtingray at gmail.com
>
>

-- 
--
  Gustav Gonzalez
  xtingray at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220422/b7a68459/attachment.htm>


More information about the Libav-user mailing list