Skip to content

Instantly share code, notes, and snippets.

@bobbicodes
Last active March 20, 2022 08:12
Show Gist options
  • Save bobbicodes/3cbdd20ab6767e746f0e6d0f0af114f0 to your computer and use it in GitHub Desktop.
Save bobbicodes/3cbdd20ab6767e746f0e6d0f0af114f0 to your computer and use it in GitHub Desktop.
Dynamic audio compression with ffmpeg in Powershell
ffmpeg -i 'in.mp4' -af acompressor=threshold=-30dB:ratio=20:makeup=10 -c:v copy out.mp4
@bobbicodes
Copy link
Author

bobbicodes commented Mar 17, 2022

Example with mapping when needing to select specific streams (check info using ffprobe):

ffmpeg -i in.mkv -map 0:0 -map 0:1 -map 0:2 -af acompressor=threshold=-30dB:ratio=20:makeup=10 -c:v copy disco-finale-eng4.mkv

In the above case, the -map 0:0 -map 0:1 -map 0:2 was necessary for the subtitles to be included. I kinda can't watch Star Trek without subtitles.

@bobbicodes
Copy link
Author

Using dynaudnorm:

ffmpeg -i in.mkv -map 0:0 -map 0:1 -map 0:2 -af "dynaudnorm=s=30:m=100:g=15" -c:v copy out.mkv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment