[FFmpeg-user] Audio delay doesn't work as expected

Michael Koch astroelectronic at t-online.de
Mon Aug 27 16:18:44 EEST 2018


Am 27.08.2018 um 15:00 schrieb Paul B Mahol:
> On 8/27/18, Michael Koch <astroelectronic at t-online.de> wrote:
>> In the first example I have two identical 1kHz sine sources. The first
>> source is delayed by 0.5ms (which means 180DEG phase shift), and then both
>> channels are mixed. This works as expected, the result is silence.
>>
>> ffmpeg -f lavfi -i sine=f=1000:d=5 -f lavfi -i sine=f=1000:d=5
>> -filter_complex "adelay=0.5,amix" -y test1.mp3
>>
>> In the second example the only difference is that the other channel is
>> delayed. The result should be the same. But it doesn't work, the result
>> isn't silence. Why doesn't it work?
>>
>> ffmpeg -f lavfi -i sine=f=1000:d=5 -f lavfi -i sine=f=1000:d=5
>> -filter_complex "adelay=0|0.5,amix" -y test2.mp3
> sine audio source filter gives mono output, but you give adelay
> options like it is gonna use stereo input.

Thank you! It's working now with this command line:

ffmpeg -f lavfi -i sine=f=1000:d=5 -f lavfi -i sine=f=1000:d=5 
-filter_complex "[0:a]adelay=0.0[d0],[1:a]adelay=0.5[d1],[d0][d1]amix" 
-y test2.mp3

Michael



More information about the ffmpeg-user mailing list