Python-iView

30 August 2009

For those that don’t read my Twitter/Identi.ca stream, I’ve been writing an application, which I have neglected to name anything, so let’s call it Python-iView.

It’s a Python-based frontend to ABC iView, which if you’ve been living under a rock, is an awesome ABC TV programme catchup service that lets you watch most ABC programs from the last month in your browser. Not only that, but our ISP, Internode, has unmetered the service so it doesn’t use up our download quota.

However, it has some major problems:

  • It depends on the use of the Adobe Flash plugin, which is proprietary software, which means that only changes or fixes for bugs in the plugin that Adobe approve of can be applied.
  • Flash only runs on Windows, Mac OS X, and x86 (32-bit or 64-bit) Linux. (e.g. our 1GHz Apple eMac running Linux has a PowerPC processor, which Adobe have chosen not to support, and thus cannot access iView, but would otherwise be powerful enough to play the videos.)
  • The videos must be watched in the browser inside Flash, which is a lot of overhead compared to a simple media player like VLC. iView is too slow on older or less powerful computers. (e.g. iView is so slow it is unusable on my ASUS Eee PC 901, even though it internally only uses 640×480 FLV video which should in theory be playable by any computer made in the last 10 years.)
  • Videos must be launched from within the web browser, and cannot be watched offline (e.g. downloading in advance for a long car trip). Though the ABC offers a download service for some of its programmes, it is not as comprehensive as the iView programme. Nor can videos be downloaded for the purposes of fair dealing (e.g. interoperability — see points about Flash being proprietary above).
  • Not everyone has a fast Internet connection, and cannot watch the videos in real-time. You can get much smoother playback by downloading a video in advance and watching it once it is finished.

python-iview
To address this, I wrote the open source (GPLv3) application Python-iView, which does two main things:

  • Allows you to browse the iView programme outside of the browser (from a GTK+ interface).
  • Allows you to download episodes to your hard drive in their original FLV format.

You can then play the resulting FLV files in a media player such as VLC or Totem. The ABC formats their video into a 16:9 ratio in a 640×480 resolution. Because of that, the video may appear squashed — make sure to select the 16:9 aspect ratio in your movie player to compensate.

To get this magic application for yourself, install the following:

Then, run the following to download python-iview:

$ bzr branch http://jeremy.visser.name/bzr/python-iview/ python-iview

You can then launch either iview-cli for a command-line interface, or iview-gtk for a graphical interface. See the included README file for further instructions and usage examples.

Because of this application, I am now able to browse and view iView programmes on my Eee PC, Apple eMac (PowerPC), play programmes on our TV (through our Xbox) instead of having to watch them on a computer screen, or watch programmes during car trips.

Quake Live released for Linux

27 August 2009

All you Linux gamers rejoice, because Quake Live now works on Linux!

Quake Live on Linux

What’s that I hear you say? You use a 64-bit Linux distribution? Have no fear…

$ file *.so
npquakelive.i386.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
npquakelive.x64.so:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

Frag on! If you already have Quake Live, here’s my profile — feel free to add me if you’re somewhere around Australia or know me. I’d love to play!

Penumbra

16 August 2009

Last month, Penumbra had a special weekend where you could buy the collection (Overture, Black Plague, and Requiem) for only US$5 (which, at the time, came to $6.66).

I’d previously played the Penumbra tech demo, which didn’t have any storyline, but showed me that the game had a big emphasis on physics and interaction. The actual Penumbra game makes very clever use of physics to create a very interesting and challenging puzzle game, with game graphics, including awesome shadow effects, that create a very spooky atmosphere.

Turns out that they have a Linux version of the game, so of course that is what I bought for the special.

Penumbra is a horror series, which, I have to admit, is not my cup of tea. I cannot play scary games in the dark, and the slightest noise or puff of dust makes me jump. However, the intriguing storyline kept me playing. A friend of mine, Josh, who also bought the series about a year ago, tells me that the storyline is very Lovecraftian. Having never read a Lovecraft book, I will have to trust his observation.

Throughout the series, you navigate areas which are mapped out and labelled. Unfortunately, after you get near the end of the series, getting to a new area, and being presented with a new map feels like eating stale bread — rather repetitive.

Throughout Overture, the first episode of the series, are savage dogs that guard many of the areas. The dogs were the only real enemies in Overture, and the only creatures that you could kill. Killing the dogs was painfully repetitive — I would throw an object at it to stun it, and then hack at it with the pickaxe until it died.

However, I did like many of the puzzle elements of the series. Having to decode morse code coming in through the radio, and working out how to open a door without the key in it come to mind immediately.

The horror elements of the game were certainly well done, and actually served a second purpose: I dreaded going on to another area because I knew there would be more horrible surprises waiting for me, so I spent more time in existing areas paying attention to detail, reading notes, trying to find additional clues, etc.

Black Plague, the second episode, I felt had more variety, but the addition of Clarence, an alter ego voice inside your head that is apparently a symptom of your ‘infection’, kind of spoiled a lot of the sequences. It was interesting that though the storyline was wrapped up in the end, it wasn’t a very happy end. Josh tells me that is typical of Lovecraftian stories.

Not only that, but Black Plague was plagued (heh heh) with bugs. There was an area where you would walk into a small room, and the door would close behind you, trapping you in with a giant worm that you had to figure out how to kill. The door, however, got stuck (or possibly moved the wrong way), and didn’t close.

Also, in another area, I had to lead a zombie into a room full of cyanide gas and trap it in. However, the door failed to close (I checked walkthroughs later on, and the door was definitely meant to close), and just shuddered and made a looping sound. Luckily, the zombie disappeared anyway, as it was scripted to do that. In the same area, I had to program computer “interface cards”, and slot them into a “server” to activate a computer terminal. Unfortunately, the interface cards kept getting stuck in the slots on the server, so I had to keep reloading from a saved game until it worked.

Requiem is mainly focused on puzzles, so I haven’t played much of that yet. Penumbra minus the storyline is only half the game.

All in all, I think Penumbra is a great series that despite not being made by a zillion-dollar company has realistic horror, an engaging storyline, challenging puzzles, and satisfying physics.

Multiseat tips

3 August 2009

Recently, I’ve set up multiseat on my system, which means that, unlike multihead, where the desktop is expanded to two monitors, two sets of monitors, keyboards, and mice are attached to the computer, but run separate desktop sessions, meaning the computer is acting like two separate computers.

The setup is very neat, and performance is surprisingly good. For all but the most graphically and processor-intensive applications, the fact two people are logged on to the machine is not even noticeable, from a performance point of view.

Some helpful guides on setting such a system up are:

However, there are a few gotchas when setting it up. Hopefully this list will be of help.

  • Multiseat is very buggy. Test one X server at a time (by manually launching it with the right parameters), and do it from a remote computer over an SSH session, because your display will probably get corrupted, making your console temporarily unusable if you make even the slightest mistake.
  • If the display is corrupted, and you are restarting X several times, and it doesn’t look like it’s going to work, it’s probably a good idea to reboot (do it safely, by either remotely rebooting, hitting Ctrl+Alt+Delete, or by using the Raising Skinny Elephants trick), because there’s a good chance your problems will be solved after a reboot.
  • If you are using NVIDIA cards with the nv or nouveau driver, while I commend you for supporting free software, I have never got those drivers working with multiseat. I recommend running the proprietary driver (and different driver versions have different glitches with multiseat — if you are having problems, try an older — or newer — driver).
  • Don’t mix-and-match video cards of different brands. A 3Dfx and NVIDIA card won’t play nicely, for example, but an NVIDIA and NVIDIA card may. Also, there are weird bugs with certain models. For example, my GeForce 7600GT and GeForce 6200 don’t work well together, but the GeForce Go 6150 and GeForce 6200 work fine.
  • If you are using an ATI Radeon, then use the Xephyr method. Radeons cannot support the use of the Screen keyword in separate layouts.
  • If you are getting issues with the screen scrolling or rotating of sorts (like a sideways badly tuned old-style television), then try adding no-scroll to your kernel boot parameters.
  • When launching X.Org (or in your gdm.conf configuration), the -novtswitch and -sharevts options that are described in all multiseat tutorials can sometimes cause more harm than good, and may even be unnecessary. For example, if you use -sharevts, your keystrokes may silently be duplicated to a hidden login prompt which could wreak havoc on your system.
  • In the [daemon] section of gdm.conf, set VTAllocation=false to stop GDM from appending its own arguments to the X.Org command line. Specify vt7 (or whatever VT you want X.Org to run on) manually on the X command line — and make sure both X servers are set to the same VT.
  • Sound is a pain to get working. Make sure PulseAudio is either running system-wide, or make PulseAudio use dmix:0 instead of hw:0 as a device (yes, I know Lennart would cringe, but at least it’s more reliable). If you created a second user to test with, don’t forget to add him/her to the audio group!