My review of XBMC on Amazon’s Fire TV can be summed up easily, I’ve moved from my custom built HTPC to using a Fire TV for my day to day TV watching.

Commonly asked question I see about the Fire TV

  • It’s easy to install.
  • You don’t need to root the Fire TV
  • I have it plugged into a 5.1 surround system via HDMI. I didn’t have to go to any trouble to make it work.
  • I have about 3TB of media on an SMB share. My library is shared via MySQL. I had no problems getting this to work with the Fire TV. Navigating the library is just as snappy as my old HTPC.
  • The Fire TV will play a 1080p 5.1 surround sound movie without issue.
  • The Fire TV will play a 1080p MPEG-2 stream from a HDHomerun device without issue.
  • The Fire TV will play anĀ USTVNow stream without issue.
  • The default remote map isn’t good. There are much better keymaps out there.
  • I could not get it to work correctly with a FLIRC and a Harmony remote. (See Cons below)
  • You can side load emulators. Anything up the PS1/N64 generation works. Though you’ll want to root it so you can use storage devices other than the built-in. This is much, much easier than getting emulators to work on other XBMC hardware/operating systems.
  • XBOX 360 and PS3 controllers work.
  • It’s by far the easiest way to get Netflix, Amazon Prime, and XBMC all on the same box.

Pros for the Fire TV

  • It makes no noise
  • It doesn’t produce any heat
  • It’s small. I have it hidden behind a photo 5×6 frame on my entertainment center.
  • It’s cheap! The Fire TV is $100. I spent about $375 on my HTPC less than a year ago. I thought it was cheap at the time.
  • You don’t have to jack with it much to get XBMC going. No custom hardware to put together, no OS install, ect, ect.

Cons for the Fire TV

TL;DR

The Amazon Fire TV is the best hardware to run XBMC on.

I’ve changed the USTVnow script from my previous post. I needed it to work without XBMC running or even installed.

The script below will login into USTVnow, grab the stream info for each channel you have access to and then write out .strm files to a directory of your choosing. To use it just change email, password, and stream_dir to your own credentials.

I have the script set to run via CRON every thirty minutes. Then I have the scripts stream_dir setup as a source in XBMC so I can play the stream files.

The script is pure Python and should run on anything that will run Python. No need to have XBMC working.

Download: ustvnow.py

7/14/15: I’ve updated the script to work with USTVNOW’s website changes.

#!/usr/bin/python
'''
    ustvnow XBMC Plugin
    Copyright (C) 2011 t0mm0

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

20131227 - Modified by Dean Vaughan - http://deanvaughan.org to work from command line and output stream files to a directory
20140610 - Modified by Dean Vaughan - http://deanvaughan.org to work without XBMC running or installed

'''
email = 'youemail'
password = 'yourpassword'
stream_dir = 'Streams'

stream_type = 'rtmp'
quality = '1'

import cookielib
import os
import re
import urllib, urllib2
import sys

class Ustvnow:
    __BASE_URL = 'http://lv2.ustvnow.com'
    def __init__(self, user, password):
        self.user = user
        self.password = password

    def get_channels(self, quality=1, stream_type='rtmp'):
        self._login()
        html = self._get_html('iphone_ajax', {'tab': 'iphone_playingnow',
                                              'token': self.token})
        channels = []
        for channel in re.finditer('class="panel".+?title="(.+?)".+?src="' +
                                   '(.+?)".+?class="nowplaying_item">(.+?)' +
                                   '<\/td>.+?class="nowplaying_itemdesc".+?' +
                                   '<\/a>(.+?)<\/td>.+?href="(.+?)"',
                                   html, re.DOTALL):
            name, icon, title, plot, url = channel.groups()

            #tmp work around till ustvnow stablizes changes
            name = name.replace('\n','').replace('\t','').replace('\r','').replace('<fieldset> ','').replace('<div class=','').replace('>','').replace('"','').replace(' ','')
            if not name:
                name = ((icon.rsplit('/',1)[1]).replace('.png','')).upper()
                name = name.replace('WLYH','CW').replace('WHTM','ABC').replace('WPMT','FOX').replace('WPSU','PBS').replace('WHP','CBS').replace('WGAL','NBC').replace('WHVLLD','MY9')

            try:
                if not url.startswith('http'):
                    now = {'title': title, 'plot': plot.strip()}
                    url = '%s%s%d' % (stream_type, url[4:-1], quality + 1)

                   # if self.premium == False:
                   #     if name not in ['CW','ABC','FOX','PBS','CBS','NBS','MY9']:
                   #         raise

                    print name
                    channels.append({'name': name, 'url': url,
                                   'icon': icon, 'now': now})
            except:
                pass
        return channels


    def _build_url(self, path, queries={}):
        if queries:
            query = build_query(queries)
            return '%s/%s?%s' % (self.__BASE_URL, path, query)
        else:
            return '%s/%s' % (self.__BASE_URL, path)

    def _fetch(self, url, form_data=False):
        if form_data:
            req = urllib2.Request(url, form_data)
        else:
            req = url
        try:
            response = urllib2.urlopen(url)
            return response
        except urllib2.URLError, e:
            return False

    def _get_html(self, path, queries={}):
        html = False
        url = self._build_url(path, queries)

        response = self._fetch(url)
        if response:
            html = response.read()
        else:
            html = False

        return html

    def _login(self):
        self.token = None
        self.cj = cookielib.CookieJar()
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj))

        urllib2.install_opener(opener)
        url = self._build_url('iphone_login', {'username': self.user,
                                               'password': self.password})
        response = self._fetch(url)
        #response = opener.open(url)

        for cookie in self.cj:
            if cookie.name == 'token':
                self.token = cookie.value

def build_query(queries):
    return '&amp;'.join([k+'='+urllib.quote(str(v)) for (k,v) in queries.items()])

ustv = Ustvnow(email, password)
channels = ustv.get_channels(int(quality), stream_type)

if(len(channels)):
    old_streams = os.listdir(stream_dir)
    for old_stream in old_streams:
        if 'USTV-' in old_stream:
          os.remove(stream_dir + '/' + old_stream)

for c in channels:
    title = c['now']['title']
    title = re.sub('[^\w\-_\. ]', '', title)
    title = title.replace(' amp ', ' and ')
    f = open(stream_dir + '/USTV-' + c['name'] + ': ' + title + '.strm', 'w')
    f.write(c['url'])
    f.close()
                  

I was asked to give a run down of the XBMC computer I am currently using. It was assembled from parts and is running openELEC.

HTPC XBMC Computer

The case looks good.

My XBMC PC is capable of:

  • Playing 1080i video with no stutter or buffering. (Both local files and files from a Windows file server)
  • Playing 1080i streams of local cable TV channels.
  • Recoding those streams DVR style.
  • Playing 720p streams of premium cable TV channels via USTVNOW. (The 720p limit is from USTVNOW, not the computer)
  • Using my surround sound system for 5.1 sound.
  • Playing older video games from Super Nintendo, NES, Game Boy, Genesis, ect.
  • Throwing some colors on the wall with a Light Pack.

Parts List:

Total Cost: $638.26

Not cheap. You get what you pay for.

Some notes on the hardware:

My previous HTPC was an ASROCK Ion 330. It was prone to overheating. A lot of this was due to the small case size. The CPU fan lay under a spinning hard drive with a 1/4 inch gap. The fan blew hot air onto a hard drive producing its own heat. This was then blown out of the case by a 25mm fan. Because of the cramped quarters I didn’t have any other options for larger fans or moving parts. While the PC never got hot enough to shutdown it did get hot enough to make me worry about.

The case on this XBMC PC is roomy. The fan from the CPU isn’t constricted. It has a 65mm case fan with room for a second. I’m using an SSD drive as they produce little to no heat. The SSD has the added benefit of being silent. The PC as a whole is quiet enough that you cannot hear it without putting your ear near the case. Even under a load it doesn’t get hot enough to spin the fans up. Idle temperature is around 40C, loaded is around 55C.

The CPU has an integrated GPU. It comes with a heat sink and fan in the box. The CPU is overkill for playing videos. I went big with the CPU because someday I plan on emulating N64 and Playstation games. Possibly even Game Cube.

The HDHomeRun is for watching cable TV. If that’s not applicable to you, then no need to buy one.

The lighting arrangement can be had in a DIY kit for $50.

Software:

Putting it all together gets you this:


My camera is unable to capture the lighting effect. Here is a video from the vendor showing how it looks.
ADAlight demo from adafruit industries on Vimeo.

 

 

Getting the Free Cable addon to work under OpenELEC takes a little bit of command line work. You’ll need to install some Python modules and create some directories on your OpenELEC computer.

Here’s what you need to do to get Free Cable working:

Install the Blue Cop Repository

From that repository, install Free Cable.

Open the configuration for Free Cable and then save it as is.

SSH to your OpenELEC computer. Run the following on the command line:

wget http://www.crummy.com/software/BeautifulSoup/bs4/download/4.3/beautifulsoup4-4.3.2.tar.gz
cd beautifulsoup4-4.3.2/
python setup.py install --prefix=/storage/usr
cp -R /storage/usr/lib/python2.7/site-packages/bs4/ /storage/usr/lib/python2.7/site-packages/beautifulsoup

wget http://deron.meranda.us/python/demjson/dist/demjson-1.6.tar.gz
tar zxvf demjson-1.6.tar.gz
cd demjson-1.6
python setup.py install --prefix=/storage/usr

mkdir /storage/.xbmc/addons/script.module.free.cable.database/
mkdir /storage/.xbmc/addons/script.module.free.cable.database/lib

touch /storage/.config/autostart.sh
chmod 755 /storage/.config/autostart.sh

Once that’s done edit /storage/.config/autostart.sh and add

#!/bin/sh
export PYTHONPATH=$PYTHONPATH:/storage/usr/lib/python2.7/site-packages/

If you already have ‘#!/bin/sh’ in the file, don’t add is again.

Reboot. Free Cable should now work.

Short Answer: It’s really good.

I’ve been trying out XBMC on Ouya for the last few days. Overall I’m happy with it.

I’m using the Ouya on my den TV, a Vizio WV42LHDTVa, via HDMI. The Ouya is on a gigabit wired connection. XBMC is configured for a shared library via a MySQL server. The videos and thumbnails are stored on a SMB share on the same wired network.

The video quality is good. When using wifi it would take a good while to start videos and occasionally I would get a stutter during playback. Fortunately I already had a wired connection behind my TV and moving to that wired connection solved the problem. The odd thing about this is that the XBMC box that the Ouya is replacing had a USB wifi card that didn’t have those problems.

Sound is good for me, but considering I’m just using the built in speakers in my TV I’m not saying much.

The UI is snappy. Only complaint is that I wish I had a remote instead of a controller. I would bet that we see some strong USB remote support in the future.

What don’t I like? Not much really. I mentioned the remote support. Some of my thumbnail art is not displaying, though I would bet this is because the library is from XBMC 12 and the Ouya is running version 13. I wish the Ouya had a better interface for launching XBMC. Being able to put it in an easy to get to favorites or even the play menu would be nice.

 

I have a shared MySQL database library for the various XBMC installs I have. One of the reasons I purchased an Ouya was as a cheap replacement to an older XBMC box I had. Things got interesting when I tried to edit my advancedsettings.xml file on the Ouya. How to do it? There isn’t a text editor or SSH access. I had to copy the file from the Ouya to another PC, edit it with what I needed, and then copy it back.

Keep in mind that what I’m going to describe below will install XBMC version 13 on the Ouya. If the other installs around your house are not using version 13 this may mess up your database. I had version 12 installs and my DB was fine, good luck!

  1. Backup your XBMC database.
  2. Install XBMC for Ouya. This is a dead simple tutorial that worked for me.
  3. If you don’t have one already, create a shared folder on your PC. This is where we will put the advancedsettings.xml for editing.
  4. On the Ouya, launch XBMC. Go to Settings->Appearance->File Lists and pock mark ‘Show hidden files and directories’.
  5. Go back to the main XBMC menu, go to Settings and then File Manager
  6. Add two sources, one should be the shared folder on your PC, the other should the userdata XBMC folder on the Ouya.
  7. The XBMC folder on the Ouya is /sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/userdata
  8. In the shared folder on your PC, make an advancedsettings.xml file. I just copied one from another XBMC install.
  9. Back on the Ouya, copy the advancedsettings.xml file into the userdata folder. Do this by highlighting the file, then pressing the Ouya button on the controller, then select copy from the menu that pops up.
  10. Exit and then restart the Ouya. You’re done.
Getting to the built in file manager

Getting to the built in file manager

Showing all files

Showing all files

Copying Files

Copying Files

 

 

Here’s an XBMC problem I ran into; there is a show I watch and until a few days ago XBMC would add new episodes into my library as Sickbeard downloaded them. This arrangement has worked well for several years with no issue. For seemingly no reason XBMC stopped adding new episodes for this show only to the library. Sickbeard was still downloading them and moving/renaming them to the appropriate place, XBMC just wasn’t picking them up and putting them into the library.

I poked around a bit and saw this entry in my temp/xbmc.log file:

“ERROR: VideoInfoScanner: Asked to lookup episode SOMEVIDEOFILE.avi online, but we have no episode guide. Check your tvshow.nfo and make sure the <episodeguide> tag is in place.”

Googling the error didn’t help. Other people have had this problem but there wasn’t a solution posted anywhere I could find.

I looked at the tvshow.nfo for the show and sure enough, there wasn’t an <episodeguide> tag. I understand through some voodoo you can add the tag yourself, but I didn’t want to get into that. I already had a copy of Media Center Master, so I deleted the tvshow.nfo file, opened Media Center Master, and had it fetch all of the metadata for the show again. After that was done I had XBMC update the library. My missing episodes then appeared in the library as they should.

I have no clue what made it stop working in the first place, but I am happy that having Media Center Master rebuild the metadata solved the problem.

Torrents are not safe. Your IP address is visible to all. Eventually you will be caught and copyright infringement notices will be sent to your ISP. Using an Usenet Provider will not only protect you but allow you to download faster. I recommend NewsgroupDirect.

 

I have an XMBC Live (XBMCbuntu) set up at home that includes a Denon 5.1 surround sound receiver. Out of the box XBMC will play the wrong sound channel out of the wrong speaker. Most noticeable is that the center channel will come out of the rear left speaker.

Finding a solution for this proved difficult, it’s not an XBMC problem so much as a problem with Alsa. The solution below has worked with XBMC 9, 10, and 11.

Here is what you do:

ssh into the XBMC box and create a /etc/asound.conf file. Cut and paste the text below into it.

pcm.!hdmi-remap {
  type asym
  playback.pcm {
    type plug
    slave.pcm "remap-surround71"
  }
}

pcm.!remap-surround71 {
  type route
  slave.pcm "hw:0,3"
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
    5.3= 1
    6.6= 1
    7.7= 1
  }
}

Then reboot.

Once XBMC comes back up, go to System->Audio and set the audio output to hdmi-remap. Then play a video with 5.1 sound, it should all work out.

Torrents are not safe. Your IP address is visible to all. Eventually you will be caught and copyright infringement notices will be sent to your ISP. Using an Usenet Provider will not only protect you but allow you to download faster. I recommend NewsgroupDirect.