Skip to content

About

Archive a music library you own, and publish recordings you made to SoundCloud.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

spot2cloud

Spotify lets you take nothing with you. No file, no export, no copy of the library you spent years building. This gets your music onto your own disk, and your own recordings onto SoundCloud in one command. Early days, open source, fork it if you want to add to the project.

IMPORTANT NOTE

Soundcloud uploading might be currently broken because of the soundcloud antibot measures i will look how to solve this and ship the patch soon

CI License: Apache 2.0 Platform Python yt-dlp Playwright Ruff Tests Release Code size Last commit Issues Stars

spot2cloud downloading an album

Paste a link, get a folder of tagged audio with cover art. Re-run it and it skips what it already has.

Quick start

  1. Install ffmpeg: brew install ffmpeg, sudo apt install ffmpeg, or winget install Gyan.FFmpeg. Reopen your terminal afterwards.
  2. Install the tool:
    python3 -m venv .venv && source .venv/bin/activate
    pip install --upgrade pip
    pip install -e .
    The pip upgrade matters: the one bundled with Python 3.9 is too old to do an editable install and fails with a confusing setuptools error.
  3. Run it:
    spot2cloud "https://open.spotify.com/playlist/<id>"

Takes Spotify links and URIs, YouTube links, bare playlist names, or a text file of any of those. No Spotify account or API key needed.

Requirements: Python 3.9+, ffmpeg. For uploading, also playwright install chromium.

the album folder spot2cloud produces

The pipeline

Spotify and YouTube into a tagged album folder, then optionally SoundCloud

The name describes the workflow, not the audio path: a playlist you follow on one service becomes a release on your own profile on the other. Spotify itself hands out no audio, and this tool does not ask it for any.

Nothing here circumvents DRM or an access control, and support for DRM-protected sources is out of scope. That is what separates a lawful tool from a circumvention device under DMCA 1201.

Common flags: -o output dir, -q bitrate, -w workers, --format (mp3/opus/m4a/flac/wav), --split-chapters, --watch. Run spot2cloud --help for the rest.

YouTube's ceiling for music is about 130 kbps opus, so -q 320 adds no fidelity. Use --format opus to copy that stream instead of re-encoding it.

Uploading to SoundCloud

For recordings you own or control. spot2cloud --login opens SoundCloud's real sign-in page; no password ever passes through this tool.

spot2cloud -d "Songs/My Album" --upload --privacy private

Still unproven. SoundCloud's bot detection has blocked Playwright's bundled Chromium during login on my machine, so the page selectors are unvalidated against the live site. --dry-run reports which ones resolve. The reliable route is to be a real browser: start Chrome with --remote-debugging-port=9222 and pass --attach. Note --privacy defaults to public.

a dry run reporting which selectors resolve

Building from source

Requires Python 3.9+.

pip install -e ".[dev]"
python -m unittest discover -s tests -t . -p "test_*.py"
ruff check .

279 tests, about 1.3 seconds, fully offline: no network, no downloads, no browser.

Disclaimer

I am not responsible for what you do with this script, or for your account being suspended, limited or deleted. Automating a browser against soundcloud.com may breach SoundCloud's terms, and downloading from YouTube may breach YouTube's. That is between you and them.

If you do not hold the rights to something, do not download it and do not upload it.

License

Apache 2.0, see LICENSE.

About

Archive a music library you own, and publish recordings you made to SoundCloud.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages