søndag den 8. juni 2014

HBO Nordic on Linux Mint 15

HBO Nordic is a subscription streaming video service that offers TV Series and Movies from HBO and its partners. HBO Nordic has apps for iOS and Android and works in a web-browser in Windows so long as the appropriate plugins are installed. The range of content is huge, from classic HBO serials such as The Wire and Sopranos to the latest broadcasts, including True Detective, Game Of Thrones, Penny Dreadful and Silicon Valley.

Unfortunately, by any reasonable judgement, the available apps (and website) are very poor: no search, poor handling of user-favourites etc. The reviews at the App-store tell a sad story. Among the missing features are support for Airplay and Chromecast. Now my particular home setup has our main TV connected to a Chromecast, Linux PC, and a Wii, none of which are supported by HBO Nordic, which makes it hard to get full value from my monthly subscription (which rather suspiciously costs exactly the same as Netflix who do, however, offer chromecast support from my iPad or Android phone).

So what are the chances of getting HBO Nordic to work on Linux - specifically Linux Mint 15? HBO Nordic uses widevine technology - this is a browser plugin that handles authentication and DRM. The actual rendering is done in Flash. Widevine is available for Linux as part of pipelight, so it should be as simple as installing the latest pipelight (e.g. as described at http://linuxg.net/how-to-install-pipelight-0-2-7-on-ubuntu-linux-mint-elementary-os-pinguy-os-and-derivatives ) and then enabling the widevine plugin with
sudo pipelight-plugin --enable widevine
and that does indeed appear to work in the chromium browser. Unfortunately the playback - at least on my setup - was extremely choppy with poor A/V sync. Since the playback is handled by the flash plugin, I figured that changing the version of flash might help. The Chrome browser apparently comes bundled with pepper-flash, which I thought might be the answer. Unfortunately I couldn't work out how to make chrome play with pipelight. My next idea was to try installing pepper-flash systemwide following instructions you can easily find on the net which boil down to
sudo add-apt-repository ppa:skunk/pepper-flash
sudo apt-get update
sudo apt-get install pepflashplugin-installer
Unfortunately all that gave me was
E: Unable to locate package pepflashplugin-installer
and more google-trauma. Eventually by hunting around in synaptic and looking at the available flash-plugin packages I discovered that flash is enabled in chromium via something calling itself the mint-flashplugin package, which claims to be a meta-package for the Adobe flash-plugin. On little more than a whim I decided to remove this package and replace it with flashplugin-installer, which is the upstream ubuntu package, and which actually appears to install an older version of flash:
sudo apt-get install flashplugin-installer
And it works! So there you are. I'm happier (because I can now traumatise my entire family with Penny Dreadful) but not much cleverer. There is a discussion of some of the issues surrounding choice of flash plugin in Mint in the Linux Mint Forum, for anyone who wants to dig deeper. Meanwhile I'm just waiting for HBO Nordic to get their act together and produce a half-decent app with chromecast support or even, dare I suggest, actual support for Linux?

(Update: After recent upgrades to the Browser API, neither chrome nor chromium will work with the widevine plugin, and this is unlikely to be fixed. I tried watching HBO Nordic with Firefox, but although it "worked" the playback was jerky. Fortunately I tried out the Midori web-browser instead and it worked with HBO Nordic like a charm right out of the box.)

søndag den 3. november 2013

Plex Transcoding Problems Solved

I've been getting very frustrated at not being able to watch most of my video content with Plex. In theory, Plex Media Server should be able to stream my stored videos when I'm on the move directly to my iPad or mobile. But in practice it rarely seems to work. I spent an hour or so to do poring over the server logs and it was obvious that it simply wasn't transcoding anything. I don't know where Plex stores temporary files by default, but I'd set it to a location on my SSD disk, and there was simple nothing in there.

Eventually I tracked down the problem to a file-permission issue - the server didn't have write permission to the directory. So all it took was a quick application of chown and everything was solved:  

colin@redick ~ $> sudo chown plex:plex mytmpdir

I have to admit I'm still puzzled as to why it stopped working as it certainly used to. I'm guessing that it some point I accidentally changed the temporary directory from its default value in the web-configuration interface.

fredag den 30. august 2013

Unix Timestamps and Postgres

This is a 100% quickie! Convert back and forward between postgres timestamps and the Unix epoch like this:

 psql=> select extract(epoch from to_timestamp(1354012641));
 date_part
------------
 1354012641
(1 row)

torsdag den 11. juli 2013

Less Than Useful Directory Layout in Plex

The only reason for this post is because I couldn't work out how to make the above image publicly readable in Google+/picasaweb, or whatever it's called these days when I upload a photo from my phone to Google. I have a query about it posted here.

mandag den 8. juli 2013

Linux on a Packard Bell ZA8 Netbook

This smart little notebook is a Packard Bell ZA8. With its AMD L110 1.2Ghz processor and 2GB RAM is should be an ideal candidate for use with a moderately lightweight Linux installation. Well that's what my pal Sergei thought.

However the reality was that as soon as he installed Linux on it he noticed massive image corruption on the screen which made it completely unusable. So, since his time is valuable, and mine not-so-much he handed it over to me with a "you get it to work, you keep it". Challenge accepted!

It didn't take much googling (or thinking) to find that the problem lies with the drivers for the ATI RS690M Graphics Controller. The story, so far as I can understand it, is that ATI stopped releasing Linux drivers for this model in 2009 and has never released a full specification for the cards. Modern versions of Linux come with an open source driver, but as ATI haven't released specs, this is badly broken. Try to run with any resolution over 1024x768 and you're screwed, because the video-ram gets corrupted.

Well I admit this was a headscratcher and I followed a lot of false leads, up to and including hacking into the driver to try to disable the video ram. None of it helped, but eventually I found (with some help from Google, of course) an absurdly simple solution - simply set the video-ram down to 64MB in the kernel boot parameters. And so all that was left was to to remember how the hell to configure GRUB 2 (I miss the old GRUB).

For anyone else who might have forgotten, GRUB is now configured by editing the file /etc/default/grub. Mine now looks like

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.vramlimit=64"
GRUB_CMDLINE_LINUX=""

Note the "vramlimit"! Now the only thing left to do was follow the instructions at the top of the file and run update-grub, and I was the happy owner of a functioning Linux netbook. Now should I tell Sergei?

Installing Bought Content in Sims 3 for Windows

This is a bit of a diversion from my usual linux nørderi, but in my part-time job as home-head-of-IT I am also responsible for the onerous task of maintaining two installations of EA's beloved Sims 3 on Windows PC. Unfortunately daughter-no-1's PC recently had to be fully reinstalled. Fortunately I was able to extract a backup of her Sims data before the Windoze reinstall, but after reinstalling we had terrible problems reinstalling her online purchases. Essentially we could go through all the motions - ie download + install - but the worlds she'd bought just didn't show up in the game.

You can Google this issue and there are a lot of posts on the subject, which rather tends to confirm my existing prejudice that EA are a bunch of useless jerks who'll be the first against the Wall when the revolution comes. However what eventually worked for me was based on what I found at http://thecurtisparadisshow.ca/gaming/paradisebeach/ . However I was able to take a simpler approach as I actually had two .world files in our Installed Worlds folder. All I needed to do was copy them over to C:/....Program Files (x86)/EA/TheSims3/GameData/Shared/NonPackaged/Worlds and restart the program.

I should point out that I tried a lot of other tricks and tips from elsewhere on the net first, so it's always possible that it was some combination of these  which actually worked in the end. Good luck, and if you have any problems, don't ask me.

lørdag den 6. juli 2013

Intel NUC 847 as an HTPC: Part 1 (Hardware)

So my newest toy is an Intel NUC DCCP847DYE which I'm using as a Home Theatre PC as replacement for the increasingly obsolescent Boxee Box - good timing, eh?
Attractive packaging that plays a little jingle when you open it

So what do you get when you buy a NUC? Well what comes in the attractive packaging is an unprepossessing little grey box with various inputs and outputs, and a power supply (but no mains cable). What you get inside is a motherboard with a dual-core processor, graphics chip, fan, and not much else: RAM, harddisk, WiFi card are all extra.
Unprepossessing

Now I'm well known as a cheapskate, and having just taken out a mortgage for a loft conversion I'm naturally going for the cheapest option for my HTPC. The 847 is the cheapest NUC model and sticking to the barebones philosophy I'm equipping it with a minimum 32GB mSATA SSD and 4GB RAM. I have an old D-Link USB wireless-network card and plenty of power cables lying around so that keeps my total purchase under 2000DKK.

Putting it all together is pretty much too trivial to describe: the SSD fits here and the RAM fits there and you're done and ready to start installing your favourite Operating System. But that's for another post.