Play back of FLAC and OGG files fails on some devices and not others
#16
It was this https://forum.kodi.tv/showthread.php?tid...pid2765403

They had
xml:
<buffermode>1</buffermode>
but it seems it wasn't the issue in that case.
Reply
#17
First I'm really happy that it is solved. But on the next step, I have the question, why does it have impact to flac/ogg but not mp3. This issue should care for all audio-files, from my point of view. Any idea?
Reply
#18
@sinbad6 happy you have things working, you win the game of spot the difference Smile
There it was in plain sight after all.

The working host LibreELEC05 has
xml:

<network>
    <buffermode>1</buffermode>
    <cachemembuffersize>157286400</cachemembuffersize>
    <readbufferfactor>5</readbufferfactor>
</network>
None of these values in <network> are used by Kodi, they were deprecated (renamed) in v17 onwards
 
The broken host LibreELEC04 has
xml:

<cache>
    <buffermode>1</buffermode>
    <readfactor>6</readfactor>
</cache>
These effect video stream caching https://kodi.wiki/view/HOW-TO:Modify_the...e_settings and I really did not expect there to be an impact on the paplayer. But clearly it does, so what do I know Confused

The <buffermode> = 1 turns caching on for local files as well as streams  and then <readfactor> is used in file caching so it would be the combination of values that caused your problem.

As to why that is for FLAC and not mp3 I really don't know, but something to watch out for in future.
Reply
#19
Weird... I have since v17

<cache>
<buffermode>1</buffermode>
<memorysize>239460608</memorysize>
<readfactor>20</readfactor>
</cache>

and never had a problem on any of my four installations across different OS.

Also, one would expect LibreElec05 not to have problems since the buffer tags are wrapped within <network></network> which is wrong and therefore won't have any effect. Would be interesting to see if LibreElec05 will start having problems if "buffermode=1" is wrapped in <cache></cache>.
Reply
#20
(2021-01-04, 22:26)HeresJohnny Wrote: Also, one would expect LibreElec05 not to have problems since the buffer tags are wrapped within <network></network> which is wrong and therefore won't have any effect. Would be interesting to see if LibreElec05 will start having problems if "buffermode=1" is wrapped in <cache></cache>.
I checked it and it results in the same problem as the other KODI implementations.

With "buffermode=2" in the "cache" section, all is fine. So I will keep it with that. Maybe there is another issue with my NAS, which leads to the trouble with buffermode=1, but for the moment I'm completely happy with the result.
Reply
#21
@sindbad6 I know that you are happy with things working, but I raised an issue on Github about it hoping that the person with knowledge of file caching could look at it sometime https://github.com/xbmc/xbmc/issues/19031

They have picked up on it sooner than expected, from the logs they think it is probably a file format issue rather than a caching one. The log does show ffmpeg having "sample/frame number mismatch in adjacent frames" warnings for the FLAC file you tested with. So perhaps just a coincidence it works when not caching as caching handles corruption (overreading etc.) slightly differently.

Does playback of all your FLAC files produce these ffmpeg warnings?
Assuming that some don't, do those files play when cached e.g. <buffermode>1

If you find time to test and feedback then that would be great.
Reply
#22
Also I would recommend you to not use a Fritzbox attached storage for testing but rather a decidated network device until your issues are resolved.
Reply

Logout Mark Read Team Forum Stats Members Help
Play back of FLAC and OGG files fails on some devices and not others0