Regular buffer timeout issues on tablet - LAN video source
#1
I'm having issues with playing videos on my tablet - Samsung Galaxy Tab A8 (SM-X200), 4GB Ram, Android 13.

All this relates to playing videos stored in my local network, not any streaming from the internet.
At first there were occasional buffer issues with 1080p videos, where the video stopped, the loading circle appeared and on top it showed the "buffering... x%". This could take up to several dozen seconds with the percentage sometimes fluctuating back and forth until it would continue. 

Then there's another phenomenon, where the video also stops for a few frames and then continues - by speeding up the missed out seconds - without showing the "buffering" message. This applies to 720p as well. This is what I mostly experience at the moment. The aforementioned buffering with the loading circle seems less/gone with higher memorysize in advanced settings.

I think this part of the log (full log here) refers to those issues. This can happen several times in a minute and then it's fine for an hour. Sometimes it might not happen at all. I couldn't find a common denominator for files where this happens and where it doesn't.
Code:
2024-03-10 16:28:35.908 T:26002 error <general>: CMediaCodecVideoBuffer::ReleaseOutputBuffer error in render(false)
2024-03-10 16:28:57.842 T:25961 info <general>: Skipped 2 duplicate messages..
2024-03-10 16:28:57.842 T:25961 info <general>: CAndroidUtils: Preferred refresh rate: 60.000000
2024-03-10 16:28:57.842 T:25961 info <general>: CAndroidUtils: Current resolution: 1920x1200 1920x1200 @ 60.000000 - Full Screen
2024-03-10 16:30:25.205 T:26471 warning <general>: OutputPicture - timeout waiting for buffer
2024-03-10 16:30:37.367 T:26471 info <general>: Skipped 5 duplicate messages..
2024-03-10 16:30:37.367 T:26471 warning <general>: OutputPicture - timeout waiting for buffer
2024-03-10 16:32:20.296 T:26471 info <general>: Skipped 3 duplicate messages..
2024-03-10 16:32:20.296 T:26471 warning <general>: OutputPicture - timeout waiting for buffer
2024-03-10 16:33:21.524 T:26002 info <general>: Skipped 22 duplicate messages..
As you can see, this happened 30 times within three minutes.

I played a lot with the advanced settings, currently using
 
Code:
<buffermode>4</buffermode>
<memorysize>768000000</memorysize>
<readfactor>10</readfactor>
This is a bit extreme, but I went from low memory of just ~256mb with readfactor of 100 (onehundred) to more balanced values or lower/upper extremes at the same time. Nothing really solves it.

To my entire setup... the files are stored on my little home server (Win8-x64) thats connected via 1GBit LAN to the router. The files are shared as nfs-links via haneWIN NFS. I did this back in the day, when I had issues playing BluRay Remuxes with Kodi on my first RaspberryPi (1. gen - 100mbit LAN), when sharing via smb and this completely solved it and I never had any issues ever since.

The tablet is connected via Wifi-5G to the router with short distance to it. 2.4G and 5G channels are separated to guarantee it uses 5G.
There aren't many apps running in the background, I use it to watch videos while in the kitchen or to read ebooks and nothing else. I can stream youtube or twitch streams in 1080p-60 without any issues, which go up to 8mbit/s.

While surely x264 would have higher peaks, the readfactor and large memory should allow generously to compensate for those higher demands, at least in theory.
I regularily restart the tablet and clear the Kodi cache, but to no effect.

The tablet might not be top of the line, but I don't see why it would struggle with those issues in terms of processing power.
With the wifi I don't think I can improve anything, at least not in conventional ways. I already put the tablet on realtime-prioritization in the router settings, but I doubt that has much influence in the local network. Also there's no other devices active that would be able to hog the bandwidth.


I'm running out of ideas and hope, some of you might have experienced - and solved - this.
I know haneWin has some settings for chunk sizes or so, but I didn't play around with that yet, or know what I should try.
In the end I don't even know what the bottleneck is. Is it the wifi? The tablet? Kodi's buffer management?

If anyone can help, I'd greatly appreciate it.

Best regards,
Photo
Reply
#2
I would highly recommend testing HTTP / WebDAV as a source for low-end device

1. First run iperf3 server on Windows and iperf3 Android app to determine your actual WiFi capabilities
2. Remove all advanced settings tweaks
3. Download and run test server https://github.com/SegHaxx/ezhttpd/releases (https://forum.kodi.tv/showthread.php?tid=352312)
4. Serve and test Jellyfish samples to determine what you can really play without playback issues http://www.larmoire.info/jellyfish/
Reply
#3
Reply
#4
Extremelly late reply, wasn't able to take care of this.
Thank you so much for the advice, after some fiddling around this worked brilliantly.
Tried the jellyfish samples and while I get the 20-mbps sample to barely buffer properly, via http I had no truble to run the 110-mbps sample, if read factor in cache settings is set to 20x.
Just want to leave this comment for posterity, should anyone stumble upon this issue and needs an easy solution.

I have several drives, but ezhttpd only supports one source folder. Symbolic links don't seem to be supported in kodi, unless they are on the device running it, so this makes it slightly complicated.

To solve this I used NSSM - which allows to install any program as a service - and then run the program in parallel with a different port for each drive. So D: has port 9000, E: 9001, etc.
Since the program is extremely lightweight, this doesn't seem to be much of a problem.

Unpack ezhttpd and nssm in a suitable folder. Open the console as admin, run nssm as 
Code:
nssm.exe install desiredServiceName
Image
You'll get this UI. Just set the path and start dir to ezhttpd.exe, as argument you add
Code:
-bind ":9000" E:\
Note the colon before the port number, after that your source path. Install service and done.
To add another drive, just repeat all that and use a different port number.

The services are installed stopped and will start automatically after the next restart. So no manually starting the shares, but have it run without logging in first.
Just make sure to run ezhttp once without parameters, so it asks for an exception in the firewall, otherwise you won't get access for the services.
Reply

Logout Mark Read Team Forum Stats Members Help
Regular buffer timeout issues on tablet - LAN video source0