Last active
November 27, 2024 11:35
-
-
Save chrisedrego/2282625df46c24f34f69f309e74f9438 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Download Youtube Downloader | |
# sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl | |
# sudo chmod a+rx /usr/local/bin/youtube-dl | |
YOUTUBE_PLAYLIST="https://youtube.com/playlist?list=PLqBZS2UWMeUzEzrhL9psrfjm_YicL-OoT" | |
PLAYLIST_NAME="music" | |
mkdir -p ~/$PLAYLIST_NAME && cd ~/$PLAYLIST_NAME | |
youtube-dl --ignore-errors -x -f 'bestaudio[ext=m4a]' --yes-playlist $YOUTUBE_PLAYLIST | |
find . -name '*.m4a' -print0 | while read -d '' -r file; do | |
ffmpeg -i "$file" -n -acodec libmp3lame -ab 128k "${file%.m4a}.mp3" < /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing !!!!