←back to thread

1113 points Bluestein | 3 comments | | HN request time: 0.421s | source
1. dither8 ◴[] No.41278307[source]
In my input.conf file I've created filter keyboard shortcuts:

  F1 af toggle "acompressor=ratio=4,loudnorm"
  F2 vf toggle "bwdif"
First one is an alright dynamic range compressor (makes the loud parts quieter and quieter parts loud). Second is a deinterlace at default settings. These are standard ffmpeg filters and mpv let's you turn these on in real time.
replies(2): >>41279835 #>>41280567 #
2. azizLIGHT- ◴[] No.41279835[source]
I amalgamated some audio filters to cycle through on a F1 press

- Loudness Normalization: "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0]"

- Loudness Normalization + Mild Tinnitus Filter: "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0,equalizer=f=6000:width_type=o:w=2:g=-20]"

- Mild Tinnitus Filter: "equalizer=f=6000:width_type=o:w=2:g=-20"

- Aggressive Tinnitus Filter: "equalizer=f=4000:width_type=q:w=1:g=-30,equalizer=f=6000:width_type=q:w=1:g=-30,equalizer=f=8000:width_type=q:w=1:g=-30"

- Bass Reduction: "bass=f=210:g=-17.7"

- Alternative Loudness Normalization: "loudnorm=linear=no"

- Dynamic Audio Normalization: "dynaudnorm=s=0"

- None: ""

F1 cycle-values af "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0]" "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0,equalizer=f=6000:width_type=o:w=2:g=-20]" "equalizer=f=6000:width_type=o:w=2:g=-20" "equalizer=f=4000:width_type=q:w=1:g=-30,equalizer=f=6000:width_type=q:w=1:g=-30,equalizer=f=8000:width_type=q:w=1:g=-30" "bass=f=210:g=-17.7" "loudnorm=linear=no" "dynaudnorm=s=0" ""

https://reddit.com/r/mpv/comments/xf8p9t/movie_volume_compre...

https://pastebin.pl/view/2f48e64c

3. Klover ◴[] No.41280567[source]
Instead of using 2 compressors in tandem, it might be better to set the very good one to your preference:

  F1 af toggle "loudnorm=I=-14:LRA=1:tp=-1:linear=false:dual_mono=true"
The I=-14 is the target 'volume', which makes it as loud as YouTube and Spotify, setting it to -23 will be much quieter, but gives you more dynamic range. LRA=1 goes from 1-50, with 1 being the most compressing which is probably what you want in this case. TP=-1 sets the limiter to -1dB, which is plenty of clipping threshold because loudnorm calls the resampler for 192kHz before working in dynamic mode. Linear=false because we use dynamic mode here and cannot even use linear mode. Dual_mono=true makes -14 as loud for mono as stereo sources.

Since loudnorm adjusts volumes and sets limits for you, you can forego mpv's audio downmixing if your target is stereo and simply put all your channels together before bringing them to loudnorm:

  F1 af toggle "pan=stereo|c0=FC+LFE+FL+BL+SL|c1=FC+LFE+FR+BR+SR,loudnorm=I=-14:LRA=1:tp=-1:linear=false:dual_mono=true"