Last active
April 14, 2024 22:29
-
-
Save milleniumbug/6aae4cc5b77303d73be07cc74923fa6f to your computer and use it in GitHub Desktop.
download video from YouTube, extract music and normalize volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string]$url | |
) | |
yt-dlp ` | |
$url ` | |
--quiet ` | |
--extract-audio ` | |
--audio-format mp3 ` | |
--audio-quality 3 ` | |
--embed-thumbnail ` | |
--embed-metadata ` | |
--exec 'mp3gain -q -r -c "{}"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yt-dlp \ | |
--quiet \ | |
--extract-audio \ | |
--audio-format mp3 \ | |
--audio-quality 3 \ | |
--embed-thumbnail \ | |
--embed-metadata \ | |
"$@" \ | |
--exec 'mp3gain -q -r -c {} > /dev/null && echo {}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI
mp3gain
is no longer available in repositories, does not compile and has been replaced withr128gain
.mp3gain
is based on ReplayGain 1.0 specification.Improved script: https://gist.github.com/madjoe/b981fa7f3f81089a37257e366c1ef581