[FFmpeg-user] Suggestions for FFmpeg: support a simpler command line for concatenating audio files with a specified overlap

Cley Faye cleyfaye at gmail.com
Sun Jan 29 23:27:07 EET 2017

2017-01-29 18:30 GMT+01:00 a <microspec2k1 at hotmail.com>:

> Hello, after hunting around ffmepg.org, I could not find where to post
> suggestions for FFmpeg developers, so if this mailing list is the
> appropriate place here you go otherwise please let me know:
>   1.  I have a need to concatenate programmatically several short (< 1
> second) mp3 files but with a specific overlap for example 100ms, the
> current solution is a command line of this form
>      *
> 1.  ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3
> 2.         -filter_complex
> 3.           "[1]adelay=delay1[b];
> 4.            [2]adelay=delay2[c];
> 5.            [3]adelay=delay3[d];
> 6.            [0][b][c][d]amix=4"
> 7.  out.mp3
>      *   However this forces me to derive each file durations and do the
> math.  I was hoping if you would consider supporting something that would
> not require retrieving the durations and just specify the relative delays
> during concatenation.  Here are a couple of examples
>      *   Delay all input file by the same amount
> ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3 -filter_complex "delay=100;
> amix=4"
>      *   Delay each input by the specified amount or zero if not specified.
> ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3 -filter_complex "[1]delay=100;
> [2]delay=20; amix=4"
>      *   Of course this may not be generalized enough to offer the most
> flexibility so I will let you decide on the final form of the options, but
> you get the point.
>      *   NOTE: I am using C-Sharp to build the command line for other
> FFmpeg tasks, however the simpler command line above would allow easier
> prototyping from a batch file without requiring hardcoding exact value for
> delay1, delay2,...., delayN
I think you got your answer right there. ffmpeg is very flexible, but is
usually used with an "overlay" program to leverage more common use cases.
Even without using the bindings in various languages it's very powerful.‚Äč
Combined with the easily parseable output of ffprobe you can easily do
anything you want already. Also, changing the syntax of filter strings this
way would probably break way more things than it'd be helpful.

More information about the ffmpeg-user mailing list