Friday, December 5, 2008

Acer TM C300 Rotate Display

So you have an Acer TravelMate C300, a lovely little convertible laptop/tablet that has given you years of yeoman service. God bless you, little C300, god bless you!

But then the hard drive failed, and you couldn't get Windows to install on the new hard drive (stupid Windows!), but Ubuntu rode to the rescue just like it was promised. So now you have Ubuntu 8.0.4 installed on it, and everything is marvelous.

Except the rotate button doesn't work.

Well, I haven't got that fixed yet, but here is the command to invert the screen:
xrandr -o inverted
Of course, once you do that, you realize that the touch screen is all backwards too, so here's the commands to fix that:
xsetwacom set stylus Rotate 3
xsetwacom set eraser Rotate 3
xsetwacom set cursor Rotate 3
Booya!

Tuesday, December 2, 2008

Der Untergang and Stupid Unix Hacks

Maybe, just maybe, you want to dump some video into individual frames. Maybe also some audio. Strictly hypothetically, say you want to dump the amusing rant sequence from Der Untergang, so that you too can make a spoof of it like this one. Strictly hypothetically, you understand.

So you get a copy of the movie from somewhere, and you find out that the sequence you care about lies between 00:40:00 and 00:45:00 or so. So now you need to dump the video and the audio from the file. Mplayer to the rescue...

Say the video is in the file untergang.avi. You can rip audio and video with this command:
mplayer -ss 00:40:00 -endpos 00:05:00 -vo jpeg -ao pcm:file=audio.wav untergang.avi
Note that the -endpos is really more of a duration than a position: -endpos 00:05:00 tells mplayer to only process for 5 minutes after the start time.

This will create a lot of image files in the current directory, along with a file called audio.wav, which has the audio for the corresponding image files.

Blog Archive