Learnosity Logo
Learnosity Banner Image

DVD to iPod conversion - Linux, Mac & Windows

I've been looking for a while for a way to convert DVD's and other movies that I have into iPod format and have been failing miserably. That is until today, when I came across the unusually named HandBrake.

It does exactly what is says on the tin and makes it very easy to copy dvd's. Initially I used it from my Mac and it worked flawlessly.

I also tried the Linux version on Ubuntu Hardy (8.04) which has no GUI but it is pretty simple when you get the hang of it.

Here's a typical command line:

HandBrakeCLI --preset="iPod Low-Rez" -i /media/cdrom -o myvideo.mp4 -t 2

This reads from /dev/cdrom and uses the handy "iPod Low-Rez" preset which fixes it all up nicely for the iPod.

And here's one that takes the second title:

HandBrakeCLI --preset="iPod Low-Rez" -i /media/cdrom -o myvideo.mp4 -t 2

The wiki has more information on command line usage.

Happy iPodding.

Cheers, Mark

Power saving tips for Ubuntu on laptops

One of the things that Ubuntu (gutsy 7.10) and probably most versions of linux) are currently lacking is out of the box support for power saving and hence suffers from poor battery life when unplugged.

My HP nc8430 also runs particularly hot by default - but I've spent a bit of time hunting down tips for reducing the power usage and heat produced from the laptop to get a longer battery life. I'm sure there are a lot more ways that power can be saved and I suspect that future versions of Ubuntu will catch up and produce the same level of battery life or even longer than windows.

Here is what I am using so far:

Set powerplay mode on ATI fglrx driver

aticonfig --lsp # show current and available modes
aticonfig --set-powerstate=1 #set to low power mode

If anyone has equivalent code for other video cards please let me know and I'll add it here.

Disable 'hal' from polling your cdrom

From powertop: 'hal' is the component that auto-opens a window if you plug in a CD but disables SATA power saving from kicking in.

sudo hal-disable-polling --device /dev/scd0

Disable bluetooth if you are not using it

sudo hciconfig hci0 down
sudo rmmod hci_usb

Remove the usb 1.1 kernel driver if not using it

Apparently the usb 1.1 driver does frequent polling and prevents the processor from staying in low power states for any length of time.

sudo rmmod uhci_hcd

Increase the VM dirty writeback time

From powertop: This wakes the disk up less frequenty for background VM activity.

echo 1500 |sudo tee /proc/sys/vm/dirty_writeback_centisecs

Turn off second processor

This is a very extreme measure and I haven't measured how much extra battery life it gives - but it is a bit cool to be able to turn it on and off if you have a dual core or dual CPU machine.

echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
and to turn it back on use the following:
echo 1 | sudo tee /sys/devices/system/cpu/cpu1/online

How cool is that?

Let me know if you come across any more tips. Cheers, Mark

Updated 17/Mar/07: Fixed commands based on feedback from Neil. Thanks Neil.

Mobile Weather for Nokia N73 (Symbian S60 3rd Edition)

I just found this very handy free weather application for the Nokia N73 (and other Symbian S60 2nd & 3rd edition devices)

Now I can see how lovely the weather is in all the places that I'm not :-)

Cheers, Mark

Joining video files in Ubuntu

I've been tidying up some video's that were taken on my camera and wanted to merge the short snippets of video so I could convert them to DVD for easy family viewing.

A quick google turned up the relevant details:

Ensure you have mplayer & mencoder installed

sudo apt-get install mencoder mplayer

Merge the files together

cat video1.avi video2.avi video3.avi > merged.avi

Reindex the audio and video

mencoder -forceidx -oac copy -ovc copy merged.avi -o merged_final.avi

All done - if you want to convert it to a DVD check out HOWTO Create DVD's from AVI's on Ubuntu.

Thanks to the good folk at ArsGeek for the tip.

Skype with Video on Ubuntu 7.10 Gutsy

I was very excited to see that Skype recently released a beta version of Skype for Linux which has video support.

I duly went and downloaded the version for Ubuntu (the Fiesty Fawn one works great on Gutsy).

Initial attempts to get it working met with frustration - it quickly flashed up on screen and gave the following output:

$ skype
Aborted (core dumped)

After thinking on it a while and hearing reports of other people using it happily I had some further attempts. First plan of attack - make sure there are no settings from an old version that would conflict by (re)moving the settings directory.

$ mv .Skype .Skype.old

Try again and everything came up sweet - even the webcam! Thanks Skype. I'm very happy that this has removed the last reason I had to reboot to windows.

Check out the wiki page for the list of supported webcams in Skype on Ubuntu.

Cheers, Mark

HOWTO Create DVD's from AVI's on Ubuntu

To create simple DVD's (i.e. with no title menu's) you need the following software:

  • mplayer
  • videotrans
  • libxvidcore4
  • dvdauthor
  • mkisofs

To install all this use:

$ sudo apt-get install mplayer videotrans dvdauthor mkisofs libxvidcore4

Here are the simple steps to format a video for DVD:

First, make sure you can view the video using mplayer:

$ mplayer MyMovie.avi

Then we convert if to DVD mpeg format:

$ movie-to-dvd -m pal MyMovie.avi

This will create two files: MyMovie.m2v and MyMovie.ac3 which we need to merge back together:

$ mplex -f 8 -o MyMovie.mpg MyMovie.m2v MyMovie.ac3

Format the video for DVD:

$ dvdauthor -o dvd/ -t MyMovie.mpg

Create a title page for it:

$ dvdauthor -o dvd/ -T

Create an ISO image to burn to dvd:

$ mkisofs -dvd-video -v -o MyMovie.iso dvd

Then right click on the ISO in the file browser (Nautilus) and select "Write to Disc" and you have a DVD that will play in you normal DVD player.

References:

Learnosity CEO nominated for Net Visionary Awards

Lynch Consulting has been working with Learnosity (formerly Websonic Learning) to deliver mobile phone and IM based learning solutions powered by ColdFusion.

Gavin Cooney the CEO of Learnosity has recently been nominated for the Irish Internet Association's "Net Visionary 2007" in three categories:

  • Education Contribution
  • Innovation Award
  • Mobile Internet Contribution

Details of the project are available here:

So go on - you know you want to support ColdFusion and innovation by adding your vote for Gavin Cooney of Learnosity.

iPhoney - iPhone browser emulator

A few minutes ago I somehow ended up on Mike Downey's blog and found this interesting post about iPhoney, a virtual iPhone browser. Since iPhone is still not available in Australia, I often find myself wondering if my web apps (ajax apps in particular) would work in iPhone browser. Well, thanks to iPhoney, I can now build web pages optimised for iPhone. I've just tested a couple of Ajax apps that I have built and they all work perfectly in iPhoney. It looks very cool indeed.

Download iPhoney (mac only).

HowTo recover jpeg images from corrupt memory card

Today my digital camera decided that it had been too well behaved of late and the SD card decided to completely corrupt itself for no good reason, losing all the photos on it.

I've spent a significant portion of my youth messing around with file system editing and partition table editing an was not going to give up on the series of photos I'd taken over the last couple of days - luckily it didn't need anything more than a couple of simple commands to recover all the photos. Go Open Source software.

This tutorial is written for Ubuntu, but should be similar for most Linux machines

Step 1 was to make an image of the card (to have a backup of it) using the venerable dd command.

sudo dd if=/dev/sdb of=sdcard.img bs=1M

  • sudo - used to perform command as root user (i.e. have correct privileges)
  • dd - command to copy data a byte level
  • if=/dev/sdb - read data from /dev/sdb - you may need to change this depending on where your memory card it located.
  • of=sdcard.img - save this to the sdcard.img file in the current directory
  • bs=1M - Copy it in 1M chunks

Once this has completed you will need to run the marvellous program recoverjpeg on it.

First lets install it:

sudo apt-get install recoverjpeg

Then run it:

recoverjpeg sdcard.img

and you should get something like the following:

$ recoverjpeg sdcard.img
Restored 290 pictures
The images will be saved in the same folder.

Check the images out and hopefully it works as well for you as it did for me.

Cheers, Mark

Version 0.13 - NW-E00x Mp3 File Manager for Sony Walkman

Patrick has just released version 0.13 of the NW-E00x Mp3 File Manager for the Sony NW-E00x series.

Release Notes:

  • V0.13 : Requires Java 1.6
  • Better handling of mp3 header
  • Better compatibility with Podcasts
  • Removed the Shoutcast tab
  • other minor fixes...

Go to sourceforge to download it.

Thanks for the great app Patrick.

Cheers, Mark

More Entries