HOWTO

Homer's picture

Return to Castle Wolfenstein on GNU/Linux

Like most iD titles, RTCW was ultimately released under the GPL, and is thus available as a GNU/Linux native game. Installing it under Gentoo is as simple as "emerge games-fps/rtcw", but unfortunately the game itself no longer works in modern GNU/Linux systems. This is only to be expected with proprietary software that becomes abandoned, and would affect the operation of that software on any OS, but naturally it doesn't have to be that way with Free Software, which can be revived at any time, even years later.

Homer's picture

Video Fixer

Here's a script I wrote to "fix" videos I ripped from DVD/BD, where the rip is too big to fit on a FAT32 formatted flash drive (my Smart TV doesn't recognise NTFS or ext2/3/4 filesystems), has the wrong resolution/aspect, and/or possibly contains multiple language audio tracks I don't need (my Smart TV also doesn't play DTS audio).

Homer's picture

High quality MPEG-4 transcoding with Mencoder

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.

Homer's picture

Give Linux a Windows-style "Registry"

The Ultimate Abomination

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.

Homer's picture

Firefox / Icecat Tips

Kill that damned "urlclassifier3.sqlite" problem once and for all

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.

Homer's picture

Windows By Stealth: The Updates You Don't Want

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.

Homer's picture

Howto: Encode H.264 Video for the iPod using ffmpeg

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
Homer's picture

Howto: Uncap the EU Volume Limit on 5.5G iPods

For my Birthday, I received a new generation iPod, or the so-called 5.5 generation.

I have to say, as much as I am ardently opposed to DRM (and Apple's and Microsoft's support of it), this little gadget is (as Steve Jobs would say) simply amazing!

This is the first portable player I've owned that could play video, and that fact; combined with the superb build quality, incredibly intuitive interface, limited (but still very nice) PDA capabilities, cute little games (not on a par with the PSP, but still ...), and gorgeous sound quality; really makes this a device worth cherishing.

Homer's picture

Fix Emacs Slow Startup

Quick tip: If you've customised Emacs in any way (fonts, colours, etc.), and subsequently found that it takes ages to start up, then exit Emacs and try this:

]# echo "(modify-frame-parameters nil '((wait-for-wm . nil)))" > ~/.emacs.tmp
]# touch ~/.emacs
]# cat ~/.emacs >>~/.emacs.tmp
]# mv -f ~/.emacs.tmp ~/.emacs

Thanks harfooz.

Syndicate content