[FFmpeg-trac] #10273(undetermined:closed): ffmpeg amix puts audio input always at postion 0 first, and then at the right positions (ffmpeg Mac version)

FFmpeg trac at avcodec.org
Mon Mar 20 11:05:51 EET 2023


#10273: ffmpeg amix puts audio input always at postion 0 first, and then at the
right positions (ffmpeg Mac version)
--------------------------------+----------------------------------------
             Reporter:  Ralph   |                    Owner:  (none)
                 Type:  defect  |                   Status:  closed
             Priority:  minor   |                Component:  undetermined
              Version:          |               Resolution:  invalid
             Keywords:          |               Blocked By:
             Blocking:          |  Reproduced by developer:  0
Analyzed by developer:  0       |
--------------------------------+----------------------------------------
Description changed by Ralph:

Old description:

> Summary of the bug:
>
> https://stackoverflow.com/questions/75775765/ffmpeg-messes-up-delayed-
> inputs-repeats-at-the-beginning
>
> downloaded from the web side (last binary for Mac).
> And installed by brew install ffmpeg. Both version id's are in the
> ticket.
>
> It does not play a role which audio files as input. I got a 1 second mp3,
> then a 20 second mp3, then another one ...
>
> -v 9 does not output anything on my terminal.

New description:

 Summary of the bug:

 ### ffmpeg messes up delayed inputs (repeats at the beginning)

 ffmpeg plays audio inputs delayed to t1, t2 etc at t=0. If there are
 several inputs, then it replicates one after the other (after in0 finishes
 with its length duration(in0), plays another one at t=duration(in0), etc.)

 In the following example, the in0 is played at t=0.

 ffmpeg -i in0.mp3 -i in1.mp3 -i in2.mp3 -filter_complex
 "[0]adelay=1000[delayed1];[1]adelay=2000[delayed2];[2]adelay=3000[delayed3];[delayed1][delayed2][delayed3]amix=inputs=3:duration=longest"
 -codec:a libmp3lame -q:a 4 output.mp3

 The command performs the following: 1. The ffmpeg processes three input
 files (mp3). 2. The complex filter delays the inputs by 1, 2, 3 seconds
 input-wise. 3. amix mixes the delayed outputs together. 4. And finally, a
 coded transforms it into an output mp3.

 Another short version: 2 delayed beeps, an finally there come 3 beeps out
 (@ 0, 1, 2 seconds):

 ffmpeg -i beep.mp3 -filter_complex
 "[0]adelay=1000[delayed1];[0]adelay=2000[delayed2];[delayed1][delayed2]amix=inputs=2:duration=longest"
 -codec:a libmp3lame -q:a 4 output.mp3

 ffmpeg version N-110011-gf456c192d9-tessus on a Mac M1, downloaded as
 binary from https://evermeet.cx/ffmpeg (01.2023).

 I added also a silent input file from 0 to 1 seconds without any
 alteration of the outcome. I added a silent stream as input as well
 without improvement. E.g.:

 ... -filter_complex "aevalsrc=0:d=4[silence];...

 Another test with another ffmpeg version 5.1 Copyright (c) 2000-2022 the
 FFmpeg developers built with Apple clang version 13.1.6
 (clang-1316.0.21.2.5): ffmpeg -i beep.mp3 -filter_complex
 "[0]adelay=1000[delayed1];aevalsrc=0:d=5[silence];[silence][delayed1]amix=inputs=2:duration=longest"
 -codec:a libmp3lame -q:a 4 output.mp3 There are again 2 beeps, at 0 and 1
 second.

 I am going mad here!

 (comment: concat solves the issue. But I want to have a flexible solution
 with possibly overlapping audio streams.) Thanks for giving a hint!

 (copy: https://stackoverflow.com/questions/75775765/ffmpeg-messes-up-
 delayed-inputs-repeats-at-the-beginning )

 downloaded from the web side (last binary for Mac).
 And installed by brew install ffmpeg. Both version id's are in the ticket.

 It does not play a role which audio files as input. I got a 1 second mp3,
 then a 20 second mp3, then another one ...

 -v 9 does not output anything on my terminal.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10273#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list