Kodi Community Forum

Full Version: Buffering (pre download) for smooth playback over wireless
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have been using XBMC on a laptop to stream movies from my PC as the server (using tversity). Generally this works ok but sometimes for 1080p movies it can stutter and freeze if the network isn't working at it's best.

Is there a way to buffer or pre download from the server so that it can playback smoothly?

ie something like 10 minutes before I start to watch hit play then pause, so XBMC starts to download and build up a large buffer in the background. So when I come back to hit play XBMC has already downloaded several minutes in advance of where I’m currently watching so it always plays back smoothly.

Thanks for any help.
No.
i remember seeing a thread a few months ago about the same issue, IIRC the last word from the xbmc team was they won't modify the code to fix people's crappy network installation/configuration.

I'm not saying that this is the case with your installation, but HD(especially 1080p) movies over wireless is not really the way to go. Wired 100mbps network does the job fine
I can stream 1080p just fine over my wireless but I have a dedicated wireless N network at 5ghz for my 2 htpcs. All other wireless devices are on a mixed network running at 2.4ghz. I suggest you either a get a dual band wireless router and a wireless n usb adapter for your htpc if isnt dual band or you can perhaps try a powerline network adapter. I have heard good things about this solution.
Got dualband wireless n already and it works most of the time but just want it to work 100% of the time. (wired solution aren't an option unfortunately).

What happens if I start to play the film and then rewind by a few minutes and then start to watch it from the beginning, will it hold the already played data in a buffer. (actually that solution isn't ideal anyway as I would have had to play right through the movie and then rewind).

Shame the pre-buffering/download option isn't a feature it would be a great addition.

Thanks for your replies
yunti Wrote:Got dualband wireless n already and it works most of the time but just want it to work 100% of the time. (wired solution aren't an option unfortunately).

What happens if I start to play the film and then rewind by a few minutes and then start to watch it from the beginning, will it hold the already played data in a buffer. (actually that solution isn't ideal anyway as I would have had to play right through the movie and then rewind).

Shame the pre-buffering/download option isn't a feature it would be a great addition.

Thanks for your replies

Are you sure that you do not have any other non-wireless n devices on your network? The network speed will match the slowest device (i.e. a/b/g) so if you want to truly get all the benefits out of a wireless n network, only n devices can be on it.

What do you think of the powerline network adapter? You can plug it into an outlet near your htpc and get a wired solution.
yunti Wrote:Generally this works ok but sometimes for 1080p movies it can stutter and freeze

What is the overall bitrate of the movie in question?
hi all,

for those having wireless problems, i highly recommend looking into either powerline networking or moca.

actually, i would recommend moca over powerline. The connection will not be the fastest in the world, but it will be very clean (doesn't fluctuate like wireless), and it handles multi HD streams fairly well.

for example, in my setup, my htpc is connected through moca and i get roughly 40mbps. However, this is not the maximum moca is able to support. If I simultaneously open multiple HD streams, i do these numbers sum up and eventually hit ~90mbps on my system.

I don't fully understand why one stream sort of caps out at 40mbps, but either way, it is more than enough for any HD stream.

If even these solutions are not viable for you, i recommend combining an external player with Haali media splitter. The splitter allows for arbitrary smart buffering. (It will buffer as the movie plays, so you don't get a long delay). Back during my wifi days, it worked very well for me. I was regularly doing 720p material over 11G.

cheers
defender013 Wrote:hi all,

for those having wireless problems, i highly recommend looking into either powerline networking or moca.

actually, i would recommend moca over powerline. The connection will not be the fastest in the world, but it will be very clean (doesn't fluctuate like wireless), and it handles multi HD streams fairly well.

for example, in my setup, my htpc is connected through moca and i get roughly 40mbps. However, this is not the maximum moca is able to support. If I simultaneously open multiple HD streams, i do these numbers sum up and eventually hit ~90mbps on my system.

I don't fully understand why one stream sort of caps out at 40mbps, but either way, it is more than enough for any HD stream.

If even these solutions are not viable for you, i recommend combining an external player with Haali media splitter. The splitter allows for arbitrary smart buffering. (It will buffer as the movie plays, so you don't get a long delay). Back during my wifi days, it worked very well for me. I was regularly doing 720p material over 11G.

cheers

What is moca?
http://www.amazon.com/Netgear-MCAB1001-C...B001N85NMI

it's basically like your cable modem..it converts ethernet into a coax compatible form and shoots it out.

it's not cheap (sadly), but it is in my opinion, the best option when you cant route ethernet all over the place.

and believe me, i've tried all forms of wireless (i guess this really depends on your location..), powerline (the newest 500mbps variety)
o i should mention that depending on your locale, powerline may work very well also.. it just really depends, your best bet is just to actually try it out.

However, if your home is already wired up for cable, really do consider giving moca a shot. It's worked great for me.
defender013 Wrote:http://www.amazon.com/Netgear-MCAB1001-C...B001N85NMI

it's basically like your cable modem..it converts ethernet into a coax compatible form and shoots it out.

it's not cheap (sadly), but it is in my opinion, the best option when you cant route ethernet all over the place.

and believe me, i've tried all forms of wireless (i guess this really depends on your location..), powerline (the newest 500mbps variety)

hmmm...that looks good. I wonder whats faster? MoCa or Powerline?
i think that'll really depend on how your house is wired up..

but my feelings are moca will be better and more reliable.
I'd love for this option as well, since I'm not able to run cat5 here. I setup a 2.4ghz 300mbps 802.11n network, and it'll stream all 720p material just fine, and most 1080p (if the movie is like 6GB-8GB in size). I'd love to do moca as well, but our bedroom TV is mounted on the wall, and there isn't a way to hide the moca box easily, or hide the cat5 going to the htpc.

If I download a high bitrate or big movie, I just transfer to a thumb drive to ensure no stuttering. But for 720p movies or 720p tv episodes, it streams just fine. I wish it had a buffer too, but oh well - I understand that the old xbox port had this option, but it looks like it was taken out.

My next house won't have wall mounted TVs so I can hide the moca adapters easily Smile The GF doesn't want to move the bedroom TV to the dresser *sigh*

A year ago I was using a popcorn hour device...so now I finally see the light and love XBMC. Of course I just got ION nettops here, and skins like AEON are a bit sluggish. My next setup will definitely be a bit stronger - dual core, i3, etc. I love XBMC - just need more power to run cool AEON skins smoothly.
I seem to have found a way to do this, albeit by using an external program to do the pre-buffering. It only works for streaming from HTTP servers (actually may work for FTP too?). And this solution is only tested for Linux (Ubuntu specifically) and on an Acer Revo.

The situation I have is: a powerline ethernet connection between the XBMC box and the media server; claims to be gigabit, actually just means >100MBit, and usually easily fast enough, but it can be variable, probably relating to what else is running on my mains.

Which means that often (and more often recently, trying to think what I got that's new and could be interfering) when starting to play 1080p videos on XBMC, it takes a minute or two of stuttering and struggling before settling down and playing OK. At which point I can skip back to the start and play from there and it's usually fine, but this is annoying. And I thought some kind of pre-buffering would help. Not even very much. Just enough to get it started.

XBMC doesn't do that internally, as established earlier in this thread.

But my media server actually serves out using a webserver over HTTP. (NB: I tried SMB but as well as encountering some filename mangling, I also still had this problem). So I thought, I'm using HTTP, what about using a web proxy running on the XBMC box itself?

And as I'm on Linux, the traditional option is a HTTP proxy daemon called squid. Probably doable on a mac too, but the following is for Ubuntu Lucid or Debian Squeeze onwards:

Install squid3

edit the squid.conf file, add the line:

Code:
read_ahead_gap 1 MB

Save and exit. Restart it.

Or to be specific for Ubuntu/Debian:
Code:
sudo su -
apt-get install squid3
echo 'read_ahead_gap 1 MB' >> /etc/squid3/squid.conf
service squid3 restart

Configure XBMC, in the network settings, set proxy to localhost port 3128.

That's almost it. As the machine actually isn't horribly short of memory I tried various options to let squid use more of it, but all it seemed to do was make it take *ages* to start playing, then takes 100% cpu after a few minutes of playback, at which point XBMC started running out of video and eventually gave up. In the end, the read_ahead_gap setting (and it being that low) was the only change from the default configuration I made.

Seems to work perfectly.

The one wrinkle I had was that squid doesn't resolve mDNS hostnames (ie: zeroconf/bonjour, when your machines are findable on your localnet using <hostname>.local). As that's what I was using in the video source URL to find the media server, that broke; and I didn't want to change the URL to something non-.local because it would lose my individual file playback settings.

I was able to fix it by putting an entry for that machine in the XBMC box's /etc/hosts. But it does mean the server has to be on a fixed IP address. In my case adding the line:

Code:
192.168.0.100     twilight.local

The IP address would differ for you. In fact it may differ for me in the future too as it just comes from DHCP, I probably now have to do something to make sure it's fixed.
Pages: 1 2