Playback keeps pausing

Issue description:

Playback keeps pausing at a certain point on specific songs (I’ve only discovered two so far). If I skip past this point the rest of the song plays as normal. I’m using navidrome, and this issue is only appearing in Symfonium (I don’t have this issue in the navidrome web player or Feishin or by directly playing the .flac file). I’ve tried clearing the playback cache but the problem has persisted for some time

Logs:

Upload description: radicalalpaca

Additional information:

The logs should show two songs with this issue:
“Animal Collective - Fireworks” at 3:40
“Fishmans - Long Season” at 20:21

Reproduction steps:

 

 

Media provider:

Subsonic

Screenshots:

     

You are using your phone decoder, enable back the prefer internal decoder option.

This stops the pausing, but there’s a slight audible glitch at the problem point now

Then the files have an issue at that point.

Android stops, ffmpeg glitch there’s not much more options I have here.

Upload the files and I’ll prove if you do not believe me.

First of all, relax. I’ve not made a single accusation about you or your app, so there’s no need to be so combative.

In there is the file in question and a screen recording of symfonium in which you can clearly hear the audio glitch (around 0:07 in the clip). As I said earlier, I don’t hear this in Feishin, or the navidrome web player, or by directly playing the file. If you don’t believe me I can add recordings of these too.

I’m very calm :slight_smile: It’s Sunday I’m on my phone answering to a guy that keep repeating that since a player X does not behave the same on the file corruption then the file are not corrupted :slight_smile:

Anyway the file does indeed have a bad block that block the Android decoder 16:25:40.160 FLACDecoder media.swcodec W decodeOneFrame: no streaminfo metadata block

And that with ffmpeg triggers that glitch you can test with ffplay

Unfortunately it happens in a very busy section of the file so it’s hard to show with a waveform.

Anyway as explained since Android decoder fails on this file corruption and ffmpeg glitch on it, there’s not much I can do.

Anyway here’s the fixed version of your file https://file.io/1rVNYmfvyz45 that will work with both decoders without issues.

I’m not forcing/expecting you to reply, so this is a bit of a confusing attack. If you’re unhappy about having to reply to support issues on a weekend, perhaps disable notifications and emails to your phone? I also never stated that the files were not corrupted, just that it played back on other players fine.

Anyway the file does indeed have a bad block that block the Android decoder 16:25:40.160 FLACDecoder media.swcodec W decodeOneFrame: no streaminfo metadata block

So how come I can play the file just fine on my (Linux) desktop? Is the android decoder just worse for whatever reason? (Before you take this as an attack; it’s not. I don’t know much about this stuff as you can tell and I’m simply trying to learn more.)

Anyway the file does indeed have a bad block that block the Android decoder 16:25:40.160 FLACDecoder media.swcodec W decodeOneFrame: no streaminfo metadata block

Thanks. Can you tell me for future problems how I can find these errors? And how I can fix them?

Again there’s no attacks, just plain simple sentences. I’m not native English speaker just read the words.

When there’s wrong block or data or whatever every decoder will behave differently you can already see that by the fact that Android and FFmpeg does not do the same.

It’s all about the decoder being strict or and how it tries to recover. This is not about being worse or not. It’s actually usually better to stop playing on errors than trying a risky recover that could play at ultra high volume or other unwanted effects.

So in this case Android is more strict and stops, ffmpeg tries to recover and produce a glitch and the decoders you try probably just drop the wrong part leading to a missing sample but way harder to detect than the ffmpeg solution if there’s only one.

To really fix you need to download again the source file or extract it again from the cd or whatever way you did get this file.

The flac to flac reencode I did to “fix” the issue just did what your other decoders did and drop the wrong data, the file sounds more okay but it’s still not as good as the original due to the missing part.

@Tolriq has already answered how to handle the problematic files, (usually it means re-ripping or re-downloading the song in question). If neither is an option and you want to get rid of the error message by removing the problematic frames, you can use this command if you have flac.exe on your PATH:

flac --best --verify --force --padding=4096 --silent *.flac

replacing *.flac with the name of the problematic song, otherwise all songs in the current directory are recompressed.
That does NOT fix the error tho, the broken parts will simply be removed, which is why I don’t recommend doing it.

Concerning the first part of your question, you can use my new python script, flacr to recursively test your files for decoding errors if you want.
I’ve fixed it up over the last couple of days (I don’t care about progress bars for example but usually people expect to see something other than a blank line when running a script).

flacr.py -tpl -m 8 -g 300000 -d "D:\Music"

This command would recursively scan the D:\Music directory, collect all flac files, decode each one of them with flac.exe using 8 threads, log decoding errors to flacr.log and display a progress bar while doing so.

The -g 300000 part assumes your library size is a bit below 300k files. That’s only used to improve the accuracy of the progress bar while the script is still busy looping over the directories. If you don’t set it it defaults to 999999, it’s just a cosmetic thing.

The script can do more, just use -h or read the readme on github if you’re interested, but that command should cover your use case.

Do let me know if you run into errors, the script in its current form is brand new. Cheers.

PS:
I’ve only tested it on windows, if you or someone else tries it on another OS, let me know if it works.

2 Likes

Hi, thanks for this. I’ve briefly tested it on Linux and it seems to run fine, however I’ve not tested all the options yet. I’ll let you know if anything doesn’t work.

However, a quick test on the problematic flac file from earlier doesn’t raise any errors. Calling flac -t ~/Downloads/05\ -\ Fireworks.flac, where the .flac file is the one I sent earlier to Tolriq with the errors, returns “ok”. What am I missing here? Is there some sort of stricter test I can run that’ll flag this?

Good to know, thanks.

I just noticed that the -s, --single_folder mode wasn’t working and fixed it.

That’s odd. I’ve just tested a known bad file with flac -t:

D:\Test>flac -t "38 The Phoenix King CORRUPT.flac"

flac 1.4.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2023  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

38 The Phoenix King CORRUPT.flac: ERROR, MD5 signature mismatch

with flac -a:

D:\Test>flac -a "38 The Phoenix King CORRUPT.flac"

flac 1.4.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2023  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

38 The Phoenix King CORRUPT.flac: ERROR, MD5 signature mismatch

and also with my script flacr:

D:\Test>flacr.py -t -s
Encountered error when processing file:
D:\Test\38 The Phoenix King CORRUPT.flac
38 The Phoenix King CORRUPT.flac: ERROR, MD5 signature mismatch


1 flac files processed, 1 errors. Error rate: 100.0 %.

I don’t know. Maybe @Tolriq knows a different test? I did not test your problematic file after all.

Here’s the mega link with the files that Tolriq tested earlier.

And this is what I’m seeing:

leo@pop-os ~/Downloads> flac -t 05\ -\ Fireworks.flac

flac 1.4.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2023  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

05 - Fireworks.flac: ok 

So not sure what’s actually happening here

I’ve checked out your file.
Tags seem fine (except for an excessive padding of 329KB, probably because the file used to have an embedded cover which was later on removed but the excess padding remained).
In the video, Symfonium stops playing at 03:45, so I took a closer look at the audio from 03:44 to 03:46, however there’s also no obvious error like missing parts there.

dbpoweramp music converter recompresses it without errors.
flacr recompresses it without errors.
ffmpeg recompresses it without errors.

Honestly I can’t find anything wrong with that file except for the not up to date codec (1.3.3 from 2019 vs 1.4.3 from 2023) and the excessive padding, which combined make your file a bit bigger than it needs to be and both of which can easily be fixed by running flacr on it in recompression mode.
padding
Left original, right after recompressing it with flacr.
orig vs flacr

The file plays just fine in mpv, vlc, musicbee and mpc.

I’d suggest recompressing it with a software of your choice (doesn’t have to be my script) adding it back to your server, syncing your provider in Symfonium and playing it again. I’d be very surprised if it stopped playback.

Also personally I’d add replaygain tags. Not having to constantly adjust the volume is very nice.

If you do decide to use my script:

flacr.py -m 8 -rp

should do the trick. You can replace the 8 with how many threads you want it to use (depends on your cpu).
That would first calculate replaygain tags for all songs and then recompress them with the latest flac encoder and also set the padding to 4KB while showing a progress bar.

This reminds me of my experience with a 24/96 file refusing to play through on a raspberry pi Zero when cast from Symfonium. Playback also stopped for no reason but once I recompressed the album (it did not have decoding errors) it played through just fine.

Let me know if it works. :wink:

Thanks for this.

probably because the file used to have an embedded cover which was later on removed but the excess padding remained

You would be correct here. I ought to recompress my entire library at some point. If only there was a useful Python script that could do this for me :wink:

In the video, Symfonium stops playing at 03:45, so I took a closer look at the audio from 03:44 to 03:46, however there’s also no obvious error like missing parts there.

FWIW the pausing occurs at 3:40. That video in the mega was to show the glitchy playback that occured after I enabled the internal decoder.

And while I was at it I tried a couple other Android subsonic clients, substreamer and subtracks. Interestingly substreamer was able to play the song just fine, while subtracks hangs up at 3:40 exactly like Symfonium does.

But anyway I used your script to recompress and it plays just fine now without hanging, so thanks a bunch again!

1 Like