Volume normalization
From MythTV Official Wiki
This page describes some methods to enable volume normalization on the fly, i.e., dynamic range compression.
Contents
Pulse Audio
This method will use the alsa LADSPA plugin named dyson compress to compress the range of the audio.
configure pulse audio
first you need to determine the name of the output to normalize:
pacmd list-sinks | grep -A 1 index
my result:
index: 0 name: <alsa_output.pci-0000_01_05.1.hdmi-stereo> -- * index: 1 name: <alsa_output.pci-0000_03_06.0.analog-stereo>
I am using the analog device (index 1)
Next you need to edit your default.pa file
sudo nano /etc/pulse/default.pa
and add the following lines
### custom sink for DRC .ifexists module-ladspa-sink.so .nofail load-module module-ladspa-sink sink_name=ladspa master=alsa_output.pci-0000_03_06.0.analog-stereo plugin=dyson_compress_1403 label=dysonCompress control=0,1,0.5,0.99 .fail .endif
The last options on the control flag:
control=0,1,0.5,0.99
set the Peak limit (in dB), Release time, Fast compression ratio, and Compression ratio, respectively.
restart pulse audio
pulseaudio -k pulseaudio -D
setup as default sink
pacmd list-sinks | grep -A 1 index
my result:
index: 0 name: <alsa_output.pci-0000_01_05.1.hdmi-stereo> -- * index: 1 name: <alsa_output.pci-0000_03_06.0.analog-stereo> -- index: 2 name: <ladspa>
edit file
sudo nano /etc/pulse/default.pa
set-default-sink 2
restart pulse again, and the asterisk should have move to index 2, our ladspa filtered volume:
index: 0 name: <alsa_output.pci-0000_01_05.1.hdmi-stereo> -- index: 1 name: <alsa_output.pci-0000_03_06.0.analog-stereo> -- * index: 2 name: <ladspa>