Sponsored Links:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buffering: The cause and solution
#1
What Causes Buffering (Stop/Start Video Playback)
If you're encountering stop/start buffering problems with your video playback it could be any number of problems, I would highly recommend watching the video at the bottom of this post as that will explain in greater detail but the most common issues are summarised below:

1) Servers are overwhelmed: This is probably the most common problem users encounter. Just like your home internet connection where you're limited to a certain speed at what data can be transferred you'll find the servers that host any online content have to abide by similar standards. If you're trying to stream a video from a server that has 10,000 other people also trying to access content on it then the speed that video can physically reach you will be much slower than if just 100 people were using that server. Remember MANY videos will be hosted on the same server, just because you pick a video that might not necessarily be that popular that's not to say it's not on the same server as some very popular videos that everyone wants to watch - every video on this server will be affected by the amount of users accessing the server. Peak times (especially weekends) are when the majority of users struggle with buffering and this is simply down to demand, too many users wanting to access the servers all at once. The easiest way to find out whether or not the server is the problem is start the playback and then press 'o' on your keyboard, this will display a lot of text at the top of the sceen. Don't worry it looks confusing but you just need to take a look at the bit at the bottom that mentions cache, if this keeps falling to zero then the servers are getting hammered and you'll have to find another source to use. Another option is to download the video and watch at a later date or there is a great little workaround which you'll see at the bottom of this post.

2) Check your download speed: If you want to successfully watch an SD stream then a minimum of 2mbps download speed is recommended (you may get away with a bit less depending on the stream quality), if you want to stream any HD content then it will be considerably more. It really all depends on the quality of the stream, as a very rough guide a low quality stream (based on a 40 minute TV episode) could be as little as 150MB but the same one in HD could be anything up to 100x that number! Go to http://www.speedtest.net and run the speed test to see what download speed you're getting, if it's showing a lower figure than you expected then it may well be your router...

3) Reset the router: If you're using the router supplied by your ISP there's a good chance it's the cheapest one they could find and these are prone to playing up! Quite often you'll find cheap routers need a reset so if you're getting low speeds unplug your router at the mains for 1 minute and then plug it back in and give it a minute to reconfigure, run the speedtest again and see if you've got any speed increases.

4) Check for other processes running on your network: Remember whatever download speed you have is shared between anyone using the same connection, if someone else in the household is playing a game with their friends on Xbox Live then this will lower the speed you can get, the same goes with anyone streaming content in another room. Downloads (especially torrents) can use up a lot of bandwidth, if you're having issues then consider pausing them or setting the download speed much lower.

5) Wi-Fi: If you intend to use XBMC for accessing online streams then it's highly recommended to use a wired connection rather than wireless, this is especially true when watching live streams as you only need one dropped packet and the stream will stop. Some units have very good Wi-Fi antennas but most don't, if you're struggling with your Wi-Fi connectivity then you may want to consider homeplugs (sometimes referred to as powerline adapters, although that's a brand much like Hoover/vacuum cleaner). These give the feel of wireless as you have no long wires around the house but they are actually wired, they are little adaptors that plug into your mains socket and convert your mains circuit into a local network. These are very simple to use and if you shop online you can pick them up very cheaply, certainly in the UK you can get a twin pack for around �20 however as with anything there are good and bad makes so do your homework. It's not advisable to use these if you live in shared accommodation such as apartment blocks that use the same mains circuit, anyone on the same mains circuit can simply plug an adaptor in their mains socket and will be using your internet connection.

6) I ABSOLUTELY have to use Wi-Fi but can't use homeplugs: If you absolutely have to use Wi-Fi then the only thing you can do is make sure you have a good quality router and the higher you place it the better the signal (in theory!). If you have an XBMC device with an internal Wi-Fi antenna and the signal is weak you may want to consider modifying it so the antenna is external. Devices that have internal antennas can be prone to interference from other internal components and this is especially true if using little Android TV Sticks - some manufacturers seem to think it's a good idea to have the antenna next to the HDMI connector... it's not!

7) Hardware specific: The stop/start buffering effect may have absolutely nothing to do with your internet speed and it may be hardware related, unfortunately the only real way of finding a solution is doing lots of research - google is your friend! Some hardware (especially android) may be sold as being 1080p compatible and that may well be the case, however that doesn't mean XBMC can play 1080p content on that device, in fact it may even struggle with 720p! Things have certainly got much better since the release of XBMC v.13 (Gotham) and there is much greater compatibility with all the different android chipsets but there's still plenty out there that either need special builds, tweaks or simply aren't capable of delivering HD content via XBMC at all. Remember when buying any hardware always check our compatibility thread and hardware section before making that all important decision, if you can't find any information feel free to ask and someone may be able to advise. If you're using very dated devices such as the ATV1 or Xbox they aren't able to output at 1080p as they just don't have the necessary hardware for it.

8 ) ISP Restrictions/Throttling: This is becoming more and more common with ISP's (especially in the UK). ISP's are being made to block certain sites, these are generally the more reliable ones when it comes to streaming so you may end up only being able to find a working link for one of the less reliable hosts. They may also throttle your bandwidth when you try and access certain sites. The solution for this is either switch ISP (although there's no guarantee your new ISP won't do exactly the same) or you could get a VPN which makes your browsing completely anonymous to your ISP. There is a great VPN solution that integrates directly into XBMC/Kodi, you can find out more information at http://www.vpnicity.com


Is there a fix for buffering?
Unfortunately there really is no magic fix for things that are out of Kodi's control, however there is a nice little tweak you can make Smile. Kodi is very customisable and there's a text file the user can create called advancedsettings.xml - you can create lots of cool bespoke settings in here and they will override the defaults, for this guide we're only interested in one setting... cachemembuffersize. By default Kodi will cache to RAM and for the most part this is great as RAM is designed for this sort of work and it's very fast but there's one big drawback and that is you're limited to the amount of video footage you can cache. Using your RAM for the cache will only allow you to store a few minutes worth at a time so if the servers are slow the cache will quickly empty and then you'll have to wait for the next part to download before playback will begin again.

If we set the cache buffer to zero that tells Kodi to cache video to the storage device Kodi is installed to (traditionally a hard-drive) rather than RAM. This is particularly useful if you're using a PC, Xbox, Raspberry Pi or any other device with storage that has plenty of space. DO NOT use this if your Kodi install is located on an SD card or you're using a set-top box/stick - there's a very high chance it will corrupt. Although it's not a magic fix for slow servers or slow download speeds what this will do is allow you to pause playback, go and make a cuppa tea and then come back 5 minutes later to find you've got lots of video downloaded in your cache ready to play. If you leave it long enough it will cache the whole video meaning absolutely no chance of buffering problems at all. If you press 'o' during playback Kodi will show a whole load of text at the top, you can ignore most of that as all we're interested in is the cache - it should say "MB" and that should continue increasing the longer the stream is paused. You can use that as a good guide, personally if there's a slow server I'm trying to use I try to let it get to about 60MB before resuming playback and the cache will gradually decrease but normally that's enough to get through a whole episode of something. If it's a particularly slow server you'll be able to see by how long it takes to get the cache up to a decent number, if it's taking far too long try and find another source unless you're willing to wait for the whole thing to cache. Below are 3 frequently asked questions:

FAQ 1: Can I cache to a hard-drive that Kodi isn't installed on? No, you can currently only cache to the device Kodi is installed on.

FAQ 2: How do I delete cache? Cache is automatically deleted once playback has stopped, there is no need to manually delete.

FAQ 3: Why isn't this enabled by default? Caching to your storage device will cause much more of a strain on your HDD (or whatever your storage device is) as it will constantly be in use when streaming videos. This is a risk and only you can make the decision on whether or not it's worth taking. Will it decrease the life of the device? Almost certainly. How much will it decrease the life by? As of yet I've not encountered any problems at all when using with devices that use mechanical 3.5" hard-drives but I have had some Android devices slowly die - is that the advancedsetting.xml or something else causing it? Who knows but it would make sense it's the advancedsettings that does this - using "wizards" will also have a similar affect and will slowly kill your device too.

The simplest way to install the advancedsettings.xml file is to use file manager and navigate to your noobsandnerds source you added when you installed the CP add-on and in there you'll see a section called Tweaks, copy the relevant xml file to your profile directory (video below explains this in greater depth). If you've installed the Community Portal add-on then you should already have the .portal source added but if you haven't it's http://noobsandnerds.com/portal.

Note: The video tells you to add whufclee as a source,  ignore that you should be using the source mentioned above.

https://www.youtube.com/watch?v=5V6cZ9p045w
WANT EARLY DEVELOPMENT RELEASE ACCESS?
All users who've helped out with a donation can now gain early access to the
latest test versions of add-ons, often weeks or months ahead of the public stable releases.

[Image: 11i3ihd.jpg]
  Reply
Sponsored Links:
#2
Can anyone help me please. I've brought a gbox midnight and it is fine but occasionally it keeps buffering. is there an answer to it. I am running it from an ethernet cable because I was told it would run better
  Reply
#3
Please read this post which will explain why it happens and how to fix (or at least minimise the risks from happening).
WANT EARLY DEVELOPMENT RELEASE ACCESS?
All users who've helped out with a donation can now gain early access to the
latest test versions of add-ons, often weeks or months ahead of the public stable releases.

[Image: 11i3ihd.jpg]
  Reply
#4
A pointer for hardware specific buffering issues. After setting xbmc to cache to HDD on a Windows 8.1 laptop I still had buffering issues with live streams, they would buffer every 1-2 minutes and when playback resumed I would lose part of the show. Google led me to reset virtual memory page file size and buffering issues now much much better I watched a 30 minute show it buffered once at the beginning then played non-stop through to the end.  :icon_thumright:
  Reply
#5
I have Followed the above in the hdd folder it has various advanced xml to choose from compared to the video. Which is the best one ? What is different with them all? Thanks
  Reply
#6
Hi

Trying to understand the whole caching thing, specifically in relation to my TR MK1.  Last night I was getting a bit of buffering "issues" - possibly  slow/busy server so I paused the stream and pressed O so I could see the video codec information overlay and see the size of the buffer.  The one thing I observed is that, as expected, whilst the stream was paused the buffer cache % increased and also the total MB  of the cache also increased in size.  It seemed that the maximum MB before the cache achieved 100% capacity was 20MB total, however long I was paused this was the amount of MB the cache would hold and would not go beyond this.  I may not be interpreting the information correctly but for the TR Mk1 is the maximum size of the cache 20MB?  Does this size of cache sound correct?  I just imagined, rightly or wrongly, I would be able to cache a greater MB size.  When the cache achieved 100% capacity (20MB?) even then a couple times during viewing the stream the cache got depleted, again I'm guessing the server being slow/busy, meaning playback got interrupted / paused.

For anyone reading this post this link maybe useful/relevant

http://kodi.wiki/view/Codecinfo
Kit: TR Mk1
Firmware: Finless Bobs ROM
  Reply
#7
Yes spcdust your right the default cache is 20 MB so Kodi/xbmc is behaving as expected.

Read this.
http://kodi.wiki/view/HOW-TO:Modify_the_video_cache

I've spoken about advanced settings to much in other forums, but this is just a heads up to anyone using Gotham or Helix.--

Don't forget to add the readbufferfactor  line to your advanced settings. This feature was added in V13 "Gotham", by default it is set to 1 this means xbmc/kodi will only just cache enough to playback your stream, it's worked out based on the bit rate of the stream you are playing at the time. They added this to stop xbmc maxing out your internet bandwidth. This is fine if you are streaming on a Lan set-up.
Trouble is if you are watching  a internet based stream from free source you want to make sure your cache fills up as quick as it can (so what if the wife can't watch iPlayer in the other room)

Anyway Frodo used to do this. Gotham doesn't, so if your having problems and your wondering why Gotham doesn't fill the buffer as well as Frodo did, I would recommend raising readbufferfactor  to around 10 or above. For more information read the examples in the link I posted above.

Quote: <readbufferfactor>10</readbufferfactor>
Requires XBMC v13.0 or higher
Increase the fill-rate of the cache
By default (value: 1), XBMC will only fill the cache a little above what is needed to play it back. It does this as to not max out your network and possibly max out some hardware. For most users and hardware, this setting shouldn't cause any issues, but be aware of it if you have unusual CPU spikes in your HTPC.

The value of this setting is a multiplier of the default limit. If XBMC is loading a typical bluray raw file at 36 Mbit/s, then a value of 2 will need at least 72 Mbit/s of network bandwidth. However, unlike with the RAM setting, you can safely increase this value however high you want, and XBMC won't crash. Just know that it might cause XBMC to attempt to use all available bandwidth on your HTPC during playback.
  Reply
#8
Great info here, really helps and I've found streams start quicker.
  Reply
#9
Pressing o brings up cache info how do we do it on android just with standard remote eg trmk1 box.
  Reply
#10
You would have to map a button especially for that, use the keymap editor addon and that will allow you to assign any function to any button. Just remember to click save once you're done and reboot to take effect.
WANT EARLY DEVELOPMENT RELEASE ACCESS?
All users who've helped out with a donation can now gain early access to the
latest test versions of add-ons, often weeks or months ahead of the public stable releases.

[Image: 11i3ihd.jpg]
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  pre buffering maddp777 5 483 07-21-2016, 08:42 AM
Last Post: maddp777
  Buffering HD on XBMC liam-909 0 1,681 Less than 1 minute ago
Last Post:
  Buffering issue rainman287 0 526 Less than 1 minute ago
Last Post:
  Cache/buffering mikeystipe 0 422 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)