[Libav-user] Libav API: Filtering + Transconding

Gustav González xtingray at gmail.com
Tue May 10 06:20:41 EEST 2022

Hi, I need to process a list of several audio files (MP3 and WAV) and mix
them to generate an audio stream (AAC codec / fltp) to be included in an
mp4 file (using the Libav API).

Currently, I can mix the list of input files to generate a WAV file
successfully using filters, nevertheless, when I try to create the MP4
file, I always get this error message: '*Resource temporarily unavailable*'
(Of course, I tried several audio codec/fmt values to make it work with no

The basic version of my experimental implementation is available right here

I was checking the AAC transcoding example
that comes with the FFMPEG source code, and it works perfectly giving the
outcome exactly as I need it.

(The only problem I have with this example is that it doesn't include any
filtering process. I tried to extend it but I failed in an epic way...
besides, the workflow of the code looked pretty tangled)

So, this is my question: Can I try to achieve the same result as the
transcode_aac but using a filter? I would like to keep the mixing feature
already implemented using filters without having to make big changes in my
workflow to generate the audio stream for the MP4 file. Any ideas or
suggestions are pretty welcome!


*PS:* I was thinking of using the resample filter
<https://libav.org/documentation/libavfilter.html#resample> to solve my
problem, but the documentation says: "*It is not meant to be used directly*".
So, I wonder: is there any clean easy way to implement it as part of my
  Gustav Gonzalez
  xtingray at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220509/4cd6f9af/attachment.htm>

More information about the Libav-user mailing list