
Rather than just provide a script, I've decided to present this solution as a sort of informal thesis, so hopefully it will help others to reinterpret it for their own purposes. As of 10th Dec 2011 this article is still a work in progress, so if it seems incomplete then please have patience, and come back later.
Objective: Transcode video from any source to MPEG-4 ASP (note: this is DivX 4/5, not MPEG-4 AVC/H.264), for playback on most standalone devices, keeping the file size reasonable, whilst retaining as much quality as possible, but without any regard to transcoding time or CPU utilisation. In this case I'm also going to hardsub (render subtitles directly onto the output video) a SRT subtitles file previously ripped from the source's forced subs (subtitles that only appear when foreign language is spoken, in a soundtrack that is otherwise in your locale's language). You can rip your own subtitles files using SubRip (Windows, also works under Wine) or Avidemux (multi-platform), or just download them from places like opensubtitles.org.
Note: The method used here is extremely CPU intensive, which may cause your PC to die of exhaustion, and you to die of boredom. You have been warned. :) However, the result is worth it IMHO, as the video quality is exceptional. H.264 generally produces better results at lower bitrates (or so Messiah Jobs keeps telling us), but unfortunately it's not compatible with nearly as many devices as DivX/XviD (e.g. most Smart TVs will play MPEG-4 ASP DivX/XviD files, but not MPEG-4 AVC H.264 files, mainly because H.264 is infested with a ton of nasty patents that make it difficult and expensive for manufacturers to implement). Also for compatibility reasons I've chosen the AVI 2.0 container format, and forced the FourCC from FMP4 to DX50.

First of all, let me make it clear that this is only meant to be a joke.
No really, it's a joke.
Please, for the love of God, do not pervert GNU/Linux into Windows, by giving it the worst configuration storage system of all time.
Having said that, it does actually work (FSVO: "work").
The following takes the contents of "/etc" and "$HOME/{userid}/{dotfiles}", and creates a Windows-style "Registry" from them, comprising two Sqlite3 databases: SYSTEM.DAT.db and USER.DAT.db respectively.

Turn off (uncheck) "Block reported attack sites" and "Block reported web forgeries" in Firefox/IceCat security preferences. Unless you're an idiot, or running Windows, then you probably don't need this.
Then quit Firefox/IceCat, and:
cd "$HOME"
find . -name urlclassifier3.sqlite -exec rm -f {} ';' -exec touch {} ';'
su -c "find . -name urlclassifier3.sqlite -exec chattr +i {} ';'"
"chattr +i" means "change the file attributes to immutable", meaning "can't change or delete".
This will now ensure urlclassifier3.sqlite remains a zero byte file forever.

On the back of the recent WGA fiasco, further research has revealed yet another citation of what I already knew to be true: Windows updates itself without explicit permission, even if you turn off automatic updates.
NEW! ... Further proof, confirmation, and details of this has been provided by Scott Dunn of Windows Secrets, and Adrian Kingsley-Hughes of ZDNet.

Save this script somewhere, e.g. /usr/local/bin/podit, then chmod 755 /usr/local/bin/podit
Usage: podit /path/to/file
Update: Apparently ffmpeg's parameters have changed yet again [sigh]. Depending on what version of ffmpeg you are using, you may need to make the following changes:
Update 1:
-vcodec h264 is now "-vcodec libx264"
-acodec aac is now "-acodec libfaac"
Update 2:
-me is now "-me_method"
-loop is now "-flags +loop"
-slice is now "-flags +slice"
(To set both the above, use "-flags +loop+slice"
-part[xxx] is now "-partitions +parti4x4+partp8x8+partb8x8"
-brdo has gone. This is automatically set if "-subq" is 7 or higher
-chroma is now "-cmp +chroma"
Also ... nobody noticed that "aspect_ratio=xxx" was missing from the variables section (as it stood, this script would not have worked, but just produce an error "invalid aspect ratio")? Oh well, it's fixed now :)
Thanks to FakeOutdoorsman for update 1, and various sources for update 2.
#!/bin/bash # Name: podit # Summary: iPod H264 640x480 video transcoder script # Version: 1.1.4 # Date: 2009.10.12 # License: GPLv3+ # URL: http://slated.org/howto_transcode_h264_for_ipod_with_ffmpeg # © Homer, 2007 - 2009 # # Requires: ffmpeg # Requires: gpac # Requires: perl-DateManip