Download music from YouTube playlists, videos with chapters, or just single videos. Spotify support coming soon.
Download and install yt-dlp.
Make sure you have grep installed.
- Download this script and place it in your music directory.
- Run it according to your operating system below.
- Enter the name of the directory you want the downloaded music to go in.
- Enter the link to the playlist or video.
- Answer Y/N if the video has chapter marks or not.
- Sit back and relax while it downloads.
Note
Instead of running the script and answering the questions one-by-one, you can instead run the script with three parameters enclosed in quotes.
/e/MUSIC
$ ./cmd.sh -h
First parameter is the directory to download in.
Second parameter is the link to download from.
Third parameter is a y/n for if there are chapters in the video/music.
Run the command with no parameters and it will walk you through
The command automatically detects if it is a playlist btw
/e/MUSIC
$ ./cmd.sh "Decalius - A Miserable Life" "https://www.youtube.com/watch?v=DEuhdR9Cf_E" n
mkdir: created directory 'Decalius - A Miserable Life'
...
/e/MUSIC
$
/e/MUSIC
$ ./cmd.sh
Enter directory to download in:
$ Rick Astley - Never Gonna Give You Up
Enter link to download from (preferably a playlist)
$ https://www.youtube.com/watch?v=dQw4w9WgXcQ
Are there chapters (y/N)?
...
/e/MUSIC
$
/e/MUSIC
$ ./cmd.sh
Enter directory to download in:
$ good songs
mkdir: created directory 'good songs'
Enter link to download from (preferably a playlist):
$ https://www.youtube.com/watch?v=afpzKq0CqoI&list=PLjSER-WmwVtlfXh3rqwRP0lw5yaJUMt-d
Are there chapters (y/N)?
...
/e/MUSIC
$
/e/MUSIC
$ ./cmd.sh
Enter directory to download in:
$ How to Disappear Completely - The Quietus (2024) - Full Album
mkdir: created directory 'How to Disappear Completely - The Quietus (2024) - Full Album'
Enter link to download from (preferably a playlist):
$ https://www.youtube.com/watch?v=-H1AbSWuesU
Are there chapters (y/N)? y
...
/e/MUSIC
$
E:\MUSIC\.
| cmd.sh
| cmd_win.sh
|
+---ambient and chill
+---Ambient Post Rock
+---basedworldbillionare
+---Earth 2 - Special Low Frequency Version (Full Album)
+---Extreme DSBM
+---How to Disappear Completely - Seraphim (2019)
+---itsover
+---madlove
+---monolith III - xenolith - full album (dark ambient)
+---Rock Mix
+---Sparklehorse Mix
+---The Drone Zone - Series One
+---The Drone Zone - Series Two
+---The Interloper Original Soundtrack - Volume 1
\---Tycho - The Science of Patterns
Download the script cmd.sh into your music directory and run it using your favourite terminal emulator.
Use -h or --help for help using the script.
Download the script cmd_win.sh into your music directory and run it with one of the following:
- Git Bash (comes with installing Git on Windows)
- Cygwin
- MSYS2
- Windows Subsystem for Linux (WSL)
Use -h or --help for help using the script.
A native batch script is on the backburner while I figure out Spotify.
If you are using an Android phone, I recommend using Termux as a terminal emulator.
You can get Termux here on F-Droid or here on GitHub.
After that, follow this guide for getting Termux all set up and yt-dlp installed.
Using the script is the same process on Linux/MacOS.