Xbmc network

Almost all of the videos that I watch on XBMC are streaming over the network from a central computer. While the idea sounds great that means that my home network becomes yet another component that can lead to performance issues in XBMC. I’m going to share my experiences so that you can get your system working smoothly with as little effort as possible.

Where’s the Bottleneck?

Do you know where your performance bottleneck is? It could be a wide array of things that could be causing your problems, and you need to take whatever steps you can to pinpoint the bottleneck.

For starters if you’re trying to stream a video over the network and have issues playing it back maybe you should move the video to the local storage on your system to see if you still have problems with playback. This helps determine whether the underlying issue has to do with your network or something on the machine itself. If it appears that the network is your issue then that leads to the question of whether you’re doing this over wireless or not? If you are using wireless and you’re getting a lot of buffering then the problem may be as straightforward as not having enough bandwidth for streaming the videos over your network. If your network is wired (like mine) and you’re sure the performance is good enough you can continue on with the remaining tips in this guide to see if they help.

Video Card Memory:

XBMC tries to take advantage of GPU hardware acceleration wherever it can, and for that reason the video card performance of your system is very important. For my particular setup I don’t have a dedicated video card, and so that means my video card steals its memory from the amount of RAM installed on my system.

In my particular case I have 4GB of RAM available, and by default my motherboard tried to automatically detect the amount of memory that should be shared with the video card. It somehow determined that 256MB was the appropriate amount, but it also didn’t know the purpose of the machine. So I took the liberty of manually doubling this from the 256MB to the maximum value of 512MB. In general this change alone led to much smoother playback.

If you are using the same motherboard as me (ASRock E350M1) you can change this setting in the BIOS/UEFI. While booting up go into your BIOS/UEFI settings, and then navigate to Advanced -> North Bridge Configuration -> Share Memory and set it to the max which should be 512MB.

Increase the XBMC Buffer Cache:

The cachemembuffersize in XBMC is the amount of bytes of memory used for buffering ahead in videos. They do warn, however, that XBMC will consume three times the amount of RAM than what is specified for this setting. So the default 5242880 bytes (= 5MB) is on the low side to ensure they don’t stress out your system too much. Since my system is dedicated solely for XBMC I had no qualms bumping this up to 524288000 bytes (= 500MB) given that I have 4GB of RAM on my machine. Something more conservative, however, might be 52428800 bytes (= 50MB).

How do you update the buffer amount? First close out of XBMC, and then navigate to your profile folder:

  • Mac: ~/Library/Application Support/XBMC/userdata/
  • Windows: %appdata%\XBMC\userdata\

Once in your profile directory find and open up the advancedsettings.xml file, or create the file if it doesn’t already exist. Then you’ll want to add this node to the file:

<network>
<cachemembuffersize>5242880</cachemembuffersize>
</network>

The cachemembuffersize is set to the default 5MB so you will still need to update that after pasting it in. After you have updated the advancedsettings.xml file and saved the changes you can open up XBMC to see if your video playback has improved at all.

Update Your Drivers:

When streaming videos over the network my XBMC log would frequently throw an error saying:

CDVDMessageQueue(video)::Get – asked for new data packet, with nothing available

As it turns out my biggest performance problem was an issue with drivers. Naturally you’d think that I’m talking about video card drivers (which are important as well), but I’m not. The drivers that were ultimately causing issues with my setup were the LAN drivers. I was using the drivers recommended by ASRock, my motherboard manufacturer, when in reality I should have turned to the manufacturer of the network card… Realtek.

I jumped over to the Realtek site only to see that the network drivers ASRock were dishing out on their site were over a year old. I downloaded the most recent drivers directly from Realtek, and astonishingly all of my stuttering/buffering/choppiness issues went away.

Still Have Issues:

Don’t give up. If you’re still having issues you can try dropping a comment here, and I’ll do my best to help out. The XBMC forums might be a better location to reach out though since many of the developers are also active in the forums.

CyberNet’s XBMC Guides:

There Are 33 Comments

  1. Great tips! Thanks for all of these articles.

    • No problem… I’m just happy giving back to the XBMC community for all the time the developers have put into making such a great program. I also noticed someone linking to one of my guides already in their forum which is nice to see. :)

  2. thanks! buffer thing is super useful on an unreliable wireless.

  3. Hey, I’m kinda new to xbmc so bear with me. Im streaming video from my server to my htpc over gigabit Ethernet. I had no issues for about 3 years using vlc and windows explorer to play all of my files. Trying to use xbmc and having buffering issues. I tried moving the file locally and NO issues playing in xbmc. Tried to take your advice and update the lan card but the mobo is an older crap model and i cant find updated drivers. Vlc however will play the same files from the same computers with no issues and no buffereing problems. I even tried increasing the buffer size with the xml file but i dont think it applies to me because i have a dedicated gpu, radeon 4600 series. Where am i going wrong?

  4. it is from a windows server (raid 5)to a win 7 box. the drives are maped on the htpc and show up in the list when i go to add sources to the library. I have the log if that helps.

    • Here is a snip-it from the log file. noticed that in the first line there was a problem loading the modified advancedsettings.xml, maybe I did something wrong there?
      In the meantime I decided to get a PCI-E add in NIC to solve the driver issue with the on board NIC.

      Any help would be greatly appreciated.

      22:24:08 T:840 ERROR: Error loading special://profile/advancedsettings.xml, no node

      .
      .
      .
      .
      .
      22:25:44 T:3036 WARNING: CDVDMessageQueue(audio)::Get – asked for new data packet, with nothing available
      22:25:46 T:2104 WARNING: Previous line repeats 2 times.
      22:25:46 T:2104 WARNING: CDVDMessageQueue(video)::Get – asked for new data packet, with nothing available
      22:26:11 T:3036 WARNING: CDVDMessageQueue(audio)::Get – asked for new data packet, with nothing available
      22:26:12 T:2104 WARNING: Previous line repeats 1 times.
      22:26:12 T:2104 WARNING: CDVDMessageQueue(video)::Get – asked for new data packet, with nothing available
      22:26:12 T:840 WARNING: CWin32DirectSound::GetSpace – buffer underrun – W:194688, P:177408, O:185760.
      22:27:32 T:3036 WARNING: CDVDMessageQueue(audio)::Get – asked for new data packet, with nothing available
      22:28:20 T:2104 WARNING: Previous line repeats 7 times.
      22:28:20 T:2104 WARNING: CDVDMessageQueue(video)::Get – asked for new data packet, with nothing available
      22:28:21 T:2104 WARNING: CRenderManager::FlipPage – timeout waiting for flip to complete
      22:28:21 T:840 WARNING: DXVA::CProcessor::Render – did not find all required samples, adjusting the sample array.
      22:28:21 T:840 WARNING: DXVA::CProcessor::Render – no usable samples.
      22:28:21 T:840 WARNING: DXVA::CProcessor::Render – did not find all required samples, adjusting the sample array.
      22:28:21 T:840 WARNING: DXVA::CProcessor::Render – no usable samples.

    • It sounds like it’s not reading your advancedsettings file then, which may explain why the buffer had absolutely no impact. Have you checked the layout to make sure it is structured like this:

      <advancedsettings>
      <setting>value</setting>

      <setting>value</setting>
      </advancedsettings>

    • I will check that out. But since writing my original post I think I figured out my problem. In order to have seamless playback with no buffer issues I had to leave my server on overnight meaning not turn it off ever. Now that I leave it on all the time I don’t have playback issues.

  5. Holy crap! I have been at this for MONTHS now trying to get my XBMC back on my ATV2. The NIC driver update was my issue. Thank you SO MUCH. My subsonic is working 1000% better now too…

  6. I’ve been having major problems streaming from my hardwired NAS to XMBC and found a great solution by ditching XBMC and installing the latest version of ATV Flash (Black) version 2.0. The install took 2 minutes from my PC over wireless network and as much as I love XBMC’s free, open source solution it’s just not a patch on Black 2.0 My HD movies play flawlessly and the music library is simply superb. Highly, highly reccommended!

  7. I just built a mini-ITX HTPC using the ASRock 75M-ITX MB and the AMD A6 3500. Had the buffering issue in XBMC last night and creating the advanced settings xml file seemed to help though I did get the buffering issue after an hour and 15 minutes into a move instead of every 15 minutes.

    Any danger to increasing the North Bridge cache to 512MB? It’s on auto currently. Running Windows 8 as well.

    • I would try bumping it up to see if there is any performance increase. I would also make sure all of your drivers are up-to-date, and try playing the file locally to see if the issue still exists or whether the problem is just with network streaming.

  8. Thanks. The streaming I was doing was a movie via an XBMC repo and not something I had stored on my network.

    Haven’t tried anything since adjusting the North Bridge cache but will tonight.

    I also want to be able to play games from time to time so I don’t want this change to make it overheat or blow up completely. Nothing super graphic intensive. Just N64 emulators for the kids and maybe something like TF2 for me.

  9. Oh and I do need to check the LAN drivers. Could just be a router issue but when I was downloading TF2 on Steam I was only getting 5-7 down. Resetting my router got me up to 50 on speedtest on another PC but I had shut this one down by then.

  10. I have Microsoft 7, 64 bit operating system with which used to have a DivX system loaded. Together, the systems worked perfect for DVD’s and downloaded movies and YOU TUBE movies and video’s – that is until DivX was sold in 2010. Since about October, 2010, all movies (even Netflix) began to “BLACK-OUT” – then all that crap followed about Flashplayer IE9 malfunction to make everything worse.

    In 2011, I finally tracked the video streaming problem to DivX. “Jeremy Parks” said DivX was bought out and within 4 months, deliberately deleted the codex/converter that made DivX work with all the movies (which had been previously sold as part of the package that made DVD’s and YOUTUBE movies movies play right).

    Since they disconnected that codex/converter, all DVD’s, all YOUTUBE MOVIES and 50% of the YOU TUBE MUSIC VIDEO’S are nearly completely BLACKED OUT ! ! !

    I have updated all video cards, drivers and software of every kind to the latest 64 bit compatibility including the newest piece of shit FlashPlayer with no positive results.

    SOLUTION ? ? ?

  11. Set buffer to 0 if y have wired connection. Works like a charm.(You need at least 100Mb for Blu-Ray streaming)

  12. I’m using OpenElec with a Zotac board on a CAT5e network, and had no problems until a lightning strike fried the NIC. I am now using a cheap generic USB Ethernet adapter, which works well on most SD films and TV series, but certain HD films (.mkv, various codecs) are buffering regularly.

    All movies are on a Dell server running Ubuntu, with only 2GB RAM, but the only thing I can think of here is that I recently migrated to 3TB WD Green Hard drives – I don’t imagine these could be the issue, but perhaps worth mentioning.

    Is it likely that this is caused by limitations from the USB Ethernet adapter?

    Many thanks

    • If it’s just USB 2.0 that could potentially be the issue, but USB 2.0 should be able to get to 35 MB/s (theoretically) which should be more than enough for the transfer. So it could just be a driver issue.

  13. Using NFS instead of SMB solved the issue with my 33Mbps encoded mkv buffering

  14. Thank you so much. Updating my Realtek 8168 LAN driver fixed my buffering issues.

  15. After updating the driver none of network shares will work anymore. On the Windows side unshare and reshare any folders you had previously used with XBMC. You’re welcome.

  16. Just wanted to say “thanks”. I recently installed XBMC on my Acer desktop and an older Toshiba Satellite laptop connected to my tv. Worked great with streaming video on the Acer, but had frequent buffering issues with the laptop. I updated all the drivers on the laptop and problem solved. I use my desktop as a file server for 2 Surfaces and an ipad and everything works well, except when I’m downloading. So I download when I’m sleeping!!! Thanks again.

  17. Hallo, i uploaded a video tutorial about how to increase performance for games/softwares in windows 7 in 1080p! watch and enjoy :)

    [youtube.com]

  18. Hi. I am not very experienced with computers but I have built myself an ITX based HTPC running win 7 and XBMC (Frodo). It works great in every way except one. It wont stream from Amazon. It streams from everywhere else, just not Amazon Prime. I read about updating the librtmp.dll file, and did that. It made no difference. If I close XBMC and go to a browser window I can use Amazon fine and it plays beautifully. In XBMC I can go into Amazon, search, browse etc. It just wont play. Is there anything you can think of ? If you have time to help I would be grateful. If you require any log files you will need to explain how to generate them :-) Cheers.

  19. Hi, I cant seem to shift buffering problems.

    I’m running a AMD A4 5300 HD7480D APU with 4gb ram and getting write speeds of 55meg from NAS to HTPC. I’m on Win8 Pro 64bit. It’s an entirely new build, because my Sony TV randomly generates an inverted pink screen with digital input from a computer via HDMI I am using a VGA interface with a standard audio jack from HTPC to TV.

    Using the latest Frodo release on Aeon nox for both a laptop and htpc my laptop has no problems via wifi but my htpc does wired.

    I have increased the Ethernet framesize to jumbo, updated LAN drivers to realteks current ones, created the advanced setting xlm file with 500Mb cache and changed the video share in the northbridge settings to 1GB.

    The pause on frame rate change is deactivated and I have toggled on and off pretty much every setting in XBMC itself.

    If I watch a file saved to the NAS on the HTPC then it does buffer.
    If I watch a file saved to the SSD in the HTPC then it does NOT buffer. if I watch a file saved to the NAS via wifi laptop then it does NOT buffer.

    Cheers for any other suggestions you can think of.

    • My Vizio Tv generates an inverted pink screen via VGA. The HDMI ports are burned out, I think do to a lighting strike. I THINK (?) the cylinder shaped magnet on the wire right behind the plug into TV is the cause. When I move it up the pink disappears.Does anyone else have a thought?

  20. Just for info – the cachemembuffersize setting in advancedsettings.xml only changes the buffer for streaming from websites, it won’t work for streaming from a network/local drive.
    Version 13 of XBMC will support buffering on the local network but if you are running 12 or earlier these settings will do nothing for you.

  21. I had some issues withe the buffering to.
    i have set all Logs to -1 oder disabled. That were better.
    Than i used NFS shares with higher read buffer size. That were even better.
    An than i set the NFS share to UDP and now … It’s Perfect!!!

  22. 524288000
    45

    3
    0

    true

    this my advancedsettings file i have steaming issue. Please need help. I put my cash to 500mb because I have 8gb of mem im using windows7 i’m using my laptop most of the time for steaming. i’m using veelte by chrome no issue when i use xbmc it keep lagging every min.
    any solution i will try it.
    thanks.

  23. Hi i hope u can help me . Ive got this constant stutter when streaming videos with the latest stable xbmc and the mashup addon.
    my specs are an mk908II on wifi 100mbit optic fiber.

  24. IMPORTANT: If troubleshooting a recent performance degradation and using Wi-fi, try doing a wi-fi scan to and choosing an unused channel. I noticed several networks on 6 and when I changed to an unused channel all of my buffering problems went away!

Leave Your Comment


Message is the only required field.
Emails are not published.