xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.25k stars 6.28k forks source link

File caching causing FLAC and OGG playback from SMB drive to fail #19031

Open DaveTBlake opened 3 years ago

DaveTBlake commented 3 years ago

Bug report

Failure to play Flac and Ogg files located on an SMB mounted drive, while mp3 files on the same drive playback without any problem.

Debug log shows error Read - Error( -1, 103, Software caused connection abort )

Investigation showed that the cause of the failure was having the following cache settings in advancedsettings.xml

<cache>
    <buffermode>1</buffermode>
    <readfactor>6</readfactor>
</cache>

Without thoses settings Flac and Ogg files play succesfully.

Debuglog

The debug logs can be found here: https://paste.kodi.tv/zadubacigu - with caching of local files playback fails https://paste.kodi.tv/ifugopejip - no caching, same files play succesfully.

Environment

Used Operating system: LibreElec 9.2.4 on RPi2/3

See discussion on forum https://forum.kodi.tv/showthread.php?tid=359462

DaveTBlake commented 3 years ago

I was unable to reproduce this on Windows and not SMB, but confident from testing done by user that there is some issue with file caching for some file formats.

@arnova I believe this is your area. If you are alble to investigate further then the user was pretty helpful and could possibly help some more.

HeresJonny commented 3 years ago

I don't have that issue, my flac files play perfectly with buffermode set to "1". Most likely the root cause lies somewhere else.

HeresJonny commented 3 years ago

From the debug log it seems that the sound properties set themselves as 44 khz fixed but the flac file attempted to play is 48 khz. The main gripe IMHO is that the files reside on storage attached to a Fritzbox which is a multi-pupose ADSL box notorious for having flakey SMB support. I would never recommand using that as a central storage for multimedia.

DaVukovic commented 3 years ago

@HeresJonny did you also test with LibreELEC?

arnova commented 3 years ago

The provided log file is filled with errors ("sample/frame number mismatch in adjacent frames") about the flac files used. Reporter should first reproduce the issue with flag/ogg without these issues. I doubt it has anything to do with caching: it's just a coincidence it works when disabling caching (caching tends to eg. handle corruption (overreading etc.) slightly different).

HeresJonny commented 3 years ago

@DaVukovic CoreELEC, does that count?

DaveTBlake commented 3 years ago

Thanks @arnova I'll see if the user can confirm your hypothesis, or come back with more info. I didn't expect you to be able to look at this so quickly.

CoreELEC, does that count?

No @HeresJonny , CoreELEC is not the same as LibreElec (even if original code was based on it)

github-actions[bot] commented 1 month ago

This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.