Extracted Enhanced Podcast Files

I finally found a way to extract the XML files from enhanced podcasts that handle chapters and links.

  1. Open up the podcast file in Quicktime.app
  2. Window > Show Movie Properties
  3. Select the first ‘Text Track’ and ensure it is enabled.
  4. File > Export
  5. Select the ‘Text to QuickTime TeXML’ format

You should then have a lovely XML file. Just need to figure a way to parse the files to get the simple stuff out. Like when to display a link/when a chapter starts, and grab the link/chapter name.

lighttpd and PHP on CentOS 5

Here’s a quick run down on getting lighttpd and php running on CentOS 5.

yum install lighttpd lighttpd-fastcgi php
mkdir /var/run/lighttpd
touch /var/run/lighttpd/php-fastcgi.socket
chown -R lighttpd:lighttpd /var/run/lighttpd/
vim /etc/php.ini

Add in php.ini the following; cgi.fix_pathinfo = 1. Save and close the file.

Now open up /etc/lighttpd/lighttpd.conf. Uncomment the following line "mod_fastcgi", from the server.modules option. Then ensure that the following is uncommented:

fastcgi.server  = ( ".php" =>
    ( "localhost" =>
        (
            "socket" => "/var/run/lighttpd/php-fastcgi.socket",
            "bin-path" => "/usr/bin/php-cgi"
        )
    )
)

Save the file. Now create a test file, /srv/www/lighttpd/index.php and just include <?php phpinfo(); ?>. Now open your favourite browser and visit http://localhost/index.php. You should be greeted with a friendly PHP page, and you’re set to go.

Merge video files with mencoder

To merge video files together with mencoder is simple:

mencoder -oac copy -ovc copy file1.avi file2.avi file3.avi -o full_movie.avi

Mac OS X/HFS+ case-insensitive? Why?

I just found out that HFS+, the preferred file system for Mac OS X, is case-insensitive when it comes to files and directories. I don’t understand why? It’s sure as hell causing issues with stuff I’m copying from my Ubuntu PC.

Just seems like a dumb idea.

Killing a program using a batch file in Windows

Having got my keyboard shortcut working to launch my batch file, next was to actually make it quit the emulator program when invoked.

@echo off
taskkill /F /im Fusion.exe

This is basically the command prompt version of CTRL + ALT + DEL. /im stands for ‘Image Name’, which is basically the program executable, and is the same as what you’d see in the ‘Task Manager’ window. /F just forces the program to close.

Using shortcut keys in Windows

You won’t find me writing about Windows too much on here I promise. I’ve been forced to use Windows XP on my arcade machine due to the lack of a decent Sega Mega Drive (Genesis for anyone in the US) emulator on Linux. That has caused other problems though, because the Fusion emulator doesn’t allow me to specify a keyboard combination to quit the program via the keyboard. You may be wondering, ‘Why not just hit Alt + F4?’ Because I’m hoping not to have a keyboard plugged in all the time, and just use the joystick and buttons (which are mapped to specific keyboard keys).

I was going to try and be clever and modify my Python program to intercept a global hot key combination, and then kill the emulator, but thankfully stumbled across the idea of using a Windows shortcut with a shortcut key (the terminology gets quite confusing). The shortcut would be linked to a batch file that would quit the program.

To cut a long story short (which involved Googling… a lot), shortcut keys can only be used when the shortcut is located in either the Start menu or on the Desktop.

When I launch the shortcut when the emulator isn’t running, it opens instantly. I’ve noticed however, roughly a 15 second delay for the shortcut to invoke if the emulator is running. I’m guessing that this may be something to do with the event buffer in Windows, and the emulator taking up a chunk of the CPU. Though I’m just guessing. If anyone knows a fix for that, I’d love to hear from you.

vim: find, comment, save and quit

For the last month, I’ve been teaching myself vim. So here’s an explanation for anyone interested in the commands I used for this post.

(more…)

2008-02-29 [, , ]
View Comments