简体   繁体   中英

Adjust volume of both input audio files while concat using ffmpeg

I am using the following command to concatenate(append second wav to end of first wav) two audio files (input can be any audio: mp3,wav etc) into one output.mp3 , and it works fine:

ffmpeg -y -i first.wav -i second.wav -filter_complex "[0:0][1:0]concat=n=2:v=0:a=1[out]" -map "[out]" output.mp3

but how can adjust volume for each of input audios separately so my output.mp3 will have two audio files with different volume that i set? for example i want my output contains volume 0.5 for first audio and volume 1 for second audio.be aware that i don't want mix two audio files , Just concatenate two audio files into output with different volume.

在 concat 之前添加卷过滤器。

ffmpeg -y -i first.wav -i second.wav -filter_complex "[0:0]volume=0.5[a0];[1:0]volume=1.0[a1];[a0][a1]concat=n=2:v=0:a=1[out]" -map "[out]" output.mp3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM