Kodi Community Forum
Videos in certain SMB folders suddenly all report wrong (but same) length. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Videos in certain SMB folders suddenly all report wrong (but same) length. (/showthread.php?tid=370345)



Videos in certain SMB folders suddenly all report wrong (but same) length. - Imagr8m8 - 2022-11-11

It SEEMS like there's some old or corrupted cache that needs to be fixed or deleted.

This is challenging to explain & typed while doing additional troubleshooting...trying to give complete info..so bear with me.

Videos all reside on multiple USB drives on 2 Win10 'Servers'. Many KODI 19.4 Android boxes used as players thru local gigabit ethernet..some fairly direct thru an unmanaged switches..some a bit 'farther' thru the main Ethernet router. Issue now exists on 2 different Android boxes...but happened weeks apart...possibly due to power failures or improper shut-down.

At first, only noticed on one android box in one smb folder..then happened on 2nd box in different different smb folder...and a few weeks later on that 2nd box in same folder as 1st box. (Mysteriously, after many months, the issue seems to have self-resolved on 1st affected Android box in that common folder)

ISSUE: In those certain folders only, all videos shorter than a certain length report the same, wrong length..ie: On one Android box a 15min video or 21 min video all show a length of 24:51 when playing. Videos longer than 24:51 seem to show correct length. Many weeks later, in another smb folder, all videos (mostly 02-60min videos) suddenly report length of 7:54:05. On two different affected KODI boxes, that 'wrong' length is different for the same video..one reports 24:51, the other 58.05, when browsing the same affected smb folder. In all cases, affected videos take longer than expected to start playing, short skip seems unaffected, but long skip takes longer than expected to execute or just exits the video (likely due to confusing length). Player continues to (wrong) reported length with blank screen until selecting skip or stop. Playback of videos longer than the 'wrong' reported length are unaffected.

These same video files report proper length & play without any issue on other KODI 19.4 boxes on the network. The videos themselves were not edited & report/play correct length on the server. If I move the files to different folder on same smb drive (even a nested folder), affected boxes report correct length & play/skip these videos correctly. KODI Log file shows MANY sequential cFileCache::Open errors (including many folders & files that have LONG-since been moved/deleted)..but nothing obvious about the file last played. OpenWizard->ClearCaches didn't fix the issue or log errors.

To be clear, this is not regarding LIBRARY..files are played by browsing to smb folder (ie: SERVER-01/Media-05/Videos-New)..these folders are specifically excluded from any library scans. There are no .nfo files in the folder...just mp4, mkv, avi, etc, subfolders and sometimes a few jpg, rtf or txt files.  Restarting KODI has no affect..once it happens to a certain folder on a certain box, it persists thru restarts & reboots, while other folders continue unaffected. Admittedly, at least some of these folders can be quite large w/1000+ files..and in some cases, are very dynamic folders with 100s of files moving in and out during the week..but problem persists in that folder on that box even after emptying the problem folder..any file again in that affected folder (new or previously there) reports wrong length on that KODI box while being fine on another KODI box.

These smb drives & folders are organized & named in specific ways to be useful on ALL machines, software & projects on the network..but it COULD be suspicious that the folders in questions seem to be the more dynamic folders with files moving in and out & getting renamed all day long on the Server...before being previewed & eventually moved to their more permanent (less dynamic) folder.

I'm at a loss for resolution or more troubleshooting. Using OpenWizard, I've tried deleting caches..but not yet "databases" since I'd like to preserve Watched Status on each KODI box. I've tried changing min & max Settings->SMBversion..currently SMBv3. Since I don't even scan these files into Library and don't use .nfo files, I don't really know where the false length is coming from. Since bigger folders take notably longer to enumerate, and I can see the total play length rapidly count-up just after folder contents are displayed, it would seem that video length is determined each time the folder is browsed. But its notably suspicious that the short videos all show the same, wrong, longer length...not some random, wrong length.

Is there some other setting or database I can change/delete to try fixing this on affected KODI boxes? ...if possible WITHOUT loosing watched status. I'm no KODI or Android expert, but have some experience to browse, change and delete files within the Android KODI install if I need to dig that deep.


RE: Videos in certain SMB folders suddenly all report wrong (but same) length. - Dangelus - 2022-11-11

If you have things such as “Openwizard” installed then we can’t help you. As per the Forum Rules you would need to remove any Banned Add-ons (wiki) such as the aforementioned wizard from your system first.

If you’re willing to follow those steps then please provide a link to your Debug Log once you have done so capturing examples of the issue you are having.


RE: Videos in certain SMB folders suddenly all report wrong (but same) length. - Imagr8m8 - 2022-11-11

Updates as I try them:
Exiting KODI & clearing KODI cache in Android->Settings didn't resolve the issue.


RE: Videos in certain SMB folders suddenly all report wrong (but same) length. - Imagr8m8 - 2022-11-11

No problem removing OpenWizard...only installed it to clear cache after researching this issue before.


RE: Videos in certain SMB folders suddenly all report wrong (but same) length. - Lakmir - 2024-03-24

Okay, I know this thread is more than a year old, but I stumbled upon it when having the same issue myself. I turned on debug logging and component logging for a handful of things (including audio and video), and I think I figured it out -- the video player was picking up a couple of errant MP3s that had found their way into the directory in the smb share, and was using them for optional external audio. Since the MP3s had longer audio than the videos being played, the duration shown in the video player ended up being that of one of the MP3 files, even though the video being played was much shorter. Moving the MP3s into another folder resolved the issue completely.

Hope that helps!