Plexamp - FLAC Files Stuttering

I have been having an issue for the past few months regarding playing what appears to be any FLAC files through Plexamp.

The issue is that the song will randomly stutter then replay the last 1-2 seconds of itself after the stutter. As an example, if a track is at 1:00 and this stutter happens it will continue onto 1:01 but replay the music from 0:58 instead of the next part.

Additionally, the track will become unseekable, when you tap on the progress bar it will just snap back to where ever it started off at. As an example, if a track is at 0:10 and I seek to 1:00 it will just snap back to 0:10.

My Plex server is on a Windows desktop and the issue will happen regardless if the client is local (ethernet to the same switch or WIFI) or remote (cellular or WIFI) and has been duplicated through the Android app as well as the Windows desktop app. The issue does not appear to be with the files themselves and will happen with any FLAC file. Most of my FLAC’s are 44/16 and the issue seems to affect them randomly. This issue does not happen with any other files and seems to only happen with these higher bitrate FLAC’s.

Things I have tried:
Turning ON/OFF any VPN (client or server side) - No difference
Restarting the PMS, Plexamp, Server, Client - No difference
Closing all other Programs apart from Plexamp - No difference
Clearing the Plexamp cache - This would solve the issue temporarily for any affected tracks but a new queue will eventually have the issue re-create itself
Forcing Plexamp to Convert all higher bitrates - This stopped the issue on the Android app on my phone but the local Windows desktop doesn’t appear to have this option as it will only do this if it remote which it is not. A small work around was to force downloads to convert to lower bitrate and download the FLAC’s in question which again fixed the issue.
Converting the original file to a lower bitrate Opus - This also fixed the issue.

What I’m Running:
Plexamp V4.10.1
PMS V1.40.1.8227
Windows 10 Professional - For both the Server & Client
Android Version 14

As noted I did find some possible solutions but I feel like I am missing something to get these files working as intended.

I have attached 2 screen caps of the upload rate from PMS and a song that had the issue’s info from Plex. I also attached the Plexamp log from when this song had the issue.

This line seems to happen when I would have the issue and seek causing it to snap back, apart from this I am at a loss. I am sure I am missing info so please let me know if anything else is needed or would otherwise be helpful.

Apr 18, 2024 19:46:41.165 [0x00003fdc] ERROR - BASS: Error [BASS_ChannelSetPosition(m_stream, byteOffset, BASS_POS_BYTE | BASS_POS_INEXACT)] - 0

Plexamp - Issue.zip (345.9 KB)

First of all, kudos on a detailed report! Seeing a few interesting things in the logs:

Failure to connect to plex.tv to get latest device/account data:

DEVICE: Error loading media providers from plex.tv

A handful of errors caching posters (possibly hinting at a filesystem issue):

Apr 18, 2024 18:37:18.880 [0x000045e4] ERROR - Networking: Could not move file from C:/Users/Liam/AppData/Local/Plexamp/Plexamp/Cache/Images/2/e9cfccda65e482f400d6fa4ac0be5d1e8ad564b-downloading-60 to C:/Users/Liam/AppData/Local/Plexamp/Plexamp/Cache/Images/2/e9cfccda65e482f400d6fa4ac0be5d1e8ad564b

It’s likely neither of these relate to the FLAC issue you’re seeing. In terms of these, one important question: If the issue occurs with a specific FLAC, does it continue to occur for that same exact FLAC until (for example) you clear the cache?

If this is the case, please do the following:

  1. Play the “corrupt” file and look for the following line, which will tell you where it’s pulling the file from cache.
Apr 18, 2024 19:45:27.024 [0x00005b5c] INFO - Cache: Opened cache file with 18840079 bytes (of 18840079 total) at 'C:\Users\Liam\AppData\Local\Temp/Plexamp/Caches/Media/9cc399c94c52750fc9333c5feeba2bddd237c9d603d36db79655f302f302e929'.
  1. Grab that file, along with the actual source FLAC, and send them both over.

It sounds like the cache is corrupting the file, even though it’s been a few years since we’ve found any issues in the caching layer…

Hi Elan, thanks for the reply!

To answer: If the issue occurs with a specific FLAC, does it continue to occur for that same exact FLAC until (for example) you clear the cache?

You are correct here, if I kill the play queue that caused the issue and play the song again before clearing the cache it will still have the issue.

I will re-create the issue and send these files when I get home tonight, thanks again!

Hello Elan,

Re-created the issue, here is the cached file, original file, .dat (didn’t know if you need that too) and the new log.

Due to file size I put it into dropbox this time, let me know if there is a different way you’d prefer or if you require anything further.

[edited - included wrong file (:]

Hello @elan just wondering if you guys have had a chance to review the provided files :slight_smile:

Apologies, I’ve been traveling. Will look soon.

Hey @elan, just wondering if you guys had a chance to look at this yet :slight_smile:

1 Like

Yikes, sorry to let this one slip, having a look right now.

All good, it happens! Let me know what you find

Well, it’s quite bizarre. The track is question is pre-cached, and this seemingly all goes well:

Apr 19, 2024 16:50:27.164 [0x00004a44] INFO - Cache: Opened cache file with 0 bytes (of 0 total) at 'C:\Users\Liam\AppData\Local\Temp/Plexamp/Caches/Media/74dc94c2989aa03e28d176b78064d4e60c5b72379e6e182574d2042c00b5e0dd'.
Apr 19, 2024 16:50:27.164 [0x00004a44] INFO - Cache: Using RAM buffer of 2048 KB for item with container flac bitrate of 92 KB/sec.
Apr 19, 2024 16:50:27.164 [0x00004a44] INFO - Cache: Buffering until offset reaches 471040 (read buffer offset: 0, size: 471040).
Apr 19, 2024 16:50:27.164 [0x00004a44] INFO - Cache: Opened file: https://192-168-50-14.51bfc6e164284a2b8f13f5bc1c9ba726.plex.direct:32400/library/parts/194344/1711306842/file.flac?download=1&X-Plex-Client-Identifier=aa4d062c-3149-4639-a993-5b9bbb06032d&X-Plex-Device=Windows&X-Plex-Device-Name=LIAM%20GAMING&X-Plex-Platform=Generic&X-Plex-Platform-Version=10%2E0%2E19045&X-Plex-Product=Plexamp&X-Plex-Token=<token>&X-Plex-Version=4%2E10%2E1
Apr 19, 2024 16:50:27.164 [0x000062d4] INFO - Cache: Kicking off buffering thread at offset 0, disk cache has 0 / 0.
Apr 19, 2024 16:50:27.164 [0x000062d4] INFO - Cache: Buffering to disk from offset 0.
Apr 19, 2024 16:50:27.277 [0x000062d4] INFO - Cache: HTTP response code was 200.
Apr 19, 2024 16:50:27.278 [0x000062d4] INFO - Cache: HTTP response total size was 29076570.
Apr 19, 2024 16:50:27.285 [0x000062d4] INFO - Cache: Buffering complete as offset is now greater than 471040 (475136) and read completed: 0.
Apr 19, 2024 16:50:27.306 [0x000062d4] INFO - Cache: Network buffer is now ahead of read buffer, which has 2097152 bytes. Godspeed.
Apr 19, 2024 16:50:27.569 [0x000062d4] INFO - Cache: Network completed the read (71886 KB/sec), awesome!

The file on disk is the correct size, but different data (still analyzing exactly what). When I try the same thing locally, the file caches just fine.

The code around caching has changed a little bit since the last release, if this is fairly easy for you to reproduce, would you mind DM’ing me an email and I can get you to try the beta?

Thanks for looking into it, yes it is very easy to reproduce, I will DM you my email shortly.

@Polop148 and I looked into this and … much to my surprise, it turned out to be a data corruption issue with his QNAP NAS.

I’ve never seen anything like it, and hopefully never will again.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.