[FFmpeg-user] Replace part of the audio

Michael Koch astroelectronic at t-online.de
Mon Jan 23 10:26:31 EET 2023


Am 22.01.2023 um 23:52 schrieb Reino Wijnsma:
> Hello Michael,
>
> On 2023-01-22T18:50:20+0100, Michael Koch <astroelectronic at t-online.de> wrote:
>> This command line works with asendcmd and astreamselect:
>>
>> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 astreamselect map 1",asendcmd="6 astreamselect map 0",astreamselect=map=0 -y out.wav
>>
>>
>> However with amix filter I have no idea what's the syntax for the string inside the string. It doesn't work.
>>
>> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 amix weights '0 1'",amix=weights='1 0' -y out.wav
> You've got your quotes all wrong. Always surround the complete filter-chain with double quotes and use single quotes for the individual filters.
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi "asendcmd='4 astreamselect map 1',asendcmd='6 astreamselect map 0',astreamselect=map=0" -y out.wav
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi "asendcmd='4 amix weights '\\\'0 1\\\',amix=weights='1 0'" -y out.wav

Thank you!

Michael



More information about the ffmpeg-user mailing list