Getting the video (5G) ipod to work with linux

I have a video ipod and one of the most frustrating things with it was that I needed to boot to Windows to get to iTunes and syncing my music. Now, as I use linux for all my other stuff it's pretty annoying to open up Windows only to update some music to the ipod, so here's a little guide how to get that ipod working with linux.

Installing the software

Since amarok 1.4 they have reworked the ipod support, and it works really well now. Update or install a current version of amarok. If you have suse just make sure you have the guru rpm repository enabled and up to date, and you can install it from yast. Info on how to get that set up here. You'll also need libgpod, gdkpixbuf, libgobject-2.0 and hal/dbus to get it working with the ipod.

Other sites recommend that you disable automount for usb devices, but I'm too lazy for that. To prevent the system from automatically opening the ipod I simply put the default action for a found ipod to "do nothing" the first time I plugged it in. This way it won't interfere with amarok.

SuSE 10.0 automatically mounts usb devices with the "sync" option enabled, and this slows down transfer rates dramatically. To fix this make a file nosync.fdi under /usr/share/hal/fdi/policy/95userpolicy/, make the directory if it doesn't exist.

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- disable sync for mount -->
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@info.parent:storage.bus" string="usb">
<merge key="volume.policy.mount_option.sync"
type="bool">false</merge>
</match>
</match>
</match>
</device>
</deviceinfo>

I've been informed that this may cause problems if you are using USB devices with ntfs-3g.

Now then, let's get to business. Fire up amarok and connect your ipod. In the side panel open up media device. Enter the following in the configuration box.



The eject command is to make sure the ipod is disconnected cleanly. Note that I don't need to use the pre-connect command for mouting the ipod as I didn't disable the automount. If you did, you'll need to mount the ipod with the pre-connect to be able to use it.

When done, click connect and you should see a list of music on your ipod, congratulations. To add music to the ipod, simply select the tracks and drag them to the media device sidebar to queue them and transfer to actually transfer them.

I usually run the cover wizard after adding new music to the library to get the album art, and then transfer them to the ipod.

Converting Videos

Now that we have a way of getting stuff to the ipod we really want to be able to convert some videos to put on it. I googled around, but didn't really find any good solution for converting videos except Handbrake, which I could not get to compile no matter what I tried.

So, there has to be another way. Fortunately I'm a humble man and don't need fancy GUIs and flashy wizards, so I wrote a little script for converting videos to an ipod-friendly format.

You can download my script below:
v. 0.1, first release

Things still todo are:

The script itself is very simple, download it and place it in your path, I have mine in ~/bin. Make sure its excecutable (chmod +x) and it's ready to use.

Before running the script, make sure you have ffmpeg and appropriate codecs installed, otherwise it will fail miserably.

To run the script fire up a console, cd to the directory where you have your video and run

ipod input-filename.avi (second-file.mpg) etc.
and it will output a file with a mp4 extension that is ready to be trasferred to the ipod. Now just look up the file in the amarok file browser, right click and queue it for transfer or drag and drop it to the amarok media device window from konqueror. You'll notice that the file will appear without any info in the list, just right click it and add appropriate info. I'll look into getting some default info for the file with the script.

There we have it, no more need for widows!

Comments



Add a comment:

Email address will not be shown to others.
Name:
Email:
Website: