streamrip/README.md

190 lines
6.1 KiB
Markdown
Raw Permalink Normal View History

2023-12-23 02:09:40 +01:00
![streamrip logo](https://github.com/nathom/streamrip/blob/dev/demo/logo.svg?raw=true)
2021-03-25 19:19:12 +01:00
2021-09-17 03:25:49 +02:00
[![Downloads](https://pepy.tech/badge/streamrip)](https://pepy.tech/project/streamrip)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
2021-03-25 19:19:12 +01:00
2021-04-06 06:09:51 +02:00
A scriptable stream downloader for Qobuz, Tidal, Deezer and SoundCloud.
2021-03-25 19:19:12 +01:00
2023-12-23 02:09:40 +01:00
![downloading an album](https://github.com/nathom/streamrip/blob/dev/demo/download_album.png?raw=true)
2021-04-14 02:00:00 +02:00
2021-03-29 23:08:26 +02:00
## Features
2021-03-25 19:19:12 +01:00
2023-12-23 02:00:29 +01:00
- Fast, concurrent downloads powered by `aiohttp`
2021-04-06 06:09:51 +02:00
- Downloads tracks, albums, playlists, discographies, and labels from Qobuz, Tidal, Deezer, and SoundCloud
2021-04-21 18:40:33 +02:00
- Supports downloads of Spotify and Apple Music playlists through [last.fm](https://www.last.fm)
2021-03-29 23:08:26 +02:00
- Automatically converts files to a preferred format
- Has a database that stores the downloaded tracks' IDs so that repeats are avoided
2023-12-23 02:00:29 +01:00
- Concurrency and rate limiting
- Interactive search for all sources
- Highly customizable through the config file
2021-05-04 00:44:25 +02:00
- Integration with `youtube-dl`
2021-03-25 19:19:12 +01:00
## Installation
2023-12-23 02:00:29 +01:00
First, ensure [Python](https://www.python.org/downloads/) (version 3.10 or greater) and [pip](https://pip.pypa.io/en/stable/installing/) are installed. Then install `ffmpeg`. You may choose not to install this, but some functionality will be limited.
2021-03-30 19:19:14 +02:00
```bash
pip3 install streamrip --upgrade
2021-03-30 19:19:14 +02:00
```
2021-07-31 04:11:53 +02:00
When you type
```bash
rip
```
2024-02-29 21:20:33 +01:00
it should show the main help page. If you have no idea what these mean, or are having other issues installing, check out the [detailed installation instructions](https://github.com/nathom/streamrip/wiki#detailed-installation-instructions).
For Arch Linux users, an AUR package exists. Make sure to install required packages from the AUR before using `makepkg` or use an AUR helper to automatically resolve them.
```
git clone https://aur.archlinux.org/streamrip.git
cd streamrip
makepkg -si
```
or
```
paru -S streamrip
```
2021-07-31 04:11:53 +02:00
2021-03-30 19:19:14 +02:00
2021-10-20 04:10:27 +02:00
### Streamrip beta
If you want to get access to the latest and greatest features without waiting for a new release, install
from the `dev` branch with the following command
```bash
pip3 install git+https://github.com/nathom/streamrip.git@dev
```
2021-03-25 19:19:12 +01:00
2021-03-29 23:08:26 +02:00
## Example Usage
2021-03-25 19:19:12 +01:00
**For Tidal and Qobuz, you NEED a premium subscription.**
Download an album from Qobuz
```bash
2021-07-31 04:11:53 +02:00
rip url https://www.qobuz.com/us-en/album/rumours-fleetwood-mac/0603497941032
2021-03-25 19:19:12 +01:00
```
Download multiple albums from Qobuz
2021-07-31 04:11:53 +02:00
```bash
2021-07-31 04:11:53 +02:00
rip url https://www.qobuz.com/us-en/album/back-in-black-ac-dc/0886444889841 https://www.qobuz.com/us-en/album/blue-train-john-coltrane/0060253764852
```
2021-07-31 04:11:53 +02:00
2021-03-30 19:32:44 +02:00
2021-03-25 19:19:12 +01:00
Download the album and convert it to `mp3`
```bash
2024-05-01 19:07:36 +02:00
rip url --codec=MP3 https://open.qobuz.com/album/0060253780968
2021-03-25 19:19:12 +01:00
```
2021-03-29 23:11:58 +02:00
2021-07-31 04:11:53 +02:00
To set the maximum quality, use the `--max-quality` option to `0, 1, 2, 3, 4`:
2021-03-29 21:12:50 +02:00
2021-04-06 06:09:51 +02:00
| Quality ID | Audio Quality | Available Sources |
| ---------- | --------------------- | -------------------------------------------- |
| 0 | 128 kbps MP3 or AAC | Deezer, Tidal, SoundCloud (most of the time) |
| 1 | 320 kbps MP3 or AAC | Deezer, Tidal, Qobuz, SoundCloud (rarely) |
| 2 | 16 bit, 44.1 kHz (CD) | Deezer, Tidal, Qobuz, SoundCloud (rarely) |
| 3 | 24 bit, ≤ 96 kHz | Tidal (MQA), Qobuz, SoundCloud (rarely) |
| 4 | 24 bit, ≤ 192 kHz | Qobuz |
2021-03-29 21:12:50 +02:00
2021-03-29 23:11:58 +02:00
2021-03-29 21:12:50 +02:00
```bash
2024-05-01 19:07:36 +02:00
rip url --max-quality=3 https://tidal.com/browse/album/147569387
2021-03-29 21:12:50 +02:00
```
2023-12-23 02:00:29 +01:00
> Using `4` is generally a waste of space. It is impossible for humans to perceive the between sampling rates higher than 44.1 kHz. It may be useful if you're processing/slowing down the audio.
2021-04-06 06:09:51 +02:00
Search for albums matching `lil uzi vert` on SoundCloud
2021-03-25 19:19:12 +01:00
```bash
2023-12-23 02:09:40 +01:00
rip search tidal playlist 'rap'
2021-03-25 19:19:12 +01:00
```
2023-12-23 02:09:40 +01:00
![streamrip interactive search](https://github.com/nathom/streamrip/blob/dev/demo/playlist_search.png?raw=true)
2021-03-25 19:19:12 +01:00
2021-07-31 04:11:53 +02:00
Search for *Rumours* on Tidal, and download it
2021-03-25 19:19:12 +01:00
```bash
2023-12-23 02:00:29 +01:00
rip search tidal album 'fleetwood mac rumours'
2021-03-25 19:19:12 +01:00
```
2021-07-31 04:11:53 +02:00
Download a last.fm playlist using the lastfm command
2021-03-25 19:19:12 +01:00
2021-07-31 04:11:53 +02:00
```
rip lastfm https://www.last.fm/user/nathan3895/playlists/12126195
```
2021-03-25 19:19:12 +01:00
2023-12-23 02:00:29 +01:00
For more customization, see the config file
2021-03-25 19:19:12 +01:00
2021-07-31 04:11:53 +02:00
```
2023-12-23 02:00:29 +01:00
rip config open
2021-07-31 04:11:53 +02:00
```
2023-12-23 02:00:29 +01:00
If you're confused about anything, see the help pages. The main help pages can be accessed by typing `rip` by itself in the command line. The help pages for each command can be accessed with the `-help` flag. For example, to see the help page for the `url` command, type
2021-07-31 04:11:53 +02:00
```
2023-12-23 02:00:29 +01:00
rip url --help
2021-03-25 19:19:12 +01:00
```
2021-07-31 04:11:53 +02:00
![example_help_page.png](https://github.com/nathom/streamrip/blob/dev/demo/example_help_page.png?raw=true)
2021-03-29 23:11:58 +02:00
2021-05-14 07:52:34 +02:00
## Other information
2021-03-25 19:19:12 +01:00
2021-07-31 04:11:53 +02:00
For more in-depth information about `streamrip`, see the help pages and the [wiki](https://github.com/nathom/streamrip/wiki/).
2021-04-06 06:54:21 +02:00
## Contributions
2021-04-14 20:49:45 +02:00
All contributions are appreciated! You can help out the project by opening an issue
or by submitting code.
2021-07-12 17:21:33 +02:00
### Issues
2021-04-14 20:49:45 +02:00
2021-07-12 17:21:33 +02:00
If you're opening an issue **use the Feature Request or Bug Report templates properly**. This ensures
that I have all of the information necessary to debug the issue. If you do not follow the templates,
**I will silently close the issue** and you'll have to deal with it yourself.
2021-04-14 20:49:45 +02:00
2021-07-12 17:21:33 +02:00
### Code
2021-04-14 20:49:45 +02:00
If you're new to Git, follow these steps to open your first Pull Request (PR):
2021-04-06 06:54:21 +02:00
- Fork this repository
- Clone the new repository
- Commit your changes
- Open a pull request to the `dev` branch
Please document any functions or obscure lines of code.
2021-03-25 19:19:12 +01:00
2021-08-10 08:00:30 +02:00
### The Wiki
To help out `streamrip` users that may be having trouble, consider contributing some information to the wiki.
Nothing is too obvious and everything is appreciated.
2021-03-29 23:19:23 +02:00
## Acknowledgements
Thanks to Vitiko98, Sorrow446, and DashLt for their contributions to this project, and the previous projects that made this one possible.
`streamrip` was inspired by:
- [qobuz-dl](https://github.com/vitiko98/qobuz-dl)
- [Qo-DL Reborn](https://github.com/badumbass/Qo-DL-Reborn)
2021-03-29 23:23:22 +02:00
- [Tidal-Media-Downloader](https://github.com/yaronzz/Tidal-Media-Downloader)
2021-04-06 06:09:51 +02:00
- [scdl](https://github.com/flyingrub/scdl)
2021-03-29 23:23:22 +02:00
## Disclaimer
2023-12-23 02:09:40 +01:00
I will not be responsible for how **you** use `streamrip`. By using `streamrip`, you agree to the terms and conditions of the Qobuz, Tidal, and Deezer APIs.
2021-03-29 23:23:22 +02:00
2023-12-23 02:09:40 +01:00
## Sponsorship
2022-01-16 17:56:19 +01:00
2023-12-23 02:09:40 +01:00
Consider becoming a Github sponsor for me if you enjoy my open source software.