[FFmpeg-user] Replace part of the audio

Paul B Mahol onemda at gmail.com
Mon Jan 23 20:41:44 EET 2023


On 1/22/23, Reino Wijnsma <rwijnsma at xs4all.nl> wrote:
> 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
>
> See: http://ffmpeg.org/ffmpeg-all.html#Quoting-and-escaping and
> http://ffmpeg.org/ffmpeg-all.html#Notes-on-filtergraph-escaping.
>
> On 2023-01-22T19:21:53+0100, Paul B Mahol <onemda at gmail.com> wrote:
>> there is way to escape stuff
>
> Can't you for once make a useful post?!

I love you!


More information about the ffmpeg-user mailing list