Plex showing incorrect codec data that stops Sonos playback for some files

Server Version#: 4.95.2
Player Version#: 14.19 (Sonos)

Some of my music files have recently stopped playing on Sonos. On investigation the ones that don’t play show something like the following in the “info” for the file (within Plex Web interface):

  • Codec ALAC

  • Channels 2

  • Bitrate 881 kbps

  • Album Gain -9.07

  • Album Peak 1.000000

  • Album Range 9.774495

  • Audio Channel Layout stereo

  • Bit Depth 16

  • Gain -9.07

  • Loudness -10.87

  • Lra 1.50

  • Peak 1.000000

  • Sampling Rate 44100 Hz

  • Stream Identifier 2

  • Display Title ALAC (Stereo)

  • Extended Display Title ALAC (Stereo)

  • Codec TXT

  • Format TXT

  • Display Title TXT (External)

  • Extended Display Title TXT (External)

I’ve tried running analyse on the file, rescanning the library and refreshing metadata, but this problem persists. This affects only a small proportion of the library, but I can’t see anything different about the files affected when looking in exiftool/afinfo and the problem files stay consistent.

Can anyone point me in the right direction as to how to debug this further?

Thanks

There is nothing wrong in there.

I’m sure you’re right. But the section that feels wrong to me is:

  • Codec TXT
  • Format TXT
  • Display Title TXT (External)
  • Extended Display Title TXT (External)

And the files that don’t have this do work. And the Codec “TXT” feels very wrong to me!

This is the song lyrics.

Ok. Is there a way to remove them to test my theory?

Use some music for which LyricsFind doesn’t have any lyrics.
For instance some very obscure and/or amateur band/song.

Pretty much any song for which the lyrics button remains greyed out:

Ok - yep, I can see that, and it correlates. So can I remove the lyrics from a given song? To see if this makes it work on Sonos (or find out this is a complete red herring!)

I’ve never tried that.
You can disable Find Lyrics in the properties of your music library. After a refresh of an artist the lyrics might be gone. (unless they are local files)

What I meant was to find songs without lyrics.
Or maybe copy the audio files of a currently non-working album,
remove or change the embedded metadata so it points to a completely unknown artist and album,
then add these into your library.

Ahh ok - thanks! I’ll give that a go. (and thanks for you patience!)

Well… that was a red herring! Got the lyrics removed, and no difference to what plays and what doesn’t. Ok, so back to the drawing board! Some files (the same ones as above) within Sonos are still saying “Unable to play - the song is not encoded correctly”

Where can I go from here to debug this?

Try with actually different codecs. Flac for instance.

Or check for excessively large embedded album art. If you have high-resolution album art, it is better to put one copy into the album folder as cover.jpg and only embed smaller version into the audio files (if at all – depends on whether you use the same files for different devices etc.).

Ok - not sure how much this actually helps, but there’s obviously more at play here than I’m following (and I assume some caching). Since removing the cover art appeared to do nothing, but converting to FLAC (I called the ALAC album something else from within Plex, and then imported the FLAC copy after conversion with ffmpeg). Now both copies work! Will continue to experiment. Thanks again