A tool for downloading songs from music streaming services like Spotify and Apple Music.
A tool for downloading songs from music streaming services like Spotify and Apple Music.
Depending on the URLs you provide freyr, it will;
title, album, artist, etc.) from the streaming service (Spotify if you provide a Spotify URL)..m4a file extension) at a default bitrate of 320kbps.Here's a list of the metadata that freyr can extract from each streaming service:
| Meta | Spotify | Apple Music | Deezer |
|---|---|---|---|
Title |
✔ | ✔ | ✔ |
Artist |
✔ | ✔ | ✔ |
Composer |
✗ | ✔ | ✔ |
Album |
✔ | ✔ | ✔ |
Genre |
✗ | ✔ | ✔ |
Track Number |
✔ | ✔ | ✔ |
Disk Number |
✔ | ✔ | ✔ |
Release Date |
✔ | ✔ | ✔ |
Rating |
✔ | ✔ | ✔ |
Album Artist |
✔ | ✔ | ✔ |
ISRC |
✔ | ✔ | ✔ |
Label |
✔ | ✔ | ✔ |
Copyright |
✔ | ✔ | ✔ |
Cover Art |
✔ | ✔ | ✔ |
Via Coinbase (BTC, ETH, USDC, LTC, DAI, BCH):
$5 | $10 | $15 | $20Or Directly:
Hey there, you might want to consider a cleaner and straight-forward installation method, without having to manually setup the requirements. If so, checkout the Docker installation method
python >= v3.2Download for your individual platforms here https://www.python.org/downloads/
Linux: (check individual package managers)
sudo apt-get install python3.6sudo pacman -S pythonapt install pythonsudo apk add python3Download for your individual platforms here https://nodejs.org/en/download/
macOS + Linux: nvm recommended.
# install node with this nvm command
# freyr works with a minimum of v16
$ nvm install --ltsapt install nodejssudo apk add nodejsFirst, download the latest release for your individual platforms here https://github.com/miraclx/atomicparsley/releases/latest
Then;
AtomicParsley.exe in your PATH.bins/windows folder of this project directory. Create the folder(s) if they don't exist.AtomicParsley in your PATH.bins/posix folder of this project directory. Create the folder(s) if they don't exist.sudo apt-get install atomicparsleysudo pacman -S atomicparsleyapt install atomicparsleyPlease note that YouTube Music must be available in your region for freyr to successfully work, this is because freyr sources raw audio from YouTube Music.
First start by ensuring all requirements listed above are satisfied. Thereafter, you can use either of these options to install freyr:
NPM: npm install -g freyr
Yarn: yarn global add freyr
git clone https://github.com/miraclx/freyr-js.git freyr
cd freyr| % | NPM | Yarn |
|---|---|---|
| pull dependencies | npm install |
yarn install |
| install globally | npm link |
yarn link |
For convenience, we provide officially prebuilt images (automated builds from this repository) so you can skip the setup and build process and get right into it.
docker run -it --rm -v $PWD:/data freyrcli/freyrjs [options, arguments and queries...]You can also create a handy alias to skip remembering that whole line everytime
alias freyr='docker run -it --rm -v $PWD:/data freyrcli/freyrjs'The
-v $PWD:/datapart sets the working directory for freyr to the current working directory. For example, you can use-v ~/Music/freyr:/datato set the work directory and consequently, default save location to~/Music/freyr.Please ensure the folder on the host already exists, create it if not. Otherwise, docker autocreates the folder as root and that causes unpleasant
Permission Deniedissues when you run freyr.
[See Docker Development]
Usage: freyr [options] [query...]
Usage: freyr [options] [subcommand][See Service Support].
freyr --help
*The get subcommand is implicit and default.
Usage: freyr [options] get [options] [query...]
Usage: freyr [options] [query...]freyr get --help …freyr spotify:track:5FNS5Vj69AhRGJWjhrAd01 … freyr https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443 … freyr https://www.deezer.com/us/artist/14808825 …Queries can be collated to be processed at once.
freyr query1 query2 ... queryNQueries can be batched into a file and loaded all at once with the -i, --input <FILE> flag.
Queries should be on separate lines.
Lines starting with a # are treated as comments and ignored. comments can also be inlined with everything following the # character ignored.
# ./queue.txt
# Hailee Steinfeld
https://open.spotify.com/track/5Gu0PDLN4YJeW75PpBSg9p # (track) Let Me Go
https://open.spotify.com/track/7GCVboEDzfL3NKp1NrAgHR # (track) Wrong Direction
# (album) Rina Sawayama
https://open.spotify.com/album/3stadz88XVpHcXnVYMHc4Jfreyr -i ./queue.txtUse the --help flag to see full usage documentation.
Services can be queried with short URIs containing the type and ID for the resource.
| identifier | type | id | ||
|---|---|---|---|---|
| URI Short Tags | : | track | : | ~ |
| album | ||||
| artist | ||||
| playlist |
Use the urify subcommand to parse betweeen URIs and its equivalent URL representation, and vice-versa.
Creating freyr-compatible queue output.
freyr urify https://open.spotify.com/album/2D23kwwoy2JpZVuJwzE42B --no-header --no-logo --no-tag spotify:album:2D23kwwoy2JpZVuJwzE42B
[+] Urify complete freyr urify -i queue_of_urls.txt -o queue_of_uris.txt --no-header --no-logo [+] Urify complete
Successfully written to [queue_of_uris.txt]FOLDER/<Artist Name>/<Album Name>/<Track Name> (example)Persistent configuration such as authentication keys and their validity period are stored within a session specific configuration file.
This configuration file resides within the user config directory per-platform.
$HOME/.config/FreyrCLI/d3fault.x4p for Linux.$HOME/Library/Preferences/FreyrCLI/d3fault.x4p for macOS.All defaults are defined in the conf.json file at the root of the project. This file should be of JSON format and is to be structured as such.
Do not edit this file directly, instead run freyr once and edit the user specific configuration (see above).
server: <object> The server URL configuration same as on an individual services' callback option.hostname: <string>port: <number>useHttps: <boolean>concurrency: <object>queries: <number> The number of queries to be processed concurrently.tracks: <number> The number of tracks to be actively processed in parallel.trackStage: <number> The number of tracks to concurrently preprocess before being pushed to the main trackQueue.downloader: <number> The number of tracks to be concurrently downloaded in parallel.encoder: <number> The total number of tracks to be concurrently undergo encoding.embedder: <nuNo open issues yet, or sync has not completed.