Skip to main content

Tools for managing and modifying a RekordBox library en-masse

Project description

rekordbox-edit

Build Coverage Version Platforms License

A command-line tool for bulk operations on your Rekordbox library. Convert audio formats, search tracks, and update your database while preserving all your cues, analysis, and metadata.

[!CAUTION] This tool can modify your Rekordbox database and audio files. Always back up your data first. No warranty is provided--you assume all risk and liability of data loss in using this. See Safety & Best Practices

Installation

pip install rekordbox-edit

Requirements:

  • Python 3.11+
  • FFmpeg (for audio conversion)

Quick Start

Search your library:

rekordbox-edit search --artist "Daft Punk" --format flac
rbe search --playlist "House Favorites"

Convert audio files:

# Preview what would be converted
rbe convert --artist "Daft Punk" --dry-run

# Convert all FLAC or WAV files to AIFF (default output format)
rbe convert --format flac --format wav --yes

# Convert all AIFF files in the playlist named 'ConvertMe' to MP3 without asking for confirmation
rbe convert --format AIFF --exact-playlist "ConvertMe" --match-all --out-format mp3 --yes

Commands

search

Find and display information on tracks in your Rekordbox database.

rbe search [OPTIONS]

Examples:

# Show all FLAC tracks by artist
rbe search --artist "Aphex Twin" --format flac

# Get all the track IDs in a playlist
rbe search --playlist "Techno" --print ids

# Find tracks matching ALL filters (AND logic)
rbe search --artist "Burial" --album "Untrue" --match-all

convert

Convert audio files between formats and update the Rekordbox database. Your cues, analysis, beatgrids, and all metadata are preserved.

rbe convert [OPTIONS]

Supported formats

  • Input: FLAC, AIFF, WAV
  • Output: AIFF, FLAC, WAV, ALAC or MP3 (320kbps CBR)

options

  • --format-out [aiff|flac|wav|alac|mp3]: Output format (default: aiff)
  • --dry-run: Preview changes without converting.
  • --yes, -y: Skip confirmation prompt
  • --interactive, -i: Confirm each file individually
  • --delete: Delete original files after conversion (default for lossless output)
  • --keep: Keep original files after conversion (default for MP3 output)
  • --overwrite: Replace existing output files instead of skipping

By default the original files will be kept when performing a lossy conversion to mp3, and deleted when performing a lossless conversion (since you can always convert back). You can override this behavior with --delete or --keep.

Examples:

# Preview conversion
rbe convert --format-out aiff --format flac --dry-run

# Convert and skip confirmation
rbe convert --format-out wav --artist "Burial" --yes

# Convert to MP3 but delete originals
rbe convert --format-out mp3 --playlist "Export" --yes --delete

# Keep originals when converting to AIFF
rbe convert --format-out aiff --format flac --yes --keep

# Get just the IDs of files that would be converted
rbe convert --format-out aiff --format flac --print ids --dry-run

# Convert and get the IDs of converted tracks
rbe convert --format-out aiff --format flac --print ids --yes

Filters & Options

Both commands support all filters. Multiple values create an OR filter unless --match-all is used.

Track filters:

  • --track-id ID: Filter by database track ID
  • --title TEXT: Track title contains TEXT
  • --exact-title TEXT: Track title exactly matches TEXT
  • --artist TEXT: Artist name contains TEXT
  • --exact-artist TEXT: Artist name exactly matches TEXT
  • --album TEXT: Album name contains TEXT
  • --exact-album TEXT: Album name exactly matches TEXT
  • --playlist TEXT: Playlist name contains TEXT
  • --exact-playlist TEXT: Playlist name exactly matches TEXT
  • --format [mp3|flac|aiff|wav|m4a]: File format matches
  • --path TEXT: File path contains TEXT (matched as a substring against the folder path, filename, or both)
  • --exact-path TEXT: File path exactly matches TEXT (resolved to an absolute path before matching)
  • --match-all: Use AND logic (all filters must match)
  • ids args: Specifying any other input to a command that is not a defined option is interpreted as one or more Track IDs. This is useful for scripting.

Examples:

# Get tracks by multiple artists
rbe search --artist "Daft Punk" --artist "Justice"

# Get tracks matching artist AND format
rbe search --artist "Aphex Twin" --format flac --match-all

# Get all the songs in this playlist
rbe search --exact-playlist "Main Room 2024"

# Get all the songs in all my "house" or "disco" playlists
rbe search --playlist "house" --playlist "disco"

# Find all the songs in all my "house" or "disco" playlists
rbe search --playlist "house" --playlist "disco"

# Find all the songs in my library that aren't in any playlist
rbe search --playlist ""

# Find tracks whose path contains a folder or filename substring
rbe search --path "Favorites/" --path "track.wav"
rbe search --path "Music/Artist/song.mp3"

# Find a track at an exact location
rbe search --exact-path "/Users/djmustard/Music/banger.mp3"
rbe search --exact-path "../Artist/track.mp3"

Output

All commands support all levels of output. These generally control how much information is printed out to the screen, and also offer some options useful for scripting.

Output levels are configured with the --print option:

  • --print [ids|silent|info|debug]: Control output format

[!NOTE] When specifying --print silent or --print ids, you must also explicitly provide either the --yes or the --dry-run flag, since any prompts would contradict the spirit of those print options.

Scripting

The --print ids option is especially interesting when used in conjunction with the ids arguments. By specifying --print ids you can use the output of one rbe command as the input to a second, e.g.:

# Convert all of the items found by the initial search command
rbe search --artist "Lauren Hill" --print ids | rbe convert

This example is a bit contrived, but this method of piping can be used to combine OR and AND logic that couldn't otherwise be expressed in a single command:

AND-narrowing — pipe a broad OR result into a second command with --match-all to intersect:

# (Daft Punk OR Justice) AND flac
rbe search --artist "Daft Punk" --artist "Justice" --print ids \
  | rbe search --format flac --match-all

OR between AND-groups — merge results from two commands using a subshell:

# (Daft Punk AND flac) OR (Justice AND aiff)
{ rbe search --artist "Daft Punk" --format flac --match-all --print ids; \
  rbe search --artist "Justice" --format aiff --match-all --print ids; } \
  | rbe convert --format-out mp3 --dry-run

Safety & Best Practices

Before using this tool:

  1. Back up your Rekordbox database

    Rekordbox already keeps multiple backups. But every time you close it, it creates a fresh one and deletes the oldest, so repetitive exits will quickly make those backups fairly useless.

    You should make manual copies of RB's database backups before using this. You can usually find them in ~/Library/Pioneer/rekordbox/ on macOS or %APPDATA%\Pioneer\rekordbox\ on Windows.

  2. Back up your music library

    If you don't have a back up already it's a very worthwhile investment, even if you don't plan to use this tool! Find yourself a cheap external drive, you won't regret it.

And generally limit the potential impact of a mistake by using filters to target a few tracks at a time e.g. --artist "Crazy Frog" --limit 5 before targeting a larger set, and always run with --dry-run first.

AI Usage

I believe it's important to be aware of and to disclose AI usage. In many ways it's being forced upon us without us having much choice in the matter, and it's a gross and oppressive experience. While it has lots of potential to benefit the common good, mostly it's only furthered capitalist greed.

I'm mostly attempting to thoughtfully disclose that generative AI has been a significant tool in building out this project. I don't personally enjoy too much coding in my personal time, but I feel passionate about making rekordbox-edit--AI has admittedly helped me bridge that gap between my capacity and my vision. I'm a career professional software engineer who takes pride in their work, and I don't want to produce a vibe coded mess any more than you want to experience it. Please validate the quality of this project yourself--at the end of the day it's just code written by some stranger.

If it's any consolation, my main test subject has been my own 10,000+ track RekordBox library--a risk I do not take lightly!

Credits

This project exists thanks to @dylanjones, the creator of pyrekordbox, which provides the Python API for Rekordbox databases.

I built this tool to help correct my own bad habits and missteps in managing and organizing my rekordbox library. If it helps you too, great! If you find issues or have ideas, contributions are welcome.

Contributing

See CONTRIBUTING.md for development setup, testing, and contribution guidelines.

Project details


Release history Release notifications | RSS feed

This version

0.4.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rekordbox_edit-0.4.0.tar.gz (194.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rekordbox_edit-0.4.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file rekordbox_edit-0.4.0.tar.gz.

File metadata

  • Download URL: rekordbox_edit-0.4.0.tar.gz
  • Upload date:
  • Size: 194.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for rekordbox_edit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6490b203cd0d62cecccbac5c65de503c23c8c02dd60a2de80c0b256881c051da
MD5 1cdbdc0bec56bf5317e3351c95c7695f
BLAKE2b-256 f3f8be1bdf38c547bba955c308381be6b5662b9652fa76d4bc146803c370c3e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for rekordbox_edit-0.4.0.tar.gz:

Publisher: publish.yml on jviall/rekordbox-edit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rekordbox_edit-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: rekordbox_edit-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for rekordbox_edit-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2b4b950f46dc2f846bbeb15534a2c3b32e9040c2d11698d29ef516ebec6754
MD5 b731059ae9763a2f28c170c7767d3111
BLAKE2b-256 d2ea8f35a226748bccae410efe7dc48b0058cd6f306a480d54de932fbdac3f03

See more details on using hashes here.

Provenance

The following attestation bundles were made for rekordbox_edit-0.4.0-py3-none-any.whl:

Publisher: publish.yml on jviall/rekordbox-edit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page