The ultimate solution for DJs to download and organize music from YouTube with Spotify playlist integration, optimized for Pioneer Rekordbox.
Transform your Spotify playlists into a fully organized DJ library with automatic KEY detection (Camelot notation), BPM analysis, and quality filtering - perfect for harmonic mixing!
As a DJ, I faced a critical limitation: Rekordbox doesn't allow editing tracks from Spotify streaming. You can't analyze cue points, loops, or hot cues on Spotify tracks - you need local files.
The problem? Manually downloading hundreds of songs from Spotify playlists was tedious and time-consuming.
The Solution: I discovered two amazing open-source projects:
- spotify-backup by @caseychu - Extract Spotify playlists to JSON
- ytm-dlapi - YouTube Music download concept
I combined and enhanced these tools with:
- β¨ Automatic KEY detection using Essentia (Camelot notation for harmonic mixing)
- π₯ BPM analysis for perfect beatmatching
- π― Quality filtering (removes LIVE versions, UNRELEASED tracks, short clips)
- π Smart organization (by genre, artist, or custom folders)
- π Batch processing for hundreds of songs at once
Now you can build a complete Rekordbox library from your Spotify playlists with full editing capabilities!
- Automatic KEY Detection in Camelot notation (1A-12A, 1B-12B) using Essentia
- BPM Detection for perfect beatmatching
- ID3 Metadata Tagging compatible with Rekordbox
- Lyrics Video Priority - Downloads lyrics videos for cleaner audio (no video SFX)
- Audio Quality Filtering (removes UNRELEASED, LIVE versions)
- Duration Filtering (configurable minimum length, default 1:30)
- Folder-based Organization (HOUSE, POP, Artist folders, etc.)
- Batch Processing of entire Spotify playlists
- Automatic MP3 Conversion from YouTube audio
- CSV to TXT Converter for Exportify playlists
- Windows/WSL Integration for seamless cross-platform usage
- Exportify Support - Export playlists to CSV, convert to song list
- Extract Playlists directly from your Spotify library
- Filter by Genre (HOUSE, POP, or custom categories)
- OAuth Authentication for secure access (optional)
- Backup Your Music Library to JSON format
# Clone the repository
git clone https://github.com/Dixter999/rekordbox-spotify-downloader.git
cd rekordbox-spotify-downloader
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Install system dependencies (Ubuntu/Debian/WSL)
sudo apt update && sudo apt install -y ffmpegπ¦ macOS Installation
brew install ffmpeg python3π¦ Full dependencies for KEY detection (optional)
# Ubuntu/Debian/WSL - for Essentia KEY detection
sudo apt install build-essential libeigen3-dev libfftw3-dev \
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev \
libsamplerate0-dev libtag1-dev libyaml-dev python3-devThis is the easiest method - export your Spotify playlist and download all songs!
- Open Exportify.net in your browser
- Click "Get Started" and log in with your Spotify account
- Find your playlist and click the green "Export" button
- A CSV file will download (e.g.,
My_Playlist.csv)
π Downloads/
βββ My_Playlist.csv β Downloaded from Exportify
Move the CSV file to your project folder and convert it:
# Activate the virtual environment
source venv/bin/activate
# Convert the CSV to a text file
python3 convert_csv_to_txt.py My_Playlist.csvOutput:
β Converted 85 songs from My_Playlist.csv
β Created: My_Playlist.txt
The text file looks like this:
# Converted from My_Playlist.csv
# Total songs: 85
Martin Garrix - Animals
Lost Frequencies - Are You With Me
Avicii - Levels
David Guetta - Titanium
...
Now download all songs to a folder (e.g., HOUSE):
python3 youtube_to_rekordbox_enhanced.py My_Playlist.txt --output rekordbox_music/HOUSE --prefer-lyricsExample Output:
βββββββββββββββββββββββββββββββββββββββββββββββ
YouTube to Rekordbox MP3 Downloader Enhanced
βββββββββββββββββββββββββββββββββββββββββββββββ
Total songs: 85
Output directory: /home/user/rekordbox_music/HOUSE
Duration filter: 1:30 - 10:00
Prefer lyrics: Yes
βββββββββββββββββββββββββββββββββββββββββββββββ
[1/85] Processing: Martin Garrix - Animals
Folder: rekordbox_music/HOUSE
π Searching for video...
π€ Found lyrics version
β Title: Martin Garrix - Animals (Lyrics)
β± Duration: 5:04
β¬ Downloading...
π΅ Detecting musical KEY...
πΉ KEY detected: 4A
β Downloaded successfully
[2/85] Processing: Lost Frequencies - Are You With Me
Folder: rekordbox_music/HOUSE
π Searching for video...
π€ Found lyrics version
β Title: Lost Frequencies - Are You With Me (Lyrics)
β± Duration: 2:22
β¬ Downloading...
π΅ Detecting musical KEY...
πΉ KEY detected: 4B
β Downloaded successfully
[3/85] Processing: Avicii - Levels
β SKIPPED: Already exists as 'Levels (Lyrics).mp3'
...
ββββββββββββββββββββββββββββββββββββββββββββββββββ
DOWNLOAD SUMMARY
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Total processed: 85
β Downloaded: 72
β Already existed: 10
β Skipped (quality): 2
β Failed: 1
β Songs skipped (low quality):
- DJ Snake - Turn Down for What (too long: 12:34)
- Random Artist - Live at Festival (contains: live)
π Songs saved to: /home/user/rekordbox_music/HOUSE
π‘ Next step: Import the folder into Rekordbox
- Open Rekordbox
- Go to File β Import β Import Folder
- Select
rekordbox_music/HOUSE - Your songs are now ready with KEY (Camelot notation) already tagged! πΉ
# 1. Setup (only once)
git clone https://github.com/Dixter999/rekordbox-spotify-downloader.git
cd rekordbox-spotify-downloader
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# 2. Download your playlist from Exportify.net and move it here
mv ~/Downloads/Summer_Hits_2025.csv .
# 3. Convert to song list
python3 convert_csv_to_txt.py Summer_Hits_2025.csv
# 4. Download all songs
python3 youtube_to_rekordbox_enhanced.py Summer_Hits_2025.txt --output rekordbox_music/SUMMER --prefer-lyrics
# 5. Done! Your music is in rekordbox_music/SUMMER/
ls rekordbox_music/SUMMER/Don't have Spotify? Just create a text file manually:
1. Create my_songs.txt:
Martin Garrix - Animals
Avicii - Levels
Calvin Harris - Summer
David Guetta - Titanium
2. Download:
source venv/bin/activate
python3 youtube_to_rekordbox_enhanced.py my_songs.txt --output rekordbox_music/EDM --prefer-lyrics| Option | Description | Example |
|---|---|---|
--output |
Output folder | --output rekordbox_music/HOUSE |
--prefer-lyrics |
Search for lyrics videos (cleaner audio) | --prefer-lyrics |
--no-lyrics |
Search for official/audio videos | --no-lyrics |
--min-duration |
Minimum song length in seconds | --min-duration 120 |
--max-duration |
Maximum song length in seconds | --max-duration 480 |
Examples:
# Download to HOUSE folder with lyrics preference
python3 youtube_to_rekordbox_enhanced.py playlist.txt --output rekordbox_music/HOUSE --prefer-lyrics
# Download with custom duration limits (2-8 minutes)
python3 youtube_to_rekordbox_enhanced.py playlist.txt --output rekordbox_music/POP --min-duration 120 --max-duration 480
# Download without lyrics preference
python3 youtube_to_rekordbox_enhanced.py playlist.txt --output rekordbox_music/EDM --no-lyricsAlready have MP3 files? Add KEY detection to them:
# Update all folders
./update_all_metadata.sh
# Update specific folder
python3 update_metadata.py rekordbox_music/HOUSErekordbox-spotify-downloader/
βββ youtube_to_rekordbox_enhanced.py # Main download script with filters
βββ convert_csv_to_txt.py # Convert Exportify CSV to song list
βββ update_metadata.py # Update KEY/BPM for existing files
βββ update_all_metadata.sh # Batch metadata updater
βββ extract_spotify_playlists.py # Extract playlists from JSON
βββ spotify-backup/ # Spotify OAuth integration (optional)
β βββ spotify-backup.py # Backup Spotify library
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ LICENSE # MIT License
βββ examples/ # Example song lists
βββ example_house.txt
βββ example_pop.txt
βββ martin_garrix_set.txt
The downloader automatically filters out:
- UNRELEASED tracks
- LIVE versions (concert recordings)
- Songs shorter than 90 seconds (configurable)
Edit youtube_to_rekordbox_enhanced.py to customize:
skip_keywords = [
'unreleased',
'live',
'live at',
'concert',
'tour'
]Default: rekordbox_music/
To use a Windows path with WSL:
ln -s /mnt/c/Users/YOUR_USERNAME/Music/RekordboxDownloads rekordbox_musicThe system uses Camelot Wheel notation for harmonic mixing:
| Musical Key | Camelot | Musical Key | Camelot |
|---|---|---|---|
| C major | 8B | A minor | 8A |
| G major | 9B | E minor | 9A |
| D major | 10B | B minor | 10A |
| A major | 11B | F# minor | 11A |
| E major | 12B | C# minor | 12A |
| B major | 1B | G# minor | 1A |
| F# major | 2B | D# minor | 2A |
| Db major | 3B | Bb minor | 3A |
| Ab major | 4B | F minor | 4A |
| Eb major | 5B | C minor | 5A |
| Bb major | 6B | G minor | 6A |
| F major | 7B | D minor | 7A |
Harmonic Mixing Rules:
- Mix tracks with the same number (e.g., 8A β 8B)
- Mix tracks Β±1 on the wheel (e.g., 8A β 9A or 7A)
This project integrates several powerful tools:
- yt-dlp - YouTube downloader (replaces youtube-dl)
- Essentia - Music information retrieval for KEY and BPM detection
- Mutagen - Python library for audio metadata
- FFmpeg - Audio/video processing
- spotify-backup - Backup Spotify playlists to JSON
- Spotify Web API - Access Spotify data
βββββββββββββββββββββββββββββββββββββββββββββββ
YouTube to Rekordbox MP3 Downloader Enhanced
βββββββββββββββββββββββββββββββββββββββββββββββ
[1/267] Processing: Martin Garrix - Animals
Folder: rekordbox_music/HOUSE
π Searching video...
β Title: Martin Garrix - Animals (Official Video)
β± Duration: 5:20
β¬ Downloading...
π΅ Detecting musical KEY...
πΉ KEY detected: 4A
πΎ BPM detected: 128
β Downloaded successfully
Solution:
pip install essentia-tensorflowSolution:
# Ubuntu/WSL
sudo apt install ffmpeg
# macOS
brew install ffmpegSolution: Use WSL and symlink:
ln -s /mnt/c/Users/YOUR_USERNAME/Music rekordbox_musicSolution: Ensure FFmpeg is installed and in PATH
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/Dixter999/rekordbox-spotify-downloader.git
cd rekordbox-spotify-downloader
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Add support for other music platforms (SoundCloud, Beatport)
- GUI interface
- Docker container
- Advanced playlist management
-
Duplicate detectionβ Implemented! - Waveform generation
- BPM detection integration
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for personal use only. Please respect copyright laws and only download music you have the rights to access. Consider supporting artists by:
- Purchasing music on Beatport
- Subscribing to Spotify
- Buying tracks on Bandcamp
- Supporting artists on SoundCloud
YouTube Terms of Service: Review YouTube's Terms of Service before using this tool.
- Build your Rekordbox library from Spotify playlists
- Harmonic mixing with automatic Camelot key detection
- Organize by genre (HOUSE, Techno, Pop, etc.)
- Filter low-quality live recordings and unreleased tracks
- Sample collection organized by key and BPM
- Reference tracks for your productions
- Analyze song structure with precise BPM data
- Offline music library from your Spotify favorites
- High-quality MP3s with proper metadata
- Organized collection by artist or genre
This project stands on the shoulders of amazing open-source work:
- spotify-backup by @caseychu - The foundation for Spotify playlist extraction
- ytm-dlapi by @Thanatoslayer6 - Initial concept for YouTube Music downloads
- yt-dlp team - Powerful YouTube downloader that makes this possible
- Music Technology Group (MTG) - Creators of Essentia for music analysis
- Mutagen contributors - Python audio metadata library
- FFmpeg team - Universal audio/video processing
- Pioneer DJ for creating Rekordbox, the best DJ software for professional mixing
- The DJ community for inspiring this project and providing feedback
If you encounter any issues or have questions:
- Check the Issues page
- Open a new issue with:
- Your OS and Python version
- Error message/log
- Steps to reproduce
If this project helped you, please β star it on GitHub!
Made with β€οΈ for the DJ community