Sidechaining is an audio technique consistent in making an audio signal (the control signal) impact how another is processed. One common application of this is sidechain compression, which allows the level of one audio track to trigger a volume reduction on another.
This plugin for DaVinci Resolve brings this concept to the video domain. Specifically, it enables using perceptual lightness measurements of a region of interest in a video to impact how one or more audio tracks are processed in a synchronized manner.
- DaVinci Resolve Studio. Tested on version 20.
- Python 3 with the
numpypackage. Tested on Python 3.10.12 with numpy 1.24.2.
- Combine the Fuses and Scripts directories with the ones in your DaVinci Resolve extensions folder (tutorials here and here)
- Restart DaVinci Resolve afterwards so that it makes them available.
The overall process can be summarized as follows:
- Pass along the video region of interest to an
AverageLightnesstool in Fusion. - Run a provided Fusion script to produce per-frame lightness data.
- Convert lightness data to an audio control signal.
- Import the generated audio clip into the Resolve timeline and sync it with the original video on its own muted audio track.
- In Fairlight, use the created track as the sidechain control signal on effects / plugins that support it to impact how other tracks / buses are processed.
A more step-by-step explanation of this process, specifically to implement lightness-based sidechain compression using the tools provided here:
- Open the relevant clip in the Fusion page of DaVinci Resolve.
- Select the tool producing the video to analyze (e.g.
MediaOut). - Right click on it and run
Script ⮞ Video Sidechain ⮞ 1 ROIto create helper tools designed to speed up the process of providing a region of interest. - Adjust the created mask and make any changes / replace the associated with tracking information so that the new merge tool only contains the visual information of interest. Non relevant regions of the image must be transparent.
- If the video is not in Rec. 709 color space, add a color space transform tool
to make it so before the
AverageLightnesstool. - You can optionally introduce a crop tool before the created
AverageLightnessto improve the performance of the next step if the mask is known to be constrained to a section of the image. - Right click on the created
AverageLightnesstool, runScript ⮞ Video Sidechain ⮞ 2 Export, choose an output path and export. - Run
python3 video_sidechain.py path/to/export.json control.wav. - Import the generated .wav file back into DaVinci Resolve, align it with the video clip on an unused audio track and group them to help keeping them in sync.
- Mute the audio track with the generated audio clip.
- Open the Fairlight page.
- Select the track or bus you want to trigger based on the new control track and open its "Dynamics" track effect.
- Activate the compressor, select the new muted control track in the Sidechain section and turn the sidechain on.
- Set Ratio=Max; Knee=0; Mix=0; Attack=Min; Hold=0; Release=Min. This makes the response immediate.
- Adjust the compresson threshold and Make Up to tweak its volume when "off" and when "on".
- Tweak compression settings as needed to adjust the intensity and the effect response.
That setup will make high lightness values make the controlled track to lower in
volume. Other behaviors can be achieved by transforming the input to the
AverageLightness tool so that brighter values represent other features of the
video.
The [video_sidechain.py] script has options to tweak its output, which can be
queried with the -h option. Use the --sample-rate option to change the audio
format to match your needs. The --normalize option maximizes the difference
between low and high volume, to increase the effect.
This tool is shared under the GPLv3 license: link.