Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

🎡 Transform Spotify playlists into a DJ-ready Rekordbox library. Automatic KEY detection (Camelot), BPM analysis, quality filtering, and smart organization. Perfect for harmonic mixing!

License

Notifications You must be signed in to change notification settings

Dixter999/rekordbox-spotify-downloader

Open more actions menu

Repository files navigation

Rekordbox Spotify Downloader 🎡🎧

License: MIT Python 3.8+

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!


πŸ’‘ Why This Project Exists

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:

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!


✨ Features

🎹 Advanced Music Analysis

  • 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)

πŸ“š Smart Organization

  • 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

🎼 Spotify Integration

  • 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

πŸš€ Quick Start (5 Minutes Setup)

Step 1: Install the Tool

# 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-dev

πŸ“– How to Download Music (Step-by-Step)

🎯 Option 1: From Spotify Playlist (Recommended)

This is the easiest method - export your Spotify playlist and download all songs!


Step 1: Export Your Spotify Playlist

  1. Open Exportify.net in your browser
  2. Click "Get Started" and log in with your Spotify account
  3. Find your playlist and click the green "Export" button
  4. A CSV file will download (e.g., My_Playlist.csv)
πŸ“ Downloads/
   └── My_Playlist.csv   ← Downloaded from Exportify

Step 2: Convert CSV to Song List

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.csv

Output:

βœ“ 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
...

Step 3: Download All Songs

Now download all songs to a folder (e.g., HOUSE):

python3 youtube_to_rekordbox_enhanced.py My_Playlist.txt --output rekordbox_music/HOUSE --prefer-lyrics

Example 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

Step 4: Import into Rekordbox

  1. Open Rekordbox
  2. Go to File β†’ Import β†’ Import Folder
  3. Select rekordbox_music/HOUSE
  4. Your songs are now ready with KEY (Camelot notation) already tagged! 🎹

πŸ“ Complete Example Workflow

# 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/

🎡 Option 2: From a Simple Text File

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

βš™οΈ Command Line Options

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-lyrics

πŸ”„ Update KEY/BPM for Existing Files

Already have MP3 files? Add KEY detection to them:

# Update all folders
./update_all_metadata.sh

# Update specific folder
python3 update_metadata.py rekordbox_music/HOUSE

πŸ“ Project Structure

rekordbox-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

πŸŽ›οΈ Configuration

Quality Filters

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'
]

Output Directory

Default: rekordbox_music/

To use a Windows path with WSL:

ln -s /mnt/c/Users/YOUR_USERNAME/Music/RekordboxDownloads rekordbox_music

🎹 Camelot Key Notation

The 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)

πŸ”— Tools & Dependencies

This project integrates several powerful tools:

Core 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 Integration


πŸ“Š Example Output

═══════════════════════════════════════════════
  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

πŸ› οΈ Troubleshooting

Issue: "Essentia not available"

Solution:

pip install essentia-tensorflow

Issue: "FFmpeg not found"

Solution:

# Ubuntu/WSL
sudo apt install ffmpeg

# macOS
brew install ffmpeg

Issue: "Permission denied" on Windows paths

Solution: Use WSL and symlink:

ln -s /mnt/c/Users/YOUR_USERNAME/Music rekordbox_music

Issue: Downloads are in WEBM format

Solution: Ensure FFmpeg is installed and in PATH


🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

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

Areas for Contribution

  • Add support for other music platforms (SoundCloud, Beatport)
  • GUI interface
  • Docker container
  • Advanced playlist management
  • Duplicate detection βœ… Implemented!
  • Waveform generation
  • BPM detection integration

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Disclaimer

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:

YouTube Terms of Service: Review YouTube's Terms of Service before using this tool.


🎯 Use Cases

For DJs

  • 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

For Music Producers

  • Sample collection organized by key and BPM
  • Reference tracks for your productions
  • Analyze song structure with precise BPM data

For Music Enthusiasts

  • Offline music library from your Spotify favorites
  • High-quality MP3s with proper metadata
  • Organized collection by artist or genre

πŸ™ Acknowledgments

This project stands on the shoulders of amazing open-source work:

Core Inspiration

Essential Tools

Special Thanks

  • Pioneer DJ for creating Rekordbox, the best DJ software for professional mixing
  • The DJ community for inspiring this project and providing feedback

πŸ“§ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Open a new issue with:
    • Your OS and Python version
    • Error message/log
    • Steps to reproduce

🌟 Star History

If this project helped you, please ⭐ star it on GitHub!


Made with ❀️ for the DJ community

About

🎡 Transform Spotify playlists into a DJ-ready Rekordbox library. Automatic KEY detection (Camelot), BPM analysis, quality filtering, and smart organization. Perfect for harmonic mixing!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.