A Python script that splits a single .ape (Monkey's Audio) audio file into individual tracks (e.g., MP3, FLAC) using the metadata from a .cue sheet and the powerful ffmpeg codec.
-
Place your
.apefile and its corresponding.cuefile in the same directory. -
Run the script from the command line, specifying the
.cuefile:python ape_splitter.py album.cue
The script will automatically search for an
.apefile with the same name as the.cuefile.
| Argument | Description | Example |
|---|---|---|
--ffmpeg |
Specify a custom path to the ffmpeg executable. Use this if ffmpeg is not in your system's PATH or not installed in the default location. |
--ffmpeg "path\to\ffmpeg" |
-o, --output |
Choose a custom directory for the output files. If not specified, tracks will be saved in the current directory. | -o "your\output\folder" |
Example 1: Using a custom ffmpeg path and a custom output directory.
python ape_splitter.py "path\to\album.cue" --ffmpeg "C:\ffmpeg\bin\ffmpeg.exe" -o ".\Output\Album"Example 2: Simply splitting a file when all tools are installed correctly.
python ape_splitter.py "album.cue"Python 3.6+
FFmpeg installed system-wide or specified via --ffmpeg argument