Skip to content
Stensel8Public
forked from nathom/streamrip
 
 

Repository files navigation

streamrip logo

CI Latest release Python 3.15 Image size Image vulnerabilities Mirror: github.com Mirror: opencommit.eu Mirror: codetrunk.eu

Keep the music you pay for. Take your playlists with you.

streamrip downloads from Qobuz, Tidal, Deezer, SoundCloud and Spotify, and moves your playlists between Spotify, Tidal and CSV. From the command line or in your browser.

Important

GitHub has taken repositories down before, so streamrip lives in three places. Bookmark them:

Note

This is a fork of nathom/streamrip that I keep working and up to date (what changed). It needs the latest stable Python. Streaming services change their APIs without warning, so things do break now and then. Issues and pull requests go to opencommit.eu: the other two are copies.

Caution

pip install streamrip, the AUR package and brew install streamrip all install upstream streamrip, which doesn't run on Python 3.15.

downloading an album from Qobuz

  • Download tracks, albums, playlists, discographies and labels, and your liked tracks and albums on Tidal and Deezer. Spotify links (details), CSV lists (details) and last.fm playlists work too.
  • Search any source from the terminal and pick what you want.
  • Files come with tags, cover art and lyrics, and can be converted to FLAC, ALAC, AIFF, MP3, AAC, OGG or Opus.
  • streamrip remembers what it downloaded, and streamrip repair retries whatever failed.
  • Move your liked songs and playlists between Spotify and Tidal, export them to CSV and back, or download them from another source, like a Spotify playlist in lossless from Qobuz (details).
  • streamrip web does all of this in your browser, logins and settings included (details).

Why streamrip exists

Most of us pay for music every month and own none of it. Stop paying and the library is gone. Albums disappear from the catalogue and from your playlists, and "offline" downloads only play inside the app. A subscription of about €11 a month costs some €130 a year, the price of seven or eight CDs. After ten years you'd have a shelf full of CDs. With a subscription you have nothing.

Many services, Qobuz among them, also sell single tracks and albums. If you bought an album, it's all the more reasonable to want the files.

streamrip turns what you pay for, by subscription or purchase, into files on your own disk, in the best quality the service has, properly tagged and yours to keep.

You're also never stuck with one service. The files are FLAC, M4A or MP3 with standard tags and the lists are CSV, so they work in any player, on a NAS, in Jellyfin or Plex, in the car, and twenty years from now. streamrip playlist moves your playlists from Spotify to Tidal and back, to CSV or onto your disk. If a service raises its prices or drops your favourite album, take your music and playlists elsewhere. In the EU that's even your right (GDPR article 20).

Tools like Soundiiz and TuneMyMusic only move the lists and leave the music behind. They're closed source, need access to your accounts and often charge once you have more than a few playlists. streamrip is free software (AGPL-3.0) that runs on your own computer.

It's the idea behind Stop Killing Games and Louis Rossmann's FULU Foundation: if you paid for it, you should get to keep it. So use streamrip for music you pay for, and support the artists you like by buying their records and going to their shows. See the Disclaimer.

Streaming services change their APIs, logins and rules without warning, and every change can break streamrip. That's why I keep this fork going.

Install

With Python

Download Source code (ZIP) from the latest release on GitHub and unpack it, or run git clone https://opencommit.eu/Stensel8/streamrip. Then run the installer in that folder:

./install.sh                                              # Linux, macOS
powershell -ExecutionPolicy Bypass -File .\install.ps1    # Windows

It uses uv to put streamrip and ffmpeg in a .venv in that folder, and installs Python 3.15 if you don't have it. Start streamrip with .venv/bin/streamrip (Windows: .venv\Scripts\streamrip.exe), or activate the venv and type streamrip.

With a wheel

If you already have uv, download the .whl from the latest release and run:

uv tool install ./streamrip-*.whl

uv fetches Python 3.15 if you need it. The wheel has everything in it: the web interface, the automatic login browser and a bundled ffmpeg.

With Podman or Docker

The image has everything built in, ffmpeg included, and runs on amd64 and arm64:

mkdir -p streamrip
podman run --rm -it -v ./streamrip:/data -v ~/Music:/data/Music \
  opencommit.eu/stensel8/streamrip url <link>

Downloads go to ~/Music, and config and databases to ./streamrip. The image is also on ghcr.io/stensel8/streamrip. For Docker, SELinux and more, see docs/container.md.

With Nix

nix run . -- url <link>      # x86_64 Linux, from this checkout

More in docs/nix.md.

Uninstall

./uninstall.sh (or .\uninstall.ps1 on Windows) removes streamrip and what it keeps: its config, logins, databases and Spotify's client. Your music stays.

Use

streamrip url https://tidal.com/browse/album/234793           # an album, artist, playlist or track
streamrip url <link> <link>                                     # several at once
streamrip file urls.txt                                         # the links in a file, one per line
streamrip url <link> --preview                                  # what it would do, without downloading
streamrip id tidal album 234793                                 # by source, type and ID
streamrip search tidal album 'linkin park meteora'              # search and pick
streamrip search --first tidal track 'linkin park in the end'   # search and take the first result
streamrip csv linkin-park.csv                                   # a CSV list of tracks
streamrip lastfm https://www.last.fm/user/nathan3895/playlists/12126195
streamrip --codec mp3 url <link>                                # convert while downloading
streamrip --quality 2 url <link>                                # CD quality at most
streamrip repair                                                # retry what failed
streamrip config open                                           # every option, explained
streamrip web                                                   # all of it in your browser
streamrip web --background                                      # the same, with the terminal free
streamrip web --log                                             # what it does, as it does it
streamrip web --stop                                            # stop it

And for playlists (details):

streamrip playlist transfer spotify tidal --liked               # liked songs, Spotify to Tidal
streamrip playlist download spotify --playlist "Road trip" --source qobuz   # in lossless
streamrip playlist export spotify --all -o backup/              # every list as CSV
streamrip playlist import tidal list.csv --playlist "From CSV"  # a CSV into a playlist

Links from Qobuz, Deezer, SoundCloud and Spotify work the same way. So do links to your likes, like https://listen.tidal.com/my-collection/tracks (or /albums), https://play.qobuz.com/user/library/favorites/tracks (or /albums) and a Deezer profile's /loved or /albums, and Tidal mixes (https://tidal.com/mix/…). A YouTube link (a video, a playlist or an album) is looked for on the [lastfm] sources first, and comes from YouTube itself where none has it. Every command has --help.

streamrip asks each source for its best quality and steps down when a track isn't available in it. --quality sets the highest it asks for:

Quality Audio Sources
0 128 kbps MP3 (Deezer), 256 kbps AAC (Tidal) Deezer, Tidal
1 320 kbps MP3 or AAC Deezer, Tidal, Qobuz
2 16 bit, 44.1 kHz (CD) Deezer, Tidal, Qobuz
3 24 bit, ≤ 96 kHz (Qobuz), ≤ 192 kHz (Tidal) Tidal, Qobuz
4 24 bit, ≤ 192 kHz Qobuz

The defaults are the highest quality there is. To go lower, convert after downloading ([conversion] in the config). Spotify has no levels: it comes at the account's quality.

searching Deezer and Qobuz, with the cover and details of each result

The search menu shows the cover of each result. Terminals that can display images show the real thing: Ghostty, Kitty, WezTerm, Konsole and foot on Linux, Windows Terminal, iTerm2 on macOS, and VS Code with terminal.integrated.enableImages. Other terminals get colored blocks. This also works in the container and over SSH.

Logging in

streamrip asks for what it needs the first time you use a source and saves it in the config. If a login stops working, it asks again.

Source What you need
Qobuz A subscription, or albums you bought. Log in on Qobuz's own login page, through an isolated browser window, your own browser, or by hand.
Tidal A subscription. You log in with a link on any device (twice for hi-res).
Deezer The arl cookie of a logged-in session, from an isolated browser window or by hand.
SoundCloud Nothing: it works as a guest. A login (the oauth_token cookie) gives better quality and higher limits.
Spotify A Spotify app of your own (streamrip login spotify explains how), and Premium on the account that owns it. With a Soloist API key the audio is Spotify's own, at the account's quality, and a track takes about as long as it lasts. Without one, or where that does not work, it is a match on YouTube Music (AAC, or MP3). The playlist tools use the same login.

For your Tidal playlists, the playlist tools also need a Tidal developer app (how). More per source in Logging in and Spotify. You can also do all of this on the Accounts page of streamrip web.

More

  • Playlists: transfer, export, import and download your playlists and liked songs
  • Web interface: what it does, and why it should only run on your own machine
  • Spotify: how to log in, what works, and where the audio comes from
  • CSV lists: download a list from streamrip, Exportify or a spreadsheet
  • Lyrics: where they come from and how to turn the lookup off
  • Podman and Docker: the image, its volumes and building it yourself
  • Nix: the flake and its development shell

Contributing

Report problems in the issue tracker on opencommit.eu.

For code, uv sync sets everything up. Make sure uv run pytest and uv run ruff check . && uv run ruff format . pass before you open a pull request against dev on opencommit.eu. Tests that need a real browser are skipped when there isn't one. CI skips the login and session tests. checks/ lets you run those yourself, along with the real-account checks and everything CI does.

Acknowledgements

streamrip was written by nathom (consider sponsoring nathom). Thanks to all the contributors, upstream and in this fork. The fixes from upstream are credited in CHANGELOG.md.

streamrip was inspired by rip, qobuz-dl, Qo-DL Reborn, Tidal-Media-Downloader and scdl. Lyrics come from LRCLIB. The Spotify support borrows from three projects (credits). The playlist tools grew out of csv2tidal by Nugman and borrow from spotify_to_tidal (credits).

License

streamrip is free software under the GNU Affero General Public License, version 3 only (AGPL-3.0-only). It grew out of two projects:

  • streamrip by nathom and its contributors, under the GNU General Public License, version 3 only. The code that comes from there stays available under that licence as well.
  • csv2tidal by Nugman, under the AGPL-3.0. The playlist tools (streamrip/sync, streamrip playlist) grew out of it, and the web interface with them.

Section 13 of both licences allows combining a work under one with a work under the other and conveying the result as one. streamrip is conveyed under the AGPL-3.0, whose section 13 (offering the source to everyone who uses it over a network, which streamrip web makes possible) applies to the whole. Every part keeps the licence it came with. LICENSE holds both texts, unchanged copies of those of the Free Software Foundation, as their own terms require.

Copyright © nathom and the contributors of streamrip; Stensel8 and the contributors of this fork, its playlist tools included; Nugman and the contributors of csv2tidal.

Disclaimer

I work on streamrip out of goodwill and share it for free. It comes as is, without any warranty (see the licence).

By using streamrip, you confirm that you know what you're doing and accept responsibility for it. You agree to the terms and conditions of the Qobuz, Tidal, Deezer and Spotify APIs, and of YouTube Music, for the Spotify tracks whose audio it serves. Only download music you've paid for or are otherwise allowed to keep. I'm not responsible for how you use streamrip.

Releases

Packages

Used by

Contributors

Languages