Add FLAC (.flac) file support#7
Open
akrbout wants to merge 1 commit into
Open
Conversation
…c files - New extract_flac.py module using mutagen.flac.FLAC - Reuses m4a double-base64 parser for SERATO_MARKERS_V2 (same format) - Reuses mp3 beatgrid parser for SERATO_BEATGRID (same binary structure) - Reads BPM from 'BPM'/'TBPM' Vorbis comments - Reads key from INITIALKEY Vorbis comment, converts to Camelot - Updated serato2rekordbox.py: added .flac to format dispatcher and Kind mapping - Tested on library with 1300+ FLAC files: all processed successfully
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds support for converting .flac files from Serato crates to rekordbox XML.
Why
FLAC is a popular format for DJs who care about audio quality, but the tool previously skipped all .flac files with
Unsupported format: .flac. In my library that was ~1300 tracks out of ~4200.How
extract_flac.pymodule usingmutagen.flac.FLACSERATO_MARKERS_V2,SERATO_BEATGRID) — the payload format is identical to M4A (double base64 with application/octet-stream wrapper)extract_m4a.parse_serato_hot_cues()for hot cues (same double-base64 format)extract_mp3.parse_beatgrid_markers()for beatgrid (same binary structure after base64 decode)BPM/TBPMVorbis comments, key fromINITIALKEYserato2rekordbox.py: added.flacto format dispatcher andKindmapping (FLAC File)Testing
Tested on my Serato library (~4200 tracks, ~1300 FLAC):
Files changed
extract_flac.py(new, 164 lines)serato2rekordbox.py(+8 lines: import, format dispatch, Kind mapping)