Split lossless album images (.flac or .wv) into per-track FLAC files using matching CUE sheets.
Install dependencies:
sudo apt install bison flex pkg-config libwavpack-dev
If your distro package is older than 5.9.0, build and install WavPack 5.9.0 from
https://www.wavpack.com/index.html and make sure wavpack.pc is available via PKG_CONFIG_PATH.
Installation:
cargo install --git https://github.com/mikea/flac-cue-splitRun (auto-detects one audio image file: .flac or .wv, plus .cue, in current directory):
flac-cue-splitRun with explicit files:
flac-cue-split --flac "Album.flac" --cue "Album.cue"
flac-cue-split --flac "Album.wv" --cue "Album.cue"Run in a different directory (positional DIR):
flac-cue-split /path/to/albumSkip confirmation:
flac-cue-split -yOverwrite existing outputs:
flac-cue-split -oSet compression level (0-8 or max):
flac-cue-split -c 8
flac-cue-split --compression-level maxPick a specific picture file:
flac-cue-split --picture cover.jpgDisable picture auto-detect:
flac-cue-split --no-pictureDelete original input file after successful split:
flac-cue-split --delete-originalRename original input file after successful split:
flac-cue-split -rForce cue encoding:
flac-cue-split --cue-encoding windows-1251- If either
--flacor--cueis provided, the tool resolves a single input pair. - If neither is provided, the tool scans the chosen directory for
.flac/.wvand.cuefiles. - Directory scan mode is valid when audio-image (
.flacor.wv) and.cuecounts match and every basename has both files (for example:Disc 1.wv+Disc 1.cue). - When there are several pairs, each source image is split into a subdirectory. The subdirectory name is derived by removing the longest common prefix and longest common suffix from all source basenames.
- Output files are written using the pattern
NN - Title.flac. - The tool prints a preview plan for all pairs (including shared tags and per-track unique tags), then asks for one batch confirmation (
y/N). - In multi-pair mode, the confirmation prompt also supports
S(Subdirs) to interactively edit per-pair output subdirectory names before running. - A progress bar is shown during encoding.
- If
--picture <FILE>is provided, that file is embedded as the cover image. - Otherwise, if there is exactly one image file in the chosen directory (jpg/jpeg/png/gif/bmp/webp/tif/tiff), it is embedded as a cover picture in all output files (unless
--no-pictureis used). - Cue encoding is auto-detected (UTF-8, otherwise Windows-1251) and shown in the plan. You can override it with
--cue-encoding. --delete-originalremoves the input source file after a successful split.--rename-original(or-r) renames the input source file to*.processedafter a successful split.
--flac <FILE>: Path to input source file (.flacor.wv)--cue <FILE>: Path to input CUE--cue-encoding <ENCODING>: Force cue text encoding (example:windows-1251)-y, --yes: Skip confirmation-o, --overwrite: Overwrite existing output files-c, --compression-level <LEVEL>: FLAC compression level (0-8 ormax)--picture <FILE>: Use a specific picture file--no-picture: Disable picture auto-detection--delete-original: Delete input source file after successful split-r, --rename-original: Rename input source file to*.processedafter successful splitDIR: Optional directory to scan for input files