Author Archive

Dishing up videos

Continuing my line of posts about my home media setup, I come to the main reason for putting myself through all this pain – being able to watch my selection of movies and TV shows with (next to) zero effort required.

I’ve posted before about the merits of XBMC, an open-source project to create a digital media hub that is accessible to all. I’ve not had anything better recommended since, so I’m still using this as my main 10-foot UI on my new TV, running off the Mac Mini I bought 18 months ago to start doing some iPhone development work. I didn’t really appreciate the iOS SDK, but the Mac Mini makes a fantastic media centre PC! The box is pretty much silent, the Apple Remote is pretty intuitive for getting around XBMC and similar interfaces, and they’re available on eBay for pretty reasonable prices. I may get fed up of Apple one day and revert to a custom built media box, but for now, the Mini will do!

I’ll post at some point in the future about how I actually store my files (it’s all about to change anyway, I’m running out of space!) but the stuff I’m using for downloading and sorting downloads is pretty neat if I do say so myself! A caveat at this point – I’m not publicly condoning the below, I obey the law when it comes to content – so should you!

First up – iPlayer. This part is only applicable in the UK (currently), so feel free to skip this paragraph if you’re viewing from overseas. There is a fantastic package available called get_iplayer that allows you to set a list of desired programmes, and then run a cron script to download them. For instance, the following will install the package, and add Have I Got News For You to your PVR.


$ sudo apt-get install get-iplayer
$ get-iplayer --pvradd "HIGNFY" "Have I Got News For You"

You’ll then need to add get-iplayer to your crontab (using crontab -e or similar) and fire it off every so often:


0 * * * * /usr/bin/get_iplayer --pvr --modes flashhd,flashvhigh,flashhigh --output /home/matt/DownloadComplete/

Will schedule get-iplayer to run every hour, on the hour, and attempt to download your content in HD, then descend through quality if necessary, and output the files to /home/matt/DownloadComplete/ (change as appropriate).

Next up, fetching non-UK TV shows. There is a fantastic website called ShowRSS that lets you build custom RSS feeds of popular (and unpopular, they cover 267 shows at the time of writing) TV show torrents, which can then be used by most good torrent software to automagically add torrents as they become available. One very good way of achieving this downloading of torrents is Flexget (again, available in Ubuntu and other systems with a simple apt-get install flexget), which is a package for parsing the data returned from feeds such as ShowRSS, and performing the necessary logic to download the actual .torrent file. Once again, we need to add Flexget to our crontab, set to run hourly (in a slightly fancier way!)


@hourly /usr/local/bin/flexget --cron

Flexget uses a configuration file to determine what to do each time it’s run, which can be found in ~/.flexget/config.yml. As you may notice, it uses YAML (pronounced like camel) to store the preferences. YAML confused the hell out of me initially, but it’s all in the spacing! An example of my (truncated) config.yml is below.

feeds:
  tv-shows:
    rss: http://showrss.karmorra.info/rss.php?user_id=[REMOVED]&hd=null&proper=null
    series:
      - ncis
      - ncis:la
      - family guy:
          min_quality: hdtv
      - futurama
    download: ~/watch/

As you can see, this uses the tv-shows rss plugin to get my ShowRSS feed, then scans for the series listed (I believe you can do a catch-all rather than repeating the list), and then downloads the files into ~/watch/ – this will be useful in a minute. You can view Flexgets status on individual series using the following:

$ flexget --series
 Name                          Latest              Status
-------------------------------------------------------------------------------
 Ncis                          S09E11 - 14d 20h    *hdtv
 Ncis:La                       S03E11 - 14d 20h    *hdtv
 Futurama                      S06E26 - 109d 12h   *hdtv
 Family Guy                    S10E09 - 16d 21h    *hdtv
-------------------------------------------------------------------------------

Amazing! Now we’ve got our files downloaded and going into ~/watch/ automatically. Now, to actually download them…

For my torrenting needs, I use rTorrent (again, packages available for Ubuntu in the repositories), which runs quite nicely in a detached screen downloading my files for me! rTorrent uses a file called ~/.rtorrent.rc for its settings, an example exert from mine:


schedule = watch_directory,5,5,load_start=./watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
directory = ./Download/
system.method.set_key = event.download.finished,move_complete,"execute=mv,-u,$d.get_base_path=,~/DownloadComplete/;d.set_directory=~/DownloadComplete/"

dht=on
dht_port=6881
peer_exchange=yes
port_range = 7000-7500

This makes rTorrent keep an eye on the ~/watch directory for any files with the .torrent extension, and will add them to the active downloads if a new one is discovered, and remove any that are deleted. All torrents are downloaded into ~/Download/, but moved to ~/DownloadComplete/ when finished, for reasons that will be evident soon. DHT is enabled, and rTorrent will choose a random port between 7000 and 7500 on load.

So that’s all of our media downloading (you can add music/movies manually, or do some other clever scripts – I have an IRC bot that I’ll blog about in future do it for me!), but how do we sort that off into the right places for XMBC to find? It would be terribly inelegant just to make XBMC look in ~/DownloadComplete for it’s files… Well, that’s a question for a future post!!

Dishing up music

I’ve been meaning for a long time to continue my line of posts about my home media set up. Anyone who vaguely knows me (or stalks this blog) will know that I recently moved down to London, into a flat I can (sort of) call my own, so for the first time I’ve been able to play about with AV equipment in my way!

In this first post, I’m going to talk a bit about how I’m currently using the set up to serve my music collection around the flat, to work, and to my phone for on-the-go listening. It’s worth noting at this point that everything here relies on an old machine running Ubuntu server that’s currently sat in my cupboard, a solution that won’t work for everyone…

I’ve mentioned previously that I was looking into using DAAP to get at my music. This ended pretty quickly when I realised the clients available for listening are fairly crap. The actual configuration is fiddly, and I was after a nice functional GUI to access my music through. DAAP failed at pretty much all of this, so I went in search of another solution. After trying many different software packages (commercial and otherwise), I struck upon Subsonic, which seemed at first glance to do everything I was after. Essentially, it requires a server (available for all platforms) with access to your music collection, and will then spit the content back out to its own web UI (accessible through a personal URL if you’re not like me and running some kind of dynamic DNS service) plus it has a number of native players available for different platforms (including mobile). Best of all – it’s free! They withhold some features until you’ve given a small donation, but it’s entirely usable as a free package!

The web UI is basic, but skinnable (I’m still working with the basic skin – works well), and gives you access at a glance to all your artists, albums and playlists (although I’ve not done much with playlists yet, that part does seem a bit tricky). This UI also lets you play with the ID3 tags on your music, including the grabbing of album artwork off the internet, so if you’re as OCD as me about music tagging, your needs are well catered for! Within the web application your play queue appears at the bottom, with the current playing song in a lovely flash player. From the main window you can add things onto the end of the play queue, or change the playing song entirely. It’s basic, but functional, and if you want anything more advanced there are a number of native players available for all operating systems.

What interested me most was the quality of the iOS native applications. I’ve tried all of the ones recommended on Subsonics App page, and a couple that are in the app store but not endorsed officially, but I have now struck upon iSub as a favourite. It allows the caching of songs on your phone for playback when no data signal is available (although you have to have played the song for it to be cached – I’d like a feature where you could pre-cache songs to the phone), plus it integrates nicely with the iOS player API (play/pause whilst locked etc).

One other massive bonus was my discovery of a XMBC plugin for Subsonic (XMBC is what I use to browse media on my TV, as I’ve mentioned previously, more in a future post). This lets me listen to songs through my TV in the flat without having to bother turning a computer on – a massive bonus, and much more sociable if you have company!

The only downside of Subsonic is the reliance on a stable internet connection to an always-on music server. There are commercially hosted solutions available, but since I already had a machine running 24/7, and have recently splashed out on Virgin Media’s 30Mb fibre connection, it made sense to run the package from home.

So there it is – a whole-hearted recommendation for Subsonic (they’re honestly not paying me for this!) and it’s associated other applications. Tune in soon for a peek into the world of my TV/Movie system!

Dishing up media

As my latest project for ‘what to do when incredibly bored in the evening’ is to find a way of creating a central server for all of my media (starting with music, the rest is pretty easy) and then being able to play it off any device, preferably with some kind of specialised app for iPhone that would let me download tracks and playlists for local playback. If anyone has undertaken a similar project, I’d love to hear about it!

So – the task list so far:

  • Stable running media server
  • Automatic feed-in of new content (from download server – will blog about that one some other time!)
  • Automatic tagging (ID3 etc) of new content (this may be a step too far!)
  • Playlist viewing/editing
  • Access over the network
  • Access over the internet
  • Access from the iPhone (including local playback)
  • Front end media player (using XBMC or similar) for video/picture

Sounds like another one of those pipe-dreams, but I’m off to a pretty good start it seems! I’ve struck upon using some sort of DAAP server (currently running forked-daapd, will probably end up with the original daapd as it seems a bit more stable) off a dedicated test machine (so I don’t bork up my other running server, I’ve got plenty of old machines lying around the house at the moment!) which can then be connected to anywhere off the internal network, and some simple port forwarding should sort that for the wider world.

The only gripe at the moment is the lack of playlist support – the DAAP protocol isn’t designed to have anything to do with playlist editing, and that’s a pretty major feature I want to have! I may end up with some kind of web interface to the server that’ll let me edit playlists directly – not ideal, but I guess it’ll do the trick.

I’m currently struggling with the iPhone access part – I’ve found a single DAAP client (Simple DAAP Client), but that doesn’t support any caching, and is very basic (but free). I may have to resort back to some kind of manual syncing to get the iPod functionality, which would be a shame, but not an insurmountable problem.

The automatic tagging is definitely a big problem – what I’m envisaging at the moment is a daemon running on the server that uses Musicbrainz or something similar to update ID3 tags on MP3s as they are added on to the server, however such a thing may be slightly beyond the realms of possibility at the moment unfortunately. One day maybe…

I’ll try and keep this post up to date with my progress, but it’s likely to be slow work as my entire ‘server farm’ is being uprooted and moved to London in a few weeks. Flat hunting later this week, better make sure it’s got plenty of cupboard space for all these machines!

End of an era

Well, haven’t the last three years flown by! I am now officially a graduate of Durham University, having gained myself a 2:2 in Software Engineering. Matthew Dyson BSc (Hons) (Dunelm) does look rather good :-P It was quite sad to wave goodbye to Durham for the last ever time (as a student, no doubt I’ll be back soon, having witnessed the carnage at the alumni weekend this time around!), and I’m starting to get a bit nervous about going off into the real world! I’m not ready to finish with the student lifestyle yet!

After a rather mad few days of interviews a month or so ago, I have been offered a job as a Technical Account Manager at OpenMarket Inc, and have since accepted – I’ll be starting with them in early September, and have now got the unenviable task of finding myself an affordable place to live in Chiswick, London. Eeek. I’m hoping to head down there next week to have a browse around some houses, we will see what happens…

Before all that, however, I’ve got to get myself sorted for the Jamboree in Sweden. I’ll be travelling out a week on Tuesday (that crept up fast!), and spending a couple of days as a tourist before turning up on site early to be part of the ‘build team’, and then spending my time during the Jamboree itself as part of the International Service Team – not got a clue what I’ll be doing yet!

Might actually get time to breathe after all that is sorted out… The nice relaxing summer I’d imagined isn’t really working out!

Dissertation

Well – it’s all done and handed in! Now the dust has settled a bit, I’ve decided to write a page on this site about my project “Can a distributed architecture be applied to profile-based e-learning”, giving details of why I started research in this field, what I discovered, and how I think it’s going to progress in future. All of the documents are available to view if anyone is bored interested enough to have a read!

You can view all the details on the new page – Dissertation

Now, that’s enough procrastinating – back to exam revision! :-(

XBMC – My Experience

Over the Christmas holidays I got a bit bored (as you do), and decided to experiment with an old projector, turning my bedroom wall into a giant monitor!

I’ve been looking for some time to find a decent ‘10 foot UI‘, and from initial glances at the internet all fingers were point towards Apples FrontRow, however I didn’t want to sacrifice the Mac Mini to run as a media PC (although it would do a very good job – virtually silent!). I decided to go slightly off the beaten track and try XBMC (Xbox Media Centre as was).

I must say I was pleasantly surprised at how easy it was to set up and configure – within a few minutes I had a working interface that looked great, it was playing nicely with my network to drag videos off my main PC and download box (headless machine running get_iplayer and rtorrent in a cupboard, more on that in another post). My only major gripe is that the navigation is fairly awful – whether you’re using a keyboard or mouse (or a remote I presume), I can’t seem to figure out whether I’m needing to go forwards/backwards/up/down on the menus, and a lot of functionality seems to be duplicated.

The process of gathering TV and film information is pretty seamless, the scanner seems to run nicely in the background gathering data on my files, even though they’re sat on another machine. I’ve noticed a few false positives for TV shows, and you definitely need to do some config file editing to get TV files picked up.

I unfortunately don’t have the right kit at the moment to try and get live TV displayed through XBMC as well (from forum browsing it seems possible), although I have installed the iPlayer and YouTube extensions, both of which seem to be quite buggy. The iPlayer extension inparticular has some pretty major issues – trying to pause a video will cause the whole program to lock up!

Overall – I’m pretty happy with this solution for the meantime. Anyone who’s happy hacking around with setting files to get things working just how they want should be right at home, but I wouldn’t really recommend to anyone who’s after an ‘out of the box’ solution.

My take on the Kindle

For those of you kept in suspense since my last blog post – I bought the Mac! Managed to pick up a second hand Mac Mini from eBay on a second chance offer that was a bit of a steal! Got it fully up and running using Synergy and a KVM switch, but that’s another blog for another day…

Latest purchase is the new Amazon Kindle. They’ve really nailed down the price (nearly under £100 for the WiFi only version now), and the quantity and quality of books on there seems to be going from strength to strength. Basically, I wanted a device that I can sit in bed and read on without messing up my eyes, and also carry with me for odd moments where a book would come in handy. Having textbooks on there as well would be a huge bonus, saving on weight and cash! I’ve been meaning to get back into reading books for a long time, and am really glad I bought a Kindle – I’ve hardly put it down since!

First book I bought was Nikki Sixx’s book – ‘The Heroin Diaries‘ – it’s an absolutely fascinating view into the mind of a drug addict, as the main bulk of the book is a diary that he was keeping at the time, interspersed with stories and dialogue from the people close to him. I’d thoroughly recommend it! The buying process on the device is nowhere near as awkward as I anticipated either, the menus do flow quite nicely. I’m yet to try it with any textbooks (waiting to see what I need to read up on this year!), but I’m sure that even if I can get one course textbook on it, it’ll be a lifesaver in terms of weight!

A lot of people tried to dissuade me from getting one (Seb Payne & I were going to argue it out on Tech 107, but life got in the way!), saying that the Apple iPad was the way to go forwards, or to wait 12 months to see if colour e-ink displays come into the market. Buying an iPad is something that’s never even crossed my mind to date, the technology behind it is no different to my iPhone, which I have on my person most of the time, so buying a slightly steamrollered device that does the same job doesn’t make much sense to me! I do, however, want to see if colour e-ink displays will start to come of age soon, but I guess that (as with the Kindle) they’ll be extremely expensive on launch.

Well that’s my £0.02 on the matter of tablet computing (or whatever market you’d classify these devices in!), I’d better get doing something vaguely useful as opposed to writing blog posts. Dads & Lads camp with Cubs next weekend, and back up to Durham the week after to get prepared for the onslaught of Freshers week – can’t wait!!

To Mac or not to Mac

As you may know, I am the extremely happy owner of an iPhone. I also happen to be doing a degree which has something to do with programming (apparently…), leading me to wonder what would happen if I were to try combining these two!

I’ve previously had one or two ideas put to me for iPhone software, and also have thought of some myself. Objective-C looks like a bit of a pain in the backside to learn, but challenges are fun! The only obstacle left in my way is Apples decision to only let you run their iPhone development software on their own OS.

This leaves me with a couple of options. Firstly, I could put together a hackintosh on some old hardware, providing I’ve got some hardware lying around that it will work with! The only downside of trying that approach is that this is likely to happen. The other option is to buy one, I’ve been having a look at Mac Minis, which would probably cost somewhere in the region of £600 with student discount.

I don’t know if I’m ready to give up my Mac-hater stance and actually buy one, but I’m tempted…

Spotify update

I’ve spent the last couple of days playing around with the new version of Spotify, and have finally decided to shell out for premium on a trial basis. I must say – I’m impressed so far!

Read More

IST 2011

Heard back about my IST application last week – I got on!

This means I’ll be jetting off to Sweden next summer for 2 weeks of sleep deprivation and hard work, but hopefully will get a good laugh out of it!

Waiting to get the various forms and information though (should be waiting for me by the time I get home), and now really looking forward to the meetup weekend in July with the rest of the UK IST team, should be an awesome weekend.