IMDb Data and iTunes

Using python, it’s easy to get data from IMDb into your iTunes database.

You’ll need a few tools to get this working. appscript, py-IMDb and CocoaDialog. Install each of these, and for the latter, note where you store it. I’m not going to go through the code, as it is fairly well commented. If you can’t get it to work, leave a comment and I’ll see if I can help.

IMDB2iTunes.py

Note that you will need to save the file above, and rename it so it has a .py extension.

EyeTV and two tuners

I love my Mac Mini. It does almost everything I want. With the purchase of a second tuner, EyeTV actually becomes useful. Previously, when I tried to record two programs that adjoined one another, but were on different channels, then you were likely to miss the start of the second program, and/or the end of the first program. Even if you set some padding (I use -5/+15), because there was a single time where the transfer needs to take place, chances are you miss some TV.

So, with two tuners, the system flawlessly records two programs at once. Which means the pre/post padding is respected, as long as there is no clash with other scheduled recordings. It means you then need to edit (or just skip, if you plan on watching only, not keeping), but at least you get all of the material. Oh, and it takes up a bit more disk space.

But the hassle I discovered is that the USB subsystem seems to choke under the load, if you record a program and try to watch another. The picture and sound of the program you are watching becomes jumpy and broken.

I made the program smoother by putting the record buffer into RAM. (And making it much, much smaller).

Note that this is using a USB disk as the recording location, I’m hoping to get much better performance when I move the drive to a Firewire enclosure. However, I can record two programs without jumpiness, so it may be something to do with the Live TV Buffer and how it is handled.

I don’t use live buffering much anyway, so I may just live without.

Transfer ratings from one iTunes Mac to another

I’ve consolidated all of my media onto my new Mac Mini, but didn’t really think some things through when I first did it. For instance, I put all of my video data in before transferring my music across. I’ve still kept a copy of my music on the laptop, for what it’s worth, but because I just copied files, then I lost all of my rating data.

I looked at a couple of solutions for transferring the ratings, the most promising was a semi-manual method of creating smart playlists, one for each rating.

That was too old-tech for me, so I came up with a solution that uses Remote Apple Events. Now, to make the code easier, I’m using python and appscript, so make sure you have both of those installed.

 1     #! /usr/bin/python  
 2     
 3     import appscript  
 4     
 5     # Set up the two iTunes libraries.  
 6     local = appscript.app('itunes')  
 7     
 8     # You'll need to replace jens.local with your remote machine's name  
 9     remote = appscript.app(url='eppc://jens.local/itunes')  
10     
11     local.lib = local.playlists()[0].tracks()  
12     remote.lib = remote.playlists()[0].tracks()  
13     
14     # Create a dictionary with all local track names/artists/albums  
15     library = {}  
16     
17     for each in local.lib:  
18         key = each.name()+":"+each.artist()+":"+each.album()  
19         library[key] = each  
20     
21     # Iterate over every remote track.  
22     # If it is in the local library, take the local rating and  
23     #    apply that to the remote track.  
24     for each in remote.lib:  
25         key = each.name()+":"+each.artist()+":"+each.album()  
26         print key,  
27         if library.has_key(key):  
28             each.rating.set(library[key].rating())  
29             print "rated."  
30         else:  
31             print "doesn't exist in local library"  

That’s it. I’ve used this to transfer all of my ratings from local to remote iTunes. Granted, there is no check to see if I’ve got all of the local tracks on the remote machine - but that is mainly because I don’t have my Podcast library on the remote machine, and I hope (know?) I have all of the music, and that’s the stuff I care about.

Here’s a screenshot from my remote library.

How Crap is Vista Media Centre?

Short Answer: Very.

Yesterday was the first time I really got to use Vista properly. And the whole OS is crap. Stuff is not consistent across contexts, which means it is really hard to figure out what to do when. Trying to find data is troublesome, trying to find applications is even worse. It is like the whole operating system is conspiring to just leave your data all over the place so you can’t find it when you need it.

So, I had a few jobs to do for my Father-In-Law, after he had bought his new Acer laptop. I should have just refused to provide support since he didn’t buy a Mac, but I’ll let that slide. The things he needed to do were set up his HP printer/fax/scanner, which can be connected to a network wirelessly or via ethernet in addition to being USB connectable; and get his TV tuner card working properly.

The printer turned out to be a bit of an issue - the driver that it came with didn’t work with Vista, so we had to download a 160MB file, which shouldn’t be too much of a concern, but 3’s “7Mb/s” connection is closer to around dialup speeds. And I’m not talking 56k, either. We had to wait over 3 hours for this file to download. After that, it looked to be pretty easy. Except that because the 3 USB thingy was the default network route, I had to disconnect it to then get the PC to even look on the Wireless network (802.11g) to find the printer. After it was connected once it seems to work fine, although just in case I gave the printer a static IP address (or more correctly, a reserved dynamic IP address).

Getting Windows Media Centre to display TV guide data was a bit more hard work. For starters, they have totally fucked up the interface - it is really trying to do too much, and the interface just isn’t logical at all. It is “designed” so it can be used with a remote, apparently, but can still be controlled with a mouse. Except the buttons sometimes act strangely. There is a “back” button, and just next to it is one with the windows logo. But the operation of this button varies according to context. So sometimes that loads the menu up, other times it appears to work similar to the back button. And sometimes the menu that appears takes up the full screen, other times it doesn’t. Fucking crazy. Sometimes you need to double-click on a menu item to activate it, other times a single click does the trick. There are so many options on each of the menu items that you can’t see them all until you scroll through them, but when you hover over one, clicking it doesn’t activate it, it moves it to the active position, where you must click it again to activate it. Which means, using the mouse, you then need to move back and click. And sometimes there is a “more” arrow that appears over the item, and you accidentally click that instead…

If you are using a scroll mouse, things are even worse. If you use the scroller, then it scrolls, but if you then move the mouse even just a little bit, it selects the stuff under the pointer. Meaning it jumps around and makes it very hard to scroll through a large list. Scrolling also sometimes selects items outside of the active widget. For instance, I had the channel list being scanned, and if you scroll with the pointer over this, you can scroll outside of the list, and choose the buttons above and below the list box. But once you are out of it, you can’t just scroll back into the list box. Another trick I use is to scroll hard to the “end” of a list box if I know I need to choose the last item. You can’t do this, as it jumps out of the box. And then can’t get back it. And it resets the list box to display the top items anyway!

So the interface is fairly fucked. The logic of the layout also doesn’t make sense. Why should you go into “Guide” to change the channels. And I’m not talking about which guide is attached to which channel, I’m talking about which channels are active. And attempting to do anything often required going into a menu three layers deep, then going back, then going down through three other menus, and so on. Very frustrating.

The most annoying thing is that it will not use the program guide data that is broadcast with the DVB signal. You have to use an external EPG system in order to see what is on. Every station in Australia broadcasts some guide data, or will in the very near future. I use IceTV with my eyeTV, but I’m hoping at some stage not to have to any longer. $13/month is just crazy. I can buy the newspaper for $2/week with the TV guide in a less useful form. I should be able to access this data for free - it adds value to the TV signal. But Windows Media Centre will not access the broadcast signal at all. Which means if you are away from the internet for any period of time, you might not be able to see what is on TV. I love the internet and all, but having the internet shouldn’t be a requirement to be able to watch TV effectively.

I’m not saying eyeTV is perfect, but it certainly shits all over WMC. Even if it only plays TV programs.

Compressing Compressed Files

I’ve ranted about this type of thing before, but one thing that really pisses me off is when people attempt to compress already compressed files. I love the BBC program Spooks, but because they are still showing a series that is about 3 years old in my country, I’ve been forced to download the series via slightly shady means.

So, I’ve just grabbed the first few episodes of series 6. And the joker who made the first episode decided to rar th avi file. And split it into 15MB chunks. Why would you do this? At best, it is just slightly annoying (you have to unrar the file before you can use it), at worst it means you can’t access the file. If I were unable to snarf the entire torrent, then I would not be able to unrar the file, meaning I could not view any of the video. To put that in perspective, when I grabbed a Grand Designs episode I had missed on local TV, I only got 99.3% of the file. But I can still watch it in a viewer, and I can’t even see where the data is missing. I would not be able to do this with the Spooks episode.

Luckily, the whole thing downloaded, so it isn’t a big issue. Not this time.

EyeTV Settings of Interest

Still hacking away with EyeTV.

$ defaults read com.elgato.eyetv

Has some interesting values:

  • “use TenFoot UI” = 0;
  • volume = 1;
  • picture = { brightness = 128; contrast = 142; hue = 128; saturation = 128; };
  • “pip offset horizontal” = 0.08333333333333333;
  • “pip offset vertical” = 0.08333333333333333;
  • “pip rel height” = 0.25;

I’m guessing that the volume one might be useful, if you can make it louder than 1. As for the PIP settings, as I’ve found the window to be somewhat too large.

Petabytes

And I thought me (almost) reaching my quota every month was making me a heavy user of the internet. I came across this on a torrent site:

Yes, that’s what it says. He’s downloaded 730 Terabytes, and uploaded 18,000 Terabytes. In about 18 months. That’s uploading about 1,000 TB/month.

Or another way, about 33TB uploaded every day. Which cannot possibly be right. 3TB per hour. 1TB every 20 minutes. 50GB per minute. Just under 1GB every second.

I put it that this is false.

Bible on chip smaller than pinheads who read it

Snarfy mode on.

Finally, a bible smaller than the brains of the pinheads who believe it is the word of god.

Happy Festivus.

Media Centre Workflows

I have some tasks that I repeat lots on my Media Centre, and sometimes it is a bit trying. I’ll discuss a couple of them here, and perhaps discuss how I overcame them, or in later posts as I do.

Firstly, I’m currently using EyeTV to watch and record TV, and Front Row to watch stuff I already have.

Editing out the advertisements and fixing the start and end of a program is a little challenging at times. Because my Mac Mini is keyboardless, then I have to either use Synergy (or -alike) and use my laptop mouse/keyboard/trackpad, or go the whole hog and use VNC, or Screen Sharing as Leopard calls it.

It would be nice to be able to do the editing on a remote machine, but I can see how this would be challenging, since there is an awful amount of data that needs to be transferred. But perhaps not as much as is being transferred via VNC, anyway.

I’d also love to be able to run the application on my laptop for editing schedules. Basically, you have all of the functionality of the software, but the recording (and encoding, etc) is done on the remote machine. It would also allow me to schedule and so on without interrupting the display on the TV.

The biggest issue I am having is with transfer of data from torrents and EyeTV into iTunes. I’ve put in most of the pre-existing stuff I have, but there are a couple of issues. If I export to iTunes (AppleTV, I think it is called in EyeTV), then the data gets put into the iTunes library location. Which is bad, since that is on a small disk, whereas the library files are all on external, and much larger, disks. If I import a torrent file into iTunes, I need to do the following:

  • If the file is not a .mov or .mp4, then open the file in Quicktime and Save a Reference Movie. Which cannot be automated under the new quicktime, for some reason. Add this file that is created to iTunes.

  • Edit the file, and make sure the Video Type flag is set to the right type (Movie or TV Show). This could be automated, as could the TV Series, Season Number and so on. With a heap of files I had I did automate this, since I had meticulously renamed and located the files into a tree structure. Of course, I created throwaway scripts for this, since they were all slightly different for each programme.

I think I could automate the process a bit more if I export the files to mp4 files, rather than trying to make reference movies. Since I now have one of those Elgato Turbo 264 thingies, I might do that.

I think a few of the problems would be solved if I could make the Mac Mini think it had two monitors, and I could just ‘connect’ to one of those. That would then enable me to do stuff while the TV was still being watched. However, I have noticed some jumpiness when things are happening and you are trying to watch TV sometimes. I also need to get up on my roof and adjust my aerial to try to improve my reception of some channels.

Oh, and to allow me to record two programs at once, I’ve ordered another EyeTV for DTT stick. Handily, my amplifying splitter has three outputs, so that’s cool.

Finally, I’ve tried out a couple of alternative systems, MediaCentral, XHub and CenterStage. None of them really do what I want them to do. XHub gets close with it’s integration with EyeTV, but you can’t access EyeTV’s menus. What would be great was if EyeTV had the ability to access other media files (which it can, from the menubar, you can open movies!), or if it were better integrated with Front Row. MediaCentral got close there, with their other program, which was a fair bit crapper than EyeTV. Never mind that you can’t play HD tv through their software, at least in Australia, since we use AC3 audio, which it can’t handle.

Ch...ch...ch...ch..changes!

Well, I’ve finished my job as a Teacher. I might write more about it later, but I’ve been flat out doing a heap of other things. I will just say, it’s great to not be doing that any longer. Sure I’ll miss some aspects of it (casual day, for instance), but I am much happier knowing that it’s all over.