a self-hostable web-ui apple music downloader widevine decryptor with questionable legality https://amdl.reidlab.pink
Find a file
2025-07-09 14:10:08 -07:00
docs remove unnecessary screenshots 2025-05-14 01:12:31 -07:00
public playlist endpoint 2025-05-19 23:49:13 -07:00
src kill the codec enums 2025-07-09 14:10:08 -07:00
views nix package fixed--git rev in footer gone 2025-05-14 01:06:48 -07:00
.editorconfig ini𝖔 𝕞𝐚𝔢 b𝖁𝖘𝖋𝖗𝖆𝕊t commit 2025-04-18 02:12:33 -07:00
.env.example nix package fixed--git rev in footer gone 2025-05-14 01:06:48 -07:00
.gitignore ini𝖔 𝕞𝐚𝔢 b𝖁𝖘𝖋𝖗𝖆𝕊t commit 2025-04-18 02:12:33 -07:00
config.example.toml it mostly works! 2025-05-12 23:33:52 -07:00
eslint.config.mjs it mostly works! 2025-05-12 23:33:52 -07:00
flake.lock nix module! 2025-05-19 18:43:47 -07:00
flake.nix nix module! 2025-05-19 18:43:47 -07:00
LICENSE codecત્યpl 2025-04-28 20:49:03 -07:00
package-lock.json nix package fixed--git rev in footer gone 2025-05-14 01:06:48 -07:00
package.json nix package fixed--git rev in footer gone 2025-05-14 01:06:48 -07:00
README.md playlist endpoint 2025-05-19 23:49:13 -07:00
tsconfig.json it mostly works! 2025-05-12 23:33:52 -07:00

amdl

banner

a self-hostable web-ui apple music downloader widevine decryptor with questionable legality

thank you to gamdl for inspiring this project. i don't like python and i wanted a web front end

setup

.env

MEDIA_USER_TOKEN and ITUA are both from your apple music cookies

WIDEVINE_CLIENT_ID is uhm owie. this thing kind of Sucks to obtain and i would totally recommend finding a not-so-legal spot you can obtain this from (in fact, i found one on github LOL), rather than extracting it yourself. if you want to do through the pain like i did, check this guide out!! once you have your client_id.bin file, convert it to base64 and slap it in the env var (cat client_id.bin | base64 -w 0)

WIDEVINE_PRIVATE_KEY is essentially the same process of obtainment, you'll get it from the same guide!! i'm not sure how to easily find one of these on the web, but i'm sure you end users (user count: 0 (robert downey jr. true image)) can pull through. this is also in base64 (cat private_key.pem | base64 -w 0)

PUBLIC_DIR and VIEWS_DIR should typically not need to be set by the user if using this repository as the working directory. blank values will result in simply views and public being grabbed from the cwd, which also so happens to be the default in .env.example. set this manually to your own value if you get full runtime errors when accessing pages relating to templates being missing, assets having unexpected 404 issues, etc. this value is also recommended for packagers, to prevent the users having to copy over views and public--see how the nix build works!

config

most of the config is talked on in config.example.toml, just copy it over to config.toml and go wild! if you don't it will automatically be copied over on your first run. (at least if you're in the same directory as the repository) i tried to make the error reporting for invalid configurations pretty good and digestable

running

regular

after configuring, it's just as easy as running npm run build and running the dist/index.js file with your javascript engine of choice

nix

a system module is provided for your convenience, and the main output is nixosModules.default

after importing this module, the option services.amdl will show up, which is documented in flake.nix somewhat well. everything under the config tree follows the config.toml well, along with everything under the env tree. defaults are provided for everything that isn't the ITUA inside of the env section. make sure to set those!!

limitations / the formats

currently you can only get basic widevine ones, everything related to playready and fairplay encryption methods are not supported, sorry!! someday i will get this working, at least for playready. it's just that no one has written a library yet but has for python (yuck!!) lossless audio is unfortunately out of the question currently. it will be a while till someone breaks fairplay drm

guaranteed formats to work include:

  • aac-legacy
  • aac-he-legacy

screenshots

search screen