Repository navigation
feat: add FLAC support (import and export) - #194
Merged
Merged
Conversation
Import: accept .flac uploads alongside .mp3/.wav. The source is stored as source.flac and decoded by the existing ffmpeg/Demucs path, so no pipeline change is needed - just the allowlist, the file picker accept attr, and the user-facing messages. Export: add FLAC as a third download format next to WAV/MP3 for the mix, the loop region, and the stems .zip. - Backend: a shared codec/encoder map drives the dynamic mixdown endpoint (mixdown.flac -> -c:a flac) and the stems-zip builder (per-stem flac transcode). Format validation now accepts wav|mp3|flac. - Frontend: a third WAV/MP3/FLAC toggle in the export menu. The mix/region download helpers are parameterized by extension (the per-format Mp3 variants are collapsed into downloadCurrentMix(ext)/downloadRegionMix(ext)). Verified end-to-end: mixdown.flac and the flac stems zip return valid, ffprobe-decodable FLAC; WAV and MP3 still work. Adds upload + export FLAC tests; full suite 100 passed.
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.
Adds FLAC as a first-class audio format on both sides of StemDeck.
Import
.flacuploads alongside.mp3/.wav.source.flacand decoded by the existing ffmpeg/Demucs path, so no pipeline change is needed - only the allowlist (app/api/jobs.py), the file-pickeracceptattribute, and the user-facing messages.Export
mixdown.flac->-c:a flac) and the stems-zip builder (per-stem FLAC transcode). Format validation acceptswav|mp3|flac.*Mp3mix/region helpers are collapsed intodownloadCurrentMix(ext)/downloadRegionMix(ext), so adding FLAC (or any future format) is just one more toggle.Verification
mixdown.flacand the FLAC stems zip return valid, ffprobe-decodable FLAC; WAV and MP3 still work (regression-checked).mixdown.flachappy path (FLAC markerfLaC); FLAC stems zip; format-validation. Full suite 100 passed. ruff +node --checkclean.Files:
app/api/jobs.py,app/api/stems.py,static/index.html,static/js/main.js,static/js/player.js, tests.