Can't play certain FLAC files

Issue description:

For some reason, some of my FLAC files will not play in Symfonium. My issue is very similar to Cannot Play Certain FLAC Files

My media provider is Subsonic, however, I’ve cached this album to my phone. I’m not sure if that makes a difference. I clicked on More actions / Offline cache and download and I see that it says Status: In rolling cache.

I’ve tried going to Settings / Playback / Decoding and transcoding and turning off Prefer internal decoder, like in the linked issue, but that doesn’t fix the playback issue for me.

I’ve also tried running flac --test song.flac to check for corruption, but no errors were found. Not sure if there is a better way to check for corruption. I am able to play the FLAC file on my laptop.

Logs:

Upload description: eiho7e

Additional information:

 
Symfonium version: 11.4.0 (127264)
Phone: Pixel 8
Android: 15
 

Reproduction steps:

 

  • I added an album to Navidrome.
  • I added a Subsonic media provider in Symfonium
  • I pressed Sync to download the album to Symfonium (I have music be cached)
  • I go to play the album
  • Some songs play, some do not
     

Media provider:

Subsonic

That’s a good starting point. Have you tried reencoding the files in question with the latest flac encoder? Since flac is lossless this yields no quality penalty.
You could use
flac --best --verify --padding=4096 --silent song.flac song_enc.flac
to test one song.

Or if you’d rather do it on a bigger scale you could give my python script flacr a go to do it recursively (and optionally calculate replaygain values).
flacr.py -Q for example would calculate replaygain values for all songs in the current dir + all subdirs using all threads available on the system and then reencode all .flac files with the latest encoder while showing progress bars and returning errors on the cli (once again using all available threads).
It’s my alias for flacr.py -m 32 -rp (my cpu has 16c32t).
Good luck!

Huh. Yeah. Reencoding fixed this issue.

I ran these commands.

cd album
ls -1 | xargs flac --verify --warnings-as-errors --force

Then I deleted the existing album from my Symfonium cache and resynced it.

The album is playing fine now. Thanks!

I’m still curious about what the underlying issue is here. Is this a bug in Symfonium? Or intended behavior? Is it possible that the encoder version is no longer supported or something like that?

I’m fine with reencoding albums that don’t play. Thanks again!

From the logs the files are indeed invalid.

But the file you uploaded does play without issue so I’m lost here did you upload the fixed one ?

The file I uploaded plays fine in Symfonium? Uh, I think I uploaded the bugged file. Here are some hashes of the FLAC: the bugged original one and then the fixed reencoded one. Maybe you can compare them with the file I uploaded.

$ shasum -a 256 03-bugged.flac 
40b45f2cabfa97eef752a3eea15a2670f79158f5072539786840246267ed387e  03-bugged.flac

$ shasum -a 256 03-fixed.flac 
b28af55eb4956db0160b248a5212cc5fc62b7eea711323dc6a272f2f48867f38  03-fixed.flac
 shasum -a 256 03-los_cazahuates.flac 
40b45f2cabfa97eef752a3eea15a2670f79158f5072539786840246267ed387e  03-los_cazahuates.flac

It is the bugged one and I have no issue playing it, do you have some forced transcoding setting server side ?

do you have some forced transcoding setting sever side?

Na, don’t think so.

Also, I noticed this file corruption was spreading to more song files. I wonder if it has to do with the rolling cache… as I add new songs to my library and rolling cache, older songs should be removed from the cache if they don’t fit, right? Maybe the expiration isn’t happening correctly? :thinking:

I say this because I just discovered another album that got corrupted. It was in the rolling cache. I’m very certain this album played a few months ago. I’ve added new music to the cache since then. I deleted the corrupted album from the cache, then added it back to the rolling cache and now it plays again.

(This “corrupted” album does play fine in the Navidrome web UI, it’s just Symfonium that can’t play it.)

1 Like

It depends how the files are added to the rolling cache. If it’s via copy from the playback cache, then it’s possible I think there’s still some bug in Google code there but without a repro they don’t really care.

Before you go reencoding, especially if your files do not show errors when you test them on the computer, try clearing the playback cache and removing any cached versions of the files from symfonium (rolling or perm cache) and then playing them again. I have had luck getting files to play as they should when I force a new version to be downloaded from the server.

You are essentially doing the same thing when you reencode the files, which is why it works, but I don’t believe the file was the issue in the first place, but the cached data was somehow corrupt.

In my case, the files are indeed being copied from the playback cache to the rolling cache.