Tuesday 12 March 2019

audio - FFmpeg sidechaincompress give more importance to the sidechain


Have two audio tracks—one to be used as background and other as main audio—and I want to compress and mix the background audio to the main.


I tried using the sidechaincompress filter but in the output the main audio volume is very low.



Answer



Based on the comments, sounds like the default settings of the sidechaincompress filter don't filter the background music enough.


Try


ffmpeg -i background.mp3 -i audio.mp3 \
-filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg]; \
[bg][mix]amerge[fin‌​al]"
-map [final] final.mp3

There are two variables I've added.


threshold specifies how loud the main audio has to be before the sidechain compressor alters the music track's volume. If the volume of the main track is low to begin with, this value may need to be reduced.


ratio determines how much the background audio is reduced. Default value is 2, and min,max is 1,20


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...