PDA

View Full Version : Adaptive caching for high bitrate material


mpw222
2009-02-08, 19:04
Once in a while I get pauses in high bitrate (Blu-Ray remuxes, 40mbps or so) due to a delayed response from my file server. While I'd like to figure out what's causing this, I thought that xbmc should be able to handle this on the player side as well by caching more than the current 2MB default or 16MB max for network files.

My idea is that you could set up 2 caching values, one would be the minimum to start playback. After playback started, xbmc could continue to read ahead in the file until it hit a much larger cache value. With 2GB of memory costing next to nothing these days, being able to use up to 256MB or 512MB of it to ensure smooth playback in the event of network congestion or load on whatever is serving files doesn't seem crazy. It might make sense to make this value adaptive - cache the next 30 seconds of data based on the current bitrate.

I imagine the 16MB limit now has something to do with the limited amount of memory on an xbox, so this feature would only be for the Linux/Mac/Win versions.

dmidi
2009-02-08, 21:11
Caching a file off the local HDD would allow the HDD to spin down during playback...

1 GB+ cache would be appropriate...

empty
2009-02-08, 21:13
oh this would be a very nice feature!

Freddo
2009-02-08, 22:19
I don't think dvdplayer even uses the cache settings from the gui right now does it?

bob_loblaw
2009-04-29, 15:37
I agree, this seems like it'd be a useful feature (not that I can even find the cache settings in XBMC for Windows!). A good example is how Youtube loads the videos, though it loads the whole thing into memory.

A smart system would see how much memory it's using to playback the current streams and allocate a percentage of available, unused memory for this caching.

mpw222
2009-04-30, 16:53
I think the cache settings have been removed from the GUI, and I'm not totally sure they were even working before. I still get pauses on high bitrate stuff, though they aren't as common any more. Switching from XP to Win7 and using a gigabit connection both seemed to cut down, but not eliminate them.

In a normal SMB file transfer, I can hit about 500mbps sustained between my server and htpc, so getting playback problems on content that is less that 1/10 that bitrate seems wrong. I've tried watching performance counters on the server and there is nothing spiking disk or network activity until after the pause actually happens and xbmc scrambles to replenish its cache.