Saturday, December 30, 2006

Play that DVD on your phone

Sure, you paid for that movie on DVD. You didn't care what format it was in, you just wanted the movie. Now you're busy like me and you want to watch it on your cell phone or handheld video player. This article tells you how it's possible, without buying any software.

Before I get into that, though, I have to warn you. The movie studios don't want you to have that content available in the format you desire. You're going to break the laws of several nations on your way to convenient video. Such is life. When you get busted, I didn't tell you to do it, I only told you how. BTW, this guide is for media shifting and legitimate backups only. Don't go using this information for sharing purposes. If you didn't buy access to the content, you've got no right to it. If you're not sure you have a legal right to make backups in your local area, consult the services of a legal professional before continuing.

On with the show. This isn't the only way to do this, but it's a convenient way if you have the necessary equipment. You'll need:

A windows computer
A linux computer
A device to play your video on that plays MPEG2.

The first thing you need to do is to get it off of the DVD and onto the hard drive of your windows PC in an unencrypted format. For this you can use the program DVD Decrypter. Just install it from the downloads section of and insert the DVD. The default settings almost always work. You'll want to do one movie first, just to be sure you have it right. After that if you're converting bunches it might be best to decrypt several at a time.

The next thing is to get it out of the DVD file format and into something a little more portable. For this you can use Auto Gordian Knot (AutoGK). It's available from the same source. In this step choose encoding as AVI with Xvid video codec and MP3 VBR for the audio. For output settings choose 100 percent target quality, rather than size or CD's based output. That way your output will come all in one file and it will only require one pass (it's faster). Also, multiple sessions of lossy compression introduce unwanted artifacts in the output. Always keep the maximum quality until the final rendering step. Don't worry -- the file will be small enough to fit in your player when you're done. If you're doing a batch, choose Add Job and then select a different disk folder and output file and add it to the batch. Click start.

AutoGK uses some external programs to convert your file according to the settings you gave it. They're installed with AutoGK, though and you don't have to think about them much. The first time you use them though, at various steps you'll be prompted to accept their license terms. AutoGK is doing the really hard part here. It's converting the original coded and compressed video into a different video code basically by uncompressing the images and then recompressing them in the new format one at a time. A movie has hundreds of thousands of image frames, so this can take some time. In addition to this it's doing the same thing with the audio portion of the movie, and keeping the sound in synch. If your computer isn't completely stable and reliable, this is when you find out.

Once you have your output .avi file, you need to get it over to the linux computer so you can process it with ffmpeg. It's possible to get ffmpeg installed on your windows computer, but there's no way I can provide instructions for that in a blog post. If your computers are networked, you can just save the file over to the linux box. Otherwise you can burn the file to a DVD. It can be pretty large, though. Some of these files will be more than 2GB. You can also use an external hard drive. External HDD's are available in larger sizes. Most current linux distributions can read the files off of an NTFS formatted external hard drive. If the hard drive is formatted with FAT32 instead, you'll have to keep your file sizes under 2GB. However you get it there, you'll want the .avi file on a hard drive that's local to your linux box.

When you have the file on your linux box the last step is easy. You'll need ffmpeg. It comes with most linux distributions, but if you don't have it, get it the same way you get your other software. (Note for windows only users: linux usually comes with software to install thousands of useful programs like this for free.) While you're at it get vlc (videolan-client) as well for watching movies. Run ffmpeg on the file like this:

# ffmpeg -i IN.avi -s 352x288 -ab 32 -ac 1 -b 64 -ss 25:00.00 OUT.mpg

Replace IN.avi and OUT.mpg with the files you want of course. The options are like so:
-i IN.AVI - the input file
-s 352x288 - The output resolution. Use what's appropriate for your device.
-ab 32 - Audio bitrate 32kbps
-ac 1 - Mono output
-b 64 - Video bitrate, 64kbps
-ss 25:00.00 - Start 25 seconds into the video

How long it takes to convert varies with your computer power. On a Core2 Duo laptop the decrypting takes about 20 minutes. The convertion to AVI takes about an hour. On an Athlon 2500+ the .mpg conversion takes about 30 minutes. All of that for a typical 90 minute movie, using the settings above. The finished movie might be 96MB. Quality is about what you would expect for watching a DVD on your phone.

The last step is to get the .mpg movie into your device. SD media is great for this, or you can use whatever synch system comes with your device. Since it's unencrypted baseline video, it should play in almost anything that claims to be a video capable device. A two GB SD card holds about 20 typical movies.

If you have better ideas for how to do this more conveniently, I would love to see your comments.

Saturday, December 16, 2006

Flash HDD

A lot of noise is being made these days about Flash chips and their potential use as system hard drives. I thought I would write about some of my impressions on the subject.

The first issue is write cycles. In the past Flash media was good for less than a million writes or so. This was completely unsatisfactory for most uses as an operating system media because systems generally use the hard drive as a swap, or short term place to store programs and data when they're not busy. In an active system the swap memory can be rewritten thousands of times a day, as programs are swapped into and out of memory very actively.

There are operating systems that don't function in this way. Certainly this process was necessary when computers had little memory, but with cheap PCs able to handle eight or sixteen gigabytes of memory, but it doesn't seem to be as necessary as it once was. Choosing to avoid the issue in this way does limit your choice of OS, but not horribly so.

Recent advances in flash memory have extended the life of the flash memory into hundreds of millions, or more, of write cycles. If you're willing to accept a lifespan of five to ten years for your flash memory, you should be fine with what's available now. Certainly we can expect this trend to continue. Flash will get more durable life cycles until they finally are good long after one would normally consider them obsolete.

Currently available flash media (December 2006) comes in sizes up to 32GB for Secure Digital media. That's a lot of memory for a card that small, and it comes at a premium price. When I first bought a flash drive the largest available size was 64MB, and it was only a few years ago. Since sizes have increased five hundred times in just a few years, and manufacturers are even now working on several generations of denser media. Since a large operating system install should be no more than 8GB currently, and that size is available, Flash Media has cleared the hurdle of being large enough to handle the job. Although larger form factors are available now for 32GB media, the cost of the flash chips is enough to prevent a large market for the devices and so they're not yet common except for those who have no budget constraints.

Speed is another issue when considering Flash media for your system drive. Although Flash currently can be much slower than HDD media, that is changing as ever more chips are added and accessed in parallel. Already you can get media that reads and writes faster than an ATA HDD. Soon they will be much faster. More importantly, since Flash has no moving parts there is no latency to speak of and every file is as close as any other. This simplifies much of the disk access process and makes file access much faster. Speed is about to cease to be an issue for Flash media, and already for most uses it's faster than a hard drive. With Flash a cache might be necessary for some applications, but different from HDD media, the amount of time it takes to flush the write cache is predictable and controllable from the system rather than the controller or on-drive electronics. This makes shutdown issues go away almost entirely.

Power issues are important for storage media -- not only for battery life but also for heat. Here Flash has long been a big winner for cameras, smart phones and PDA's. Because Flash is a static medium, no energy is required to maintain the data stored within or make it accessible. There is no spin up time, no idle power at all. If you're not writing to or reading from it, it uses no power. Naturally devices that use no power generate no heat. Even in their most power hungry use, writing, Flash media doesn't take as much energy as HDD media at idle. The heat issue is an important one because the more thermal energy a device dissipates, the larger it must be to passively cool, and active cooling adds energy costs, size and noise as well.

Flash media has no moving parts. It is utterly silent. This by itself makes it a preferred medium for applications like fanless computers in audio recording environments and low energy entertainment center platforms where even small amounts of fan noise are unacceptable.

There are already many distributions of Linux that can be installed to Flash media. Soon this will be a standard install option across nearly all distributions. Installing to Flash media can be very handy for workstations. Rather than evolve a fancy network system for maintaining each user's settings in a portable way -- that doesn't work if the network is down or the user is offsite, the user can just extract his boot chip and take it with him. Then he can arrive with his full toolset and get to work without worrying about which applications don't install correctly at the new station or aren't integrated properly or don't have his preferred settings.

Price is often an issue. Flash media costs many times what Hard Drives cost for the same amount of storage. Today I can buy a 2GB SD media for about $30.00. It would take 250 of those to make the volume of a 500GB HDD that costs $150.00. For this article however I'm not talking about a volume for storing your media or your database. 8GB should be plenty right now for an operating system and suite of applications for normal use, and that can be had for a reasonable price so I think Flash has cleared the affordability constraint as an operating system install medium.

For these reasons I think we're approaching the day when a Flash Drive is a part of the motherboard on desktop and server systems for the purpose of OS and applications install at least as an option. It seems likely to become the standard for media center PCs as well. I also expect to see more support for installing to this sort of media. It seems reasonable that advances in Flash media will continue to outpace progress in other areas of information technology. In addition for highly portable devices like smartphones richer suites of applications should soon be available to exploit the advantages of having larger static storage available.

Some consolidation in the Flash memory industry seems likely as well. Highly competetive markets like this one erode profit margins and depreciate inventory disruptively. Obviously in this environment purchasing a competitor can be cheaper and more effective in the long term than inventing a new process that increases the storage density or speed of your product line.

Sunday, November 19, 2006

HDTV 720p, 1080i

It's 2006. There's a lot of product shipping right now in the HDTV market, and a bunch of people who are buying in early are going to be unhappy.
1080p is the full HDTV resolution that is supported by BluRay and HD-DVD. It looks totally awesome. It is supported on the PS3, since it's BluRay compatible.
One of the amazing things about the pace of tech progress is that often times the next generation of product will arrive at the same price point as the previous generation. Right now you can get a generous 42" 1080p monitor with HDMI and/or DVI input for under $1500. That's actually less than many of the 720p or 1080i monitors I've seen at the same size.
Early adopters usually expect to bear the brunt of the costs for new tech, but now that the 1080p monitors are available many of them will choose to upgrade from their previous 720p LCD or plasma selections. Someone who's considering getting one now shouldn't consider getting the lower resolution because they'll only have to upgrade later and pay the same price twice.

Sunday, November 12, 2006


The browser Firefox is getting a lot of attention lately because they've asked the Ubuntu people to stop shipping their modified version with the "Firefox" symbols. Ubuntu will be naming it "IceWeasel".

Not everybody remembers that there used to be a Firesomething extention for Firefox that allowed you to change the program name, or for it to change randomly. It can be a lot of fun. The developer has stopped supporting it, but apparently the extension can be modified to work with version 2.0, so we can have the fun all over again.

The joke here is that the Firefox team had to change the name a couple of times early on, so as not to conflict with extant products.

Saturday, November 11, 2006

Toynbee idea

As long as I'm blogging about Enigma, I may as well add another. Have you heard about Toynbee tiles? They're laid in streets all over the world, and one of them once nearly killed me. I was crossing a busy street and there in the asphalt was the sign:
IN KUbricK's 2001
Struck dumb for a moment as I unravelled the meme, a bus almost smashed me.

Anyway, if the story intrigues you, you can check out the article on Toynbee at Wikipedia, read some of his works at Project Gutenberg, or (extra credit) find page 22 of the Feb 4, 1958 issue of The Atlanta Constitution. For sharing the enigma, you can as usual get themed merch from CafePress.

Where in the multiverse is John Titor?

John Titor was a poster on Usenet many years ago, who claimed to be from the future. His story remains an enigma. You can read more about him on Wikipedia.

If you're so inclined, you can buy John Titor themed stuff from CafePress. It's the kind of inside joke that takes a special person to appreciate. What intrigues me about the story is that I learned programming on an IBM 5100 and was familiar with some of the material discussed. I think I read some of his articles when they first appeared.

Discover the GRAIL

GRAIL is the Graphics and Imaging Laboratory of the University of Washington's Department of Computer Science and Engineering.

What's interesting about it is that they have a lot of papers available on computer science as applied to graphics.

Music from math

The application of math in music is an interesting concept with a long history. Rather than bore you with it, let me suggest Wolfram Tones as a primer.

This website has a number of generators that let you create music. It's done by the people behind Mathematica. One cool feature is that once you've found or made a composition you like, you can send it to yourself as ringtone.

Sunday, October 01, 2006

Let's talk about Blender

Blender is a 3d modelling program. It's great. It's free. If you are at all interested in creating computer illustrations or graphics, you should get this program.

Head on over to the blender nation blog and have a look at some of the things it can do.

You are going to need some patience to master Blender. It takes a while to get the hang of editing three dimensional objects and the user interface is very rich. Blender is feature filled and has a nice professional finish to it. The software is very powerful. If you want to render a movie like Elephant's Dream, the software allows for using a render farm.

Blender imports VRML 1.0, DXF (Autocad), Videoscape, STL, 3D Studio, AC3d, Collada, DEC objectfile, directX, Google Earth, Lightwave, Quake, Nendo, OpenFlight, ProEngineer, Radiosity, RawFaces, Stanford PLY, TrueSpace and Wavefront files.

Not everything has to be free. There are plentiful resources of pre-made objects available for sale that are royalty-free and that can save a ton of time. If you're interested in these, try out They have thousands available.

Modelling programs use descriptions of shapes called meshes to form the basis of objects that you can manipulate. You can find some meshes, and other things for free here:

The meshes only provide a framework for the objects. There are also materials, textures and finishes that are used to render your artwork into something hopefully photo-realistic.

Saturday, September 16, 2006

How is this for a lot of motivation? This crew keeps me busy!

Monday, August 28, 2006

First blogger post

This is an interesting exercise