Friday, April 30, 2010

My 8 year old laptop's LCD backlight is busted - it just suddenly turned off on Monday morning. It stays off during a reboot. If I shut down the box and turn it on again, the backlight does turn on, but after a short (and random) period of time it turns off again.

I'm pretty sure that it's the backlight that's busted because, under the right lighting conditions, I can still see the stuff displayed on the screen, but it's very faint.

I've tried to manually control the screen power saving mode by blindly typing

vbetool dpms on

at the console, but this has no visible effect.

The box is otherwise just fine, and it still functions as a backup server, web server, firewall, printer server etc. It's just that I can't use it as a desktop.

What a bummer.

I'm still considering my options. I've been thinking of getting a new laptop for my wife for quite a while, since the (extended) warranty on her current, 4 year old, laptop expired, and she does need a lighter machine (2.7kg is pretty heavy...). But a new laptop would cost more than fixing my box.

Friday, April 23, 2010

Suppose you have a bunch of AVI files, named part_01.avi, part_02.avi, etc. Suppose, furthermore, that you want to concatenate them into a single AVI file named concatenated.avi. Here's how to do it with MEncoder:

mencoder part_*.avi -o concatenated.avi -ovc copy -oac copy

This should work nicely as long as all parts have been encoded with the same video and audio encoders, using similar encoding parameters.

Now, suppose that you've downloaded a bunch of MP4 video files from, say, youtube.com using a command line tool like get-flash-videos (highly recommended!), and you want to concatenate them into a single AVI file. But some of these files have different encoding parameters than the rest, so we need to re-encode the files such that their parameters match:

where the parameters can be determined by examining the console output of MPlayer during playback of each file and selecting the parameters that match most files, in order to reduce quality loss as much as possible (you may find this script helpful).

Re-encoding is a time consuming process, so unless you absolutely need these files concatenated (e.g. for playback using your DivX DVD player), you may just want to playback the files in order...

You may run into errors due to missing Perl modules that the original missing module depends on. If this happens, you'll need to repeat the installation process for each missing module (again, either from an existing Debian package or using dh-make-perl).

I suppose the latter method makes sense if, like me, you only need a small number of non-Debianized Perl modules installed - I like being able to manage these modules with the usual Debian tools such as aptitude, instead of having to learn to effectively use yet another package maintenance tool.