
I bought myself an iPod Nano (Product)red by the end of last year, it was cool. But the biggest problem i confront is how do i manage my iPod music library and sorts of things under Linux, since I’m a linux daily-user, i merely switch back to my Windows XP system. What’s more, i really DISLIKE using the iTunes under Windows, it’s just not so handy to me, as well it costs too much memory. So, with Google’s help, eventually i found some good solutions to make my iPod work under Linux. And here comes the guide, i’ll break it down into several sections, enjoy it!
Note: I’m using Gentoo linux, and KDE DE, but i presume things will be much even easier if you’re using the Everyone-Loves-It (k)ubuntu linux distro (I’ll make some notes below each paragraph, letting you ubuntu users know what to do)
Preparation
Before you get any further, first you need to install libgpod, that’s the core component to make iPod work under Linux. In Gentoo linux, you can simply run emerge libgpod, but please ensure that you’ve already added the gtk USE if you want to make the coverflow work, which i’ll explain later. So run USE="gtk" emerge libgpod is a good choice.
Note: What if you’re using (k)ubuntu? Dont worry about the Gentoo USE things, just run apt-install libgpod or some sort of that command (Sorry, I dont have ubuntu installed so i really have no idea the exact package name for libgpod)
To make my iPod automounted, i enabled hald and dbus service, and the KDE itself will handle the rest. Put the hal dbus into your make.conf‘s USE, and emerge the hal and dbus.
# echo "sys-apps/hal acpi disk-partition" >> /etc/portage/package.use # emerge hal dbus
Then run emerge -auvDN world to make everything work with dbus and hal. Or you prefer using eix --installed-without-use hal and eix --installed-without-use dbus to manually check the packages which need re-emerge. After that, lets start ‘em.
# /etc/init.d/dbus start # /etc/init.d/hald start if you prefer starting them when booting your system, just # rc-update add dbus default # rc-update add hald default
Note: The Ubuntu users can totally ignore what i mention above about the hal and dbus, since Ubuntu has already done these all for you, i said things will be much even easier :)
Music Library Management
This is the most important part, the software we need is Amarok, a multimedia killer app, which is also the best music player AFAIK. To make it work with iPod, lets first do the USE things :)
# echo "media-sound/amarok ipod" >> /etc/portage/package.use # emerge amarok
1. Identify Your iPod
Once you get the hal work, the iPod device should be auto mounted (the default path is /media/ipod by udev rules), at least under KDE. Launch your amarok, and switch to the ‘Device’ tab, and identify your iPod model under ‘Set iPod Model’.

2. Transfer Music
Now you can easily ‘drag n’ drop’ your mp3s into the ‘Device’ tab container, or you can right click the files/albums/playlists to choose ‘Transfer to Media Device’


The next step is simply click ‘transfer’, copy the mp3s into your iPod.
Note: It’s supposed to have your music appeared in your iPod if you installed >=libgpod-0.6.0. But what if your iPod (The Classic or Nano 3G, or iTouch) doesnt show any items you’ve transfered? Then we need to get our hands a little of dirty :)
Run lsusb -v | grep -i Serial with root privilege, and copy the 16-character-long hash string (something like 00A27001301221F) into the clipboard. Then open the /media/ipod/iPod_control/Device/SysInfo file with your favorite text editor, append this line into it:
FirewireGuid: 0xffffffffffffffff
Replace the ffffffffffffffff with that 16-character-long hash string you just got.
3. Cover Flow Effect
Coverflow effect is really fascinating, you can easily fetch the album art cover from Amazon via Amarok.

To make sure your iPod recognize the coverart setting in Amarok, simply click the ‘Update Artwork’ under ‘Device’ tab, that’s all, i say THAT’S ALL :D

Tip: If you have some V.A albums, you may find it quite disturbing when you flip the cover flow, seeing the same album image several times under different artist names. And they’re all pointed to the same album! To group ‘em under Various Artists, just go to the Amarok’s ‘collection’ tab, right click the album and choose ‘Show under Various Artists’, then re-upload the album to your iPod. Or you can choose ‘Do not Show under Various Artists’ if you think the artist name does matter.
Video Management
With Amarok, you can also simply drag n’ drop the video files (mov, mp4) into your iPod, you dont need to worry about which directory they’re supposed to be placed.
So what i’d demonstrate here is how to convert the AVI movie file into your iPod MP4 file, and how to get the youtube video into your iPod.
1. Deal with AVI Movie File
What i want to deal with the avi movie file is to get a scaled clip video with only a few minutes which’s suitable for iPod playing, as well i’d also like to embed the subtitle into the clip due to my poor English understanding :D With Mplayer’s mencoder, everything turns out so easy.
Make sure you at least have these USEs enabled for mplayer. We need <Code>encode</code> use to build mencoder support, and those vedio and audio libraries for encoding. # USE="aac win32codecs xvid encode mp3 quicktime srt" emerge mplayer
Here is the command we’re gonna run: (based on bones7456′s nautilus toiPod script)
$ mencoder -ss 00:36:36 -endpos 00:01:35 \ -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc \ -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=600:acodec=libfaac:abitrate=128 \ -af lavcresample=24000 -vf dsize=320:240:0,scale=0:0,expand=320:240,harddup -ofps 25 -srate 22050 \ -sub "subtitle.srt" \ input.avi \ -o output.mp4
Yeah, i know these commands seem too complex, let me break ‘em down into detailed explanation.
- The
-ssmeans the starting timeline, with-ssthe-endposmeans shifting forward time. In conjuction, this line-ss 00:36:36 -endpos 00:01:35means we’re gonna start record the clip from 00:36:36 to 00:38:11 (36:36 + 01:35 = 38:11) - The second, third and the fourth lines make sure the encoding meets the iPod spec requirement. If you have a larger screen like iTouch, iPod, change the
320:240to480:320. - And we use
-sub "subtitle.srt"to embed to subtitle into the clip - The last line of the first command specifies the output filename
If you find the command too complex to recall, you can save the following script to /usr/bin/toIpod, and make sure it has the execute priviilege (chmod a+x /usr/bin/toIpod)
#!/bin/bash #Copyright (c) 2008 bones7456 (bones7456<A>gmail<D>com) #Modified by puNk!d #License: GPL #version 20080911 SAVEDIR="/home/media/video" INFILE="$1" PWD=`pwd` CMD="mencoder -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc " CMD+="-lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=600:acodec=libfaac:abitrate=128 " CMD+="-af lavcresample=24000 -vf dsize=320:240:0,scale=0:0,expand=320:240,harddup -ofps 25 -srate 22050 " if [[ -f "${INFILE%.*}.srt" ]];then CMD+=" -sub ""\"$PWD/${INFILE%.*}.srt\"" elif [[ -f "${INFILE%.*}.ssa" ]];then CMD+=" -sub ""\"$PWD/${INFILE%.*}.ssa\"" elif [[ -f "${INFILE%.*}.ass" ]];then CMD+=" -sub ""\"$PWD/${INFILE%.*}.ass\"" fi CMD+=" -o ""\"$SAVEDIR/${INFILE%.*}_ipod.mp4\""" ""\"$PWD/$INFILE\"" eval "$CMD 2>&1"
Now you can run toIpod videofile to convert the video into mp4 file which is stored in /home/media/video, and it will automatically embed the subtitles if the sub file has the same name as the video file.
Note: The credit of this script goes to bones7456, I only did some small modification to deduct the gnome dependency (zenity tool).
2. Save Youtube Video into Your iPod
Here comes another scenario, I’d like to save the youtube video Tech Talk: Linus Torvalds on git into my iPod so i can watch it before sleep. We can achieve this with youtube-dl and FFmpeg. If you dont have ‘em yet, just emerge ‘em!
# emerge youtube-dl ffmpeg
Make sure your ffmpeg compiled with at least aac, encode, win32codecs USEs.
Then we can obtain the youtube flv video file by:
$ youtube-dl "http://www.youtube.com/watch?v=4XpnKHJAok8" -o output.flv
And use ffmpeg to convert it into mp4 file.
$ ffmpeg -i output.flv -acodec libfaac -ac 2 output.mp4
Transfer the output.mp4 with Amarok, its done!
Note: As Michel pointed out, if you’re sick of the endless CLI, try Avidemux, a GUI tool does make life easier in some cases :D
Scrobble iPod Play History to Your Last.fm

Amarok has last.fm built-in support, so whenever we play the music, the songs will be scrobbled to our last.fm account automatically. And the exciting thing is, Amarok can also handle iPod play history!

Just check the ‘Synchronize with Amarok statistics’ under ‘Configure Media Device’ dialog window. Then plug in your iPod, you can see the submit queue from Amarok status bar if there’re some tracks unscrobbled.
Transfer Photos into Your iPod
I use Gwenview as my first-choice photo management software on KDE, some of KDE users prefer Digikam. Whatever, it doesnt matter. Cuz they both support Kipi Plugins which we need to deal with iPod photo transfer.
Install Gwenview and Kipi-plugins with iPod support: (For ubuntu users, just get the gwenview and kipi!)
# USE="ipod" emerge libkipi kipi-plugins # USE="kipi" emerge gwenview

Then we can see the ‘Export to iPod’ option under ‘Plugins’ -> ‘Tools’ menu in Gwenview.
Note: After some investigation and test, I found unfortunately there was no software perfectly delivered the photo transfer function. As kipi-plugin, libpod fails to show up the original picture on iPod whilst gpixpod produces a blank n’ black thumbnail. Read the discussion from here.
Note 2: As Thomas pointed out, there’s a patch for libgpod to fix the thumbnails problem. Follow the patch here: gtkpod with ipod nano 3g
Extras
Here comes the extra things part on iPod, we got Calendars, Contacts and Notes extras on iPod, but we dont feel like to deal ‘em with iTunes. How come we need to do the simple note with a 50mb+ memory cost multimedia software :(
1. Notes
It’s quite easy actually, just put the text files into the /media/ipod/Notes directory, that’s ALL.
2. Calendar
iPod uses Mac’s iCal calendar file, but we dont have Mac, and neither we have iTunes. But we can use some third-party software like Ximian Evolution or Mozilla Sunbird under Linux, nonetheless, personally i’d like to use some web apps to deal with the iCal file. Google Calendar is definitely my 1st choice.

Choose one of your calendars, and click the ‘Calendar Settings’, in the bottom of the setting page, we see the iCal banner in ‘Private Address’, just save it to the /media/ipod/Calendars directory.

3. Contacts
iPod supports vCard to implement its Contacts function, and we can use Gmail to generate the vCard file
(C’mon, you should at least have a Gmail account unless you’re a Yahoo! die-hard fan :D )
I’m gonna save my words on howto do add contacts under Gmail, this is not the part of this iPod-related guide. To export the Gmail contact list into vCard file, click the ‘Contacts’ link in Gmail page, then choose to export it with vCard format, save it to your /media/ipod/Contacts directory.

END
That’s all what i can tell you guys, if you have any other tips on iPod under Linux, feel free to share with us.
And, i know there’s a software named gtkpod which can deals with iPod media synchronizing and photo transfer. But i dont feel like to recommend it, IMHO, its just not so handy as Amarok and Gwenview. Anyway, you might prefer using it if you’re using Gnome :)
Ultimate Guide to convert DVD to iPod using PQ DVD to iPod Converter. We show you how to convert and transfer DVDs to iPod with your favorate movies. DVD to iPod software reviews and everything else related.
by druggo
哎呀,都是有钱人的玩意。
by alice
感觉工程很大~~以前让我的gnome能把ipod认出来当成移动硬盘就花了无数时间。唉,回去还是装KDE了,至少可以照着做,不用再自己熬了。熬的事还是归你这样的小年青们做吧。
by jl
Thanks for the tutorial. I’m not sure if you addressed this, but how do you do a simple file transfer? How do you enable the classic for this? I want to use my new 80 gb classic to transfer files from my ubuntu box to my macbook? Thanks.
by punkid
Hi, jl, you can simply copy your files into your ipod classic if it is and is supposed to be correctly automounted by Ubuntu.
Assume the default mount point is
/media/ipodby udev, then you just need to put the files into/media/ipod.Here’s the way i do to my iPod Nano 3g, i think it should work with the classic one as well.
by Hermy
im just trying to figure out what the fuk my itunes has come across – cant sync, cant even communicate with iSproggler! my ipod history!!! 555
by Tony
e文阿都是@-@|
by Bob
Hi,
Excellent article! I have one minor problem, My artwork won’t update, I’m using the Amarok ‘iPod > Update Artwork’ menu to no avail.
Any suggestions?
Thanks!
by punkid
Hi Bob,
Are you using the latest amarok? Becuz the Amarok <1.4.6 seems to not work quite well with iPod modeling and artworks. If it is not the problem of amarok, then you should have a check of libgpod. Make sure you have installed the latest libgpod, and compiled with
gtk(This is quite important to make the artwork sync works).And dont forget to have a look at the Amarok's Wiki : Artwork not working.
by freezio
Thanks! This is exactly what I’ve been looking for! The only thing I’ve had to do beyond your instructions is that in order to be able to eject the ipod directly from amarok (not from a terminal), I’ve had to configure it (amarok) to run as root. Not sure if this is a good idea, but there it is.
by punkid
hi, freezio, did you forget to add your account into
plugdevgroup? that should give you the privilege to eject the iPod device via normal user.by Anton
Hmmm…
$ mencoder -ss 00:36:36 -endpos 00:01:35 \
-oac faac -faacopts br=160 \
-ovc lavc -lavcopts vcodec=libx264 -vf scale=400:169 \
-sub “subtitle.srt” \
input.avi \
-o output.avi
$ ffmpeg -i output.avi -acodec libfaac -ac 2 output.mov
Why do you encode video stream to H.264 by mencoder and then to MPEG-4 by ffmpeg? May be you think, that ffmpeg will copy video stream? :)
Now I trying to play H.264 video on my iPod Nano, but it doesn’t work yet :(
by punkid
Anton, honestly I did stupidly think that ffmpeg would copy the video stream :(
So I put the parameter
-vcodec libx264into the ffmpeg encoding line, nonetheless, no luck in playing it on iPod, either.by rickdangerous
Hi.
I has 2 questions:
1.- Real syncing: I can sync music from amarok collection to ipod, at playlist tab, All Collection,right click, Syncronize to media device. But, If I change ipod music from another PC, and I want to syncronize IPOD => AMAROK COLLECTION.. how can I do that? I don’t want to transfer all files, only changes (taggings, new files or delete files that there are’nt at ipod).
2.- Mp4 videos transfer… How can I make valid tags for this? I transfer this with amarok and this has Unknow title at ipod.
by punkid
Hi, rickdangerous.
If you want to archive real syncing, try gtkpod. Though I never actually had it synced so far.
And you can use sort of
ffmpeg -i input.mov -title TITLENAME -author AUTHORNAME output.movcommand to tag the video file, or you can use some other softwares such as gtkpod to modify the video file tag info, by far Amarok cannot handle the video file properly.To my confusion, my iPod nano shows the video file with its filename, not the title name, and there’s no way to find the video info in iPod. Are you using a iPod classic ?
by GePs
Great HOWTO! Unfortunately I was not able to load photo on my ipod nano 8GB. I get only thumbnail, but I see only black screen on iPod when I try to see photo…
by punkid
Actually my nano never gets it work, either.
The truth is none of the softwares under linux does a perfect job in ipod photo handling.
Kipi plugin, libpod can show the thumbnails, but the big pictures are black, whereas the gpixpod gets the big pictures, but thumbnails are black.
Anyway, those softwares are quite a bit out of date, maybe they should release a bugfix one.
by GePs
Thank you. I think I will buy a macbook soon, however :)
by Fritooo
When I drag in my mp4s, they appear as music files instead of video, and because of that don’t play any video.
Not much use.
Any ideas?
by punkid
Hmm… Are you sure that those mp4s capable with your iPod video play specification ? You can try some mov files first, to see whether they will be recognized and played successfully. If so, that might be a problem of your mp4s, you’d have to re-encode them to meet your iPod’s requirement.
In my Amarok, the mp4s will be put into an empty-name directory, and thus separated from the audios.
by Fritooo
When I add them using gtkpod they appear in empty-name directories, and i can view them. They just appear as audio through Amarok =/
by punkid
You need to compile Amarok with mp4 support.
by Michel
Gtkpod and Gpixpod (photos) work well for music and photos with my iPod Classic 80Gb on Ubuntu 8.04, but still have 2 issues:
- photos show nicely but the thumbnail view shows only “black” pics. Can scroll through them, but no preview
- videos (simply copied across with Gtkpod) show up as videos but are zero length. They appear to “play” but I only get a black screen and no sound. They’re mpeg and mov files derived from my digital camera
Any ideas anyone?
by punkid
In my nano, I only manage to make the thumbnail work, but no luck on the larger picture. AFAIK this issue might not be solved unless they release a new version of libgpod.
Regarding the second issue, you have to make sure your video files compatible with your iPod classic tech specs. They must be encoded with AAC, not oversized … That’s the reason why I have to use ffmpeg to re-encode my video file.
Nonetheless, the videos I transferred to my iPod all show up as zero time length. Fortunately, at least I’m able to play ‘em.
by Michel
Okidoki Punkid, will try that AAC conversion and see what that does.
Thx for the How-To as I was just about to chuck the thing (I hate stuff that doesn’t work with Linux) when I stumbled upon this page. Compliments!
by Michel
More news on video … Tried ffmpeg but Ubuntu 8.04 has issues with the (f)aac codec. The standard ffmpeg doesn’t have faac (and lots of others?) compiled in. Powerful as it may be, it’s a pig to use. Found something a bit more friendly with a GUI: Avidemux, see http://fixounet.free.fr/avidemux/ but its in the Ubuntu repositories. It has an “auto” setting where you can select iPod and that works like a charm at 640×480. So that leaves just photo previews for me I suppose …
by punkid
You can run
ffmpeg -versionto see whether the ffmpeg package has libfaac built in. And ofc you need to installlibfaac-devpackage from the ubuntu repo.Okay, I’d give the avidemux a shot this night, maybe it could solve the zero time-length prob for me.
by Michel
Ah yes, forgot about that -dev package of course! However, I quite like Avidemux now. Good interface (I know nothing about audio/video stuff), good support of various formats.
Here my vids still show up as zero length, but they DO play very well, incl. sound and all.
by Michel
This iPod stuff still sucks: wanted to re-organise my pics so removed all photos and started anew. No such luck: now GpixPod refuses to save to the iPod. It allows me to create an album, I can add photos to it, but when I press “save” it just does nothing, not even hanging :-( Re-installed libgpod and GpixPod from repos but no improvement. Ideas much appreciated.
I did notice that GtkPod saves photos as 640×480 whereas previously I had set GpixPod to copy full-size. Perhaps that is the reason for lacking previews?
by punkid
How about have a try of gwenview/digikam with kipi-plugin ?
Both libgpod and kipi-plugin will do the resize job when you transfer the photos to your ipod, but in my ipod, it’s the big picture which doesnt work.
by Michel
Tried that too, same as with Gtkpod: previews ok, no pics. The weird thing is that Gpixpod cannot read or write the Photo Database anymore it seems. It tries to open, but progress bar gets stuck at various positions around halfway mark. If I continue anyway, can create album and add pics but when I save it’s all gone (and no sync occurs).
I cleaned up the entire /media/IPOD directory structure and re-initialise with either Gtkpod or Amarok …
by punkid
Hmm… that’s a strange thing, maybe google can help you find some similarities.
by Michel
Unfortunately, the GpixPod project appears inactive, latest release is from 2006. Traced most of the problems to a corrupted vfat fs from Python error output. After fixing that I’m now stuck at a “KeyError”, I assume some DB error. Tried GpixPod’s DB rescue but that doesn’t help. I’m guessing it’s the initialisation of the database (tried GtkPod) that is causing the problem. I don’t have any Windoze so init using iTunes is not an easy option … Will investigate further.
by Michel
More news: I tried Floola http://www.floola.com which combines music and photo functionality, at least in the Beta version. Basically it seems to work, but I get a lot of crashes and database corruption so there’s still some work to be done. However, it does look promising and if you don’t upload a lot of data in 1 go you would probably find it a very useful tool already.
BTW, unfortunately, I had to ask a friend with Windows to initialise the iPod for me. After that, I made a backup of the /media/IPOD directory which I can now use to restore when I get into trouble ;-)
by punkid
Thx for the that note, I was ready to give the Floola a try, however it ended up launching with a ‘libcup.so.2 file missing’ failure. How come it should be associated with cups component ? Something I dont need at all unless I get a printer.
Anyway, currently Amarok is much enough for me, I’d like to wait and see a stable version coming out that it wont break my iPod’s stuff.
BTW, to the Floola’s developer, it’s far better to opensource it :)
by Thomas
Thanks for the nice guide.
If you change a line in the source of libgpod-0.6.0 it will work for photos with the nano 3G.
http://www.nabble.com/Re%3A-gtkpod-with-ipod-nano-3g-p14516933.html
Just do “./configure && make && sudo make install” after the change and no need to resinstall amarok or anything else.
by punkid
@ Thomas: Wow, that did the trick! With patched libgpod, now I can use gtkpod to handle the picture.
by Linux Inicio
Does this work with the new iPod nano 4G and the new iPod Touch 2G??
Does anyone tested it yet?
by punkid
You can give a try of the svn snapshot of libgpod, maybe it’d work with the nano 4G.
by Thomas 2
Great info! Helped me a lot with my brother’s iPod. However, when transferring videos using amarok, it shows as ‘unknown’ on the iPod. The video will play fine, but because the name never shows correctly, I can only put one video at a time on the device. I have not yet tried to recompile Amarok with mp4 support (and it’s not something I really want to do right now). Has anyone had success with the videos through amarok?
by punkid
You can use some other softwares to write tag info into the video files, but IMHO, re-compiling Amarok with mp4 support is not a bad idea :)
by BV
Thanks for the *excellent* guide.
I have tried a nano 4G with the svn snapshot of libgpod.
Here is what works:
1) music transfer to iPod
2) album art
What does not work:
1) videos — I think that files are transfered but the database is not updated.
2) photos because kipi is broken. Kipi looks for libgpod.so.3, but libgpod-svn makes libgpod.so.4. Rebuilding kipi-plugins fails.
So in summary, the key functions work, but the nice-to-have do not.
by punkid
Have you tried this dirty trick:
by Michel
Hey guys I’m back with some more news that I’d like to share.
First of all, Floola has improved enormously. My problem was always the photos: adding them was dead slow. While it will never scream, it has become faster andmore stable, so that I now use Floola exclusively for managing the iPod. Thanks to developer Tomas! Check out: http://www.floola.com.
Secondly, I found HandbrakeGTK a perfect and esy to use utility for ripping DVDs straight to iPod’s MP4 format. Transfer them with Floola and Bob’s your proverbial uncle. Here’s a link to how to install on Ubuntu: http://linuxcrypt.net/?p=119
by Cann0n
In Slackware 12.2, all I had to do is set up my ipod in fstab and configure Amarok at the mount point, as far as the 2nd Gen Nano anyway. iTunes fails, since you cant “copy” music off of them. At least that is what they say. I haven’t used Microsoft related software since the release of Windows ME.
by Donald
Hi,
First of all, thank you VERY much for this tutorial. I’m a newbie using linux and without it I would have jumped over a cliff a long time ago!
I’ve got a question though… Do you know how I could put some games downloaded from internet on my iPod (Classic 120g)…
Thanks for you reply
by punkid
Hi, Donald. I havent tried the game part, yet. AFAIK there’s probably no way to do this under Linux by far. Maybe you could google some tutorials on installing 3rd-party games under windows.
by Donald
I’ve got a new question…
I’ve converted three films (avi) with your script, but the image is really really small… In the center of the screen, I think, 2 cm on 4…
My Ipod is the Classic one, 120GB 5th generation. Do you have any idea about the properties of convertion?
Thanks again
by Donald
Sorry about that!
So, its in the CMD+ lines.
Properties of my ipod:
MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
by punkid
Just change the
320:240to640:480inside the script. (note: there’re two 320:240s you need to modify)