CUE support for FLAC files

for the love of god, please…

1 Like

+1 support

1 Like

This is truly over 10yrs old now

1 Like

What about now?

1 Like

disappointed this isn’t supported.

1 Like

i mean.. 2025? lost cause?

1 Like

+1 for this feature

1 Like

Hopefully now that they’re forcing anyone listening to music onto plaxamp, they’ll invest some effort in to making it more useful.

Please. Have mercy on us. Sending bat-signal to @elan

1 Like

I’m sorry, but this specific thing is not a priority, too many other things to look at, and it’s tricky to support many-tracks-inside-a-file. Is there any real reason not to split the FLAC into gapless 1:1 files:tracks?

Is there any real reason not to split the FLAC into gapless 1:1 files:tracks?

For me the big reason is I have a large library. Split is a lot of effort and have to be done on a desktop computer. It’s also quite tricky to get the metadata correctly copied from cue files into the standalone tracks.

tricky to support many-tracks-inside-a-file

I believe been “tricky” is exactly the reason many of us are asking plex to do the heavy lifting :slight_smile:

But plex already supports multiple episodes in one file for videos, isn’t it? I imagine the logic for music is similar. You may even be able to reuse the code.

1 Like

Seems like something which a script or tool could do automatically without any effort. A google search showed up a good number of options.

Not really. If you named the file correctly they will display the individual episodes in the show’s listings, but it does not track the episodes individually, and cannot start playback of a specific episode mid-way through the file.

That would be like Plexamp showing you the complete track list for the album based on the CUE file, but when you select any track it just starts playing the entire FLAC file from the beginning, not the track you wanted.

2 Likes

complicated to do what should already have been a basic function 15 years ago :upside_down_face:

3 Likes

+1000, please do something Plex Team. Thanks

1 Like

How is this still not implemented? Free music players from the early 2000’s have this feature and this is a paid service… lol.

3 Likes

How is this not supported Yet?

I spent 3 seconds in chatGPT, and got this. It’s specific to Linux, but asking it for a Windows, or Mac option would be just as easy. Hope this helps.

Me: There’s a bunch of plex users that have their flac music libraries in the not split into individual tracks sort of way. Can you write a script for them to easily split all the files into individual tracks? It needs to be easy to use, never delete old data, and include a guided options process.

o4-mini: Here’s a self-contained Bash script that will walk you through splitting your “big” FLAC+ CUE albums into individual, properly tagged FLAC tracks, without ever deleting your originals. It:

  1. Asks you where your music lives
  2. Scans for matching .flac + .cue pairs
  3. Lets you choose which pair(s) to process
  4. Creates a new subfolder for each album (so nothing ever gets overwritten)
  5. Uses shnsplit + cuetag (from shntool and cuetools) to split + tag

Make sure you have these two utilities installed first:

shntool (for shnsplit)
cuetools (for cuetag)

On Debian/Ubuntu you can get them with:

bash

sudo apt update
sudo apt install shntool cuetools flac

———————————————————————————————
Save the following script as split-flac-albums.sh, make it executable (chmod +x split-flac-albums.sh), then just run it (./split-flac-albums.sh) and follow the prompts.

bash

#!/usr/bin/env bash
#
# split-flac-albums.sh
#
# Interactive script to find *.flac + *.cue pairs under a directory,
# then split each .flac into properly tagged tracks into its own subfolder.
#
# Requirements:
#   - shnsplit  (from shntool)
#   - cuetag    (from cuetools)
#   - flac      (to verify FLAC files)
#
# Nothing gets deleted. Originals stay put; new tracks go under AlbumName_tracks/.

set -euo pipefail

# 1. Ask for root music directory
echo "== Flac Album Splitter =="
read -rp "Enter the full path to your music root directory: " MUSIC_ROOT
if [ ! -d "$MUSIC_ROOT" ]; then
  echo "Directory not found: $MUSIC_ROOT"
  exit 1
fi

# 2. Find all .flac files that have a paired .cue
mapfile -t ALBUMS < <(
  find "$MUSIC_ROOT" -type f -iname '*.flac' | while read -r flac; do
    cue="${flac%.flac}.cue"
    if [ -f "$cue" ]; then
      # print both paths, tab-separated
      echo -e "$flac\t$cue"
    fi
  done
)

if [ ${#ALBUMS[@]} -eq 0 ]; then
  echo "No .flac + .cue pairs found under $MUSIC_ROOT."
  exit 0
fi

echo
echo "Found ${#ALBUMS[@]} album(s) with both .flac and .cue:"
for i in "${!ALBUMS[@]}"; do
  IFS=

——————————————————————————————

How it works, at a glance:

  1. You point it at your top‐level music folder.
  2. It searches for every *.flac that has a corresponding *.cue in the same folder.
  3. You choose which albums to split (or “all”).
  4. For each album, it makes a new folder called AlbumName_tracks/, runs shnsplit to cut out each track, then runs cuetag to apply the CUE metadata.
  5. Because it never writes back into your original directory, your big .flac and .cue stay intact forever.

Enjoy your newly‐split library!\t’ read -r flac cue <<< “${ALBUMS[$i]}”
dir=$(dirname “$flac”)
base=$(basename “${flac%.flac}”)
printf " %2d) %-40s (%s)\n" $((i+1)) “$base” “$dir”
done

echo
read -rp "Enter the numbers of the album(s) to split (e.g. 1 3 5), or ‘all’: " choices

Normalize choice list

if [[ “$choices” =~ [1][Ll][Ll]$ ]]; then
sel_indices=($(seq 1 “${#ALBUMS[@]}”))
else
read -ra sel_indices <<< “$choices”
fi

3. Process each selected album

for idx in “${sel_indices[@]}”; do

zero-based index

i=$((idx-1))
if (( i < 0 || i >= ${#ALBUMS[@]} )); then
echo “Skipping invalid selection: $idx”
continue
fi

IFS=


——————————————————————————————

How it works, at a glance:

1. You point it at your top‐level music folder.
2. It searches for every `DISCOURSE_PLACEHOLDER_16` that has a corresponding `DISCOURSE_PLACEHOLDER_17` in the same folder.
3. You choose which albums to split (or “all”).
4. For each album, it makes a new folder called `DISCOURSE_PLACEHOLDER_18`, runs `DISCOURSE_PLACEHOLDER_19` to cut out each track, then runs `DISCOURSE_PLACEHOLDER_20` to apply the CUE metadata.
5. Because it never writes back into your original directory, your big `DISCOURSE_PLACEHOLDER_21` and `DISCOURSE_PLACEHOLDER_22` stay intact forever.

Enjoy your newly‐split library!\t' read -r FLACFILE CUEFILE <<< "${ALBUMS[$i]}"
  ALBUMDIR=$(dirname "$FLACFILE")
  ALBUMBASE=$(basename "${FLACFILE%.flac}")
  OUTDIR="$ALBUMDIR/${ALBUMBASE}_tracks"

  echo
  echo "---- Splitting Album #$idx: $ALBUMBASE ----"
  echo " Source FLAC: $FLACFILE"
  echo "    CUE sheet: $CUEFILE"
  echo "   Output dir: $OUTDIR"

  # Create output dir if needed
  if [ -d "$OUTDIR" ]; then
    echo ">> Output dir exists. New tracks will be added, but no files will be overwritten."
  else
    mkdir -p "$OUTDIR"
    echo ">> Created $OUTDIR"
  fi

  # 4. Run shnsplit
  echo ">> Running shnsplit to cut tracks..."
  shnsplit -f "$CUEFILE" \
           -t "%n - %t" \
           -o flac \
           -d "$OUTDIR" \
           "$FLACFILE"

  # 5. Tag the split tracks with cuetag
  echo ">> Tagging split tracks..."
  cuetag "$CUEFILE" "$OUTDIR"/*.flac

  echo "✔ Album '$ALBUMBASE' split into $(ls "$OUTDIR"/*.flac | wc -l) tracks."
done

echo
echo "All done. Your original FLAC+ CUE files are untouched, and you’ll find neatly split albums under *_tracks/."

——————————————————————————————

How it works, at a glance:

  1. You point it at your top‐level music folder.
  2. It searches for every DISCOURSE_PLACEHOLDER_16 that has a corresponding DISCOURSE_PLACEHOLDER_17 in the same folder.
  3. You choose which albums to split (or “all”).
  4. For each album, it makes a new folder called DISCOURSE_PLACEHOLDER_18, runs DISCOURSE_PLACEHOLDER_19 to cut out each track, then runs DISCOURSE_PLACEHOLDER_20 to apply the CUE metadata.
  5. Because it never writes back into your original directory, your big DISCOURSE_PLACEHOLDER_21 and DISCOURSE_PLACEHOLDER_22 stay intact forever.

Enjoy your newly‐split library!


  1. Aa ↩︎

I don’t really understand what chatGPT proposes to split files but it’s a job I already did 10 years ago with XRECODE https://xrecode.com/ and it did it very well. Too bad it doubled my folder size for use only with Plex, here the problem is not splitting files but the lack of a basic function that doesn’t force you to waste memory that could be used in another way.

1 Like

How many votes does it take for the developer to pay attention?
Why edit and redo anything if everything’s already there—I’d just like to listen to what already exists.

1 Like