Wednesday, December 31, 2014

Post #13: Break from the Creeper and Christmas Break! XBOX Streaming discovery.

Took a Break

Sorry I’ve not posted in a while, however, since the last post I made pretty good progress on the “manual drive” portion of the creeper, I can get it going forwards and backwards just by tilting my android phone appropriately, reading the compass, choosing the correct heading, reading the Bluetooth, etc. 
4 months now!

In my last post, you saw we got a new puppy, she has been proving to be a big handful and the cause of most of my break on the creeper, but at 4 months she is settling a bit and after the new year I’ll pick things back up and continue coding it out.  The good news is, the PIXY performed nicely at school and the students are getting excited about working on it, so we’ll be picking up steam on the creeper again!  I've included a shot of the puppy here, purely for selfish reasons, I get more hits to my blog when I post pictures of Rue! :)

Networking (the internet kind)

In the meanwhile, I thought I would take some time during my Christmas vacation to play around with some networking software at home.  At work, I code/support a large installation of custom made software to measure traffic on several very large networks.  The code is built to be scaleable, to be automatically configured, inventory all the networks regularly, and send all of this data to support and billing systems.  I’m sometimes asked by folks “Why can’t you just use MRTG”.  (instead of a custom built solution that they don’t understand).

MRTG (Multi Router Traffic Grapher)

So, I thought I would gain a better understanding of MRTG by taking another look at it, on a smaller scale.  First, MRTG is a great tool, built on PERL.  I was able to install it on my MacPro at home pretty easily using HomeBrew, a software distribution mechanism for mac’s.  I tried compiling all the dependencies myself first, but that proved to be a pain as compiling code usually turns out to be, so installing it from HomeBrew made it a 20 minute thing, should have started with that first.  I was up and running in no time.  First though, I had to make sure my home wifi router supported SNMP, the network management protocol used to extract data from routers.  My RT-N56U router does indeed support it if you install external storage on it, download the necessary and turn it on.  I was able to research all of this on Google and turn on SNMP!
  
To make a long story longer, MRTG is a great tool for a contained network, one that you point MRTG at, it will go and begin collecting and even make nice HTML files for you to look at.  It is quick and easy.  Why it isn’t good for my purpose is for exactly the reasons outlined above, it doesn’t scale to where I need it to be.  Every live interface that it draws data for, it creates several files.  NOTE: I’m not using a database or RRDTool in my application, some of these files won’t exist down that path, but the data will live in a different kind of file nonetheless). 

Each interface gets 3 image files, a DAY, WEEK and MONTH PNG image file.  Also, each interface gets a LOG file to contain the data collected, and an HTML file to present the data.  This is pretty cool on a small scale.  If you use the database and RRDTool interface, the PNG’s won’t be created and the data in the LOG files will be stored in RRD database files instead.  But, the data is still stored in database files.  Also, if using RRDTool and an external database, the PNG drawings will be built when requested to be seen, this should be fast based on this architecture, but again, I have 1 million or more interfaces to worry about, I don’t want individual files/databases for them, I need things more accessible/scaleable/disaster recoverable than that.

I really like MRTG, but for scale, my solution at work is still the best choice for the business needs it serves, HOWEVER, for a quick look at what is going on without much hassle, assuming you have all the right access credentials you need, MRTG is a great tool to do just that (or even, for smaller scale networks).  It can certainly be extended to fit your needs, it is open source after all, but you may be in a cycle of continuous integration if you want to upgrade MRTG to the latest and greatest and most up to datest to get some new feature it has.

Anyway, playing around with MRTG and looking at the data it collects, I made some discoveries about my home entertainment characteristics I didn’t know.  Discoveries that are making me rethink my setup. 

My Home Entertainment Setup and the Network it Uses!

I have a Windows 8 server running Microsoft Media Center, connected to the cable company via a Ceton  InfiniTV 4 tuner PC card and a cable card interface.  This acts as my DVR, I can schedule recordings and pause live tv all through the Media Center Extender functionality on my XBOX 360’s.  I have 3 TV’s hooked up as media center extenders using 3 XBOX 360’s.  Obviously, the XBOX can do more than just be a media center extender, it plays cool games (Halo is my favorite) and can run Netflix, Hulu Plus, VUDU, TWC App, and more. 

Roku

This Christmas, my daughter wanted a ROKU, so we bought her one.  Also, I kept getting kicked out of Netflix due to an XBOX Live issue a couple of weeks back, it was so annoying that I decided to buy a ROKU 3 as well.  Needless to say, I Love it!  So much so that I then went out and bought a ROKU Stick for my little tv in the den so I can watch tv there too!  Since I have all this new tech AND the ability to measure how much network they use, I thought it would be cool (geeky kind of cool, I know) to see just how much network to validate my monitoring setup.  Keeping in mind that I use (or used to anyway) the XBOX for all of my entertainment needs, Netflix, Windows Media Center Extender, Hulu Plus, VUDU, etc.  Well…. Long story longer, here is what I found.

Roku vs XBOX 360

Running Netflix on my ROKU Stick (not even the ROKU 3), running at 1080p, streaming “I, Frankenstein” draws about 400KBps (3.2Mbps).  Running the SAME movie, during the SAME section of the movie on the XBOX360 with Netfix draws about 40KBps (0.32Mbps)!  Really?  XBOX Netflix streams 1/10 the bandwidth of ROKU!  The quality on the XBOX Netflix is capped at 720p, so that is one contributing factor.  Now I’ve never been totally happy with the quality of Netflix on my 61” TV, I always saw color banding, but it wasn’t horrible.  Compared to the ROKU though, the quality of the picture is drastic, and now I know why, Netflix must be pretty compressed coming in through the XBOX versus streaming it on the ROKU.  It is such a drastic difference that you cannot even see the usage on the chart at the scale it needs to be for the ROKU streaming!

Some definitions before looking at this chart.  I was able to identify the interfaces on my router and where they connect:
(LAN) - This is the wired network into my house served by the router (your wired computer hooks into this network)
(WAN) - This is the interface to the outside world, in my case, to Time Warner Cable roadrunner service
(5Ghz) - This is my second of Dual Band wifi, the 5Ghz band.  Your iPhones, iPads and laptops will probably connect to this wifi band
(2.4Ghz) - This is the standard wifi band, this happens to be what my Roku's are connecting to.
Showing network usage between WMC and ROKU, Netflix on ROKU and on XBOX360 (Click on pic to see full size)

Other services - Summary

To be fair, I also compared the TWC streaming app (Cable company streaming app) on ROKU versus the XBOX.  On my charts you’ll be able to see where I was streaming TWC via a ROKU3 (right after Netflix, the arrow pointing down to nothing in the WAN graph), and once again, you cannot see the traffic that TWC app was pulling from the internet while streaming on the XBOX, the traffic is so small.  Again, the quality difference isn’t totally noticeable unless you take the ROKU and put it on the same TV and compare side by side.  However, I like to have the best quality sound and video in my entertainment room, so now I know I’m not getting the best video out of my XBOX that I could have on the ROKU, so…. I’ll be purchasing another ROKU for my streaming needs!  The XBOX still excels at games and of course it is now the ONLY game in town to be a Windows Media Center Extender, functionality I also really like (people that come over really like it too).

Vudu at 1080p serving Ultra Violet
I also ran VUDU on my roku stick the other day at 1080p, and it came in at the expected 8Mbps while serving a movie I own up on UltraViolet, so all the numbers seem to be adding up, it is just that XBOX draws only a fraction of the network traffic that ROKU does.  I suppose if you have a network cap and you want to watch video that is “good enough”, XBOX is an awesome solution.  If you don’t have a network cap and want to watch the best video you can get your hands on while streaming, XBOX would not be your choice.  I’ve tried different setting and such on the XBOX and researched it a bit, turns out that I’ve tweaked the best picture out of XBOX that I can.

At least now I know (and now so do you).  Thanks for reading, hope this information is helpful to someone!