How the iPod classic music library works
Your iPod classic doesn't browse folders the way a computer does. Every menu, every cover in Cover Flow and every play count comes from one database file. Once you know that, most iPod problems start to make sense.
I make Clickwill, an app that edits this database. This page explains how the library works in plain terms; it isn't a technical specification.
The iPod keeps its library in a file called iTunesDB, in a hidden folder named iPod_Control. The song files sit next to it under random names. The iPod shows only what the iTunesDB lists, which is why copying files onto it doesn't work, and why the app that writes the iTunesDB decides what your iPod looks like.
Where everything lives
Connect an iPod classic with disk use turned on and it shows up as a drive. The interesting part is hidden in one folder.
| On the iPod | What it holds |
|---|---|
| iPod_Control › iTunes › iTunesDB | The library: every song, album and playlist, and the order of the menus |
| iPod_Control › Music › F00 to F49 | The song files, renamed to short random names and spread over 50 folders |
| iPod_Control › Artwork | Album covers, prepared in the exact sizes the iPod's screen uses |
| iPod_Control › iTunes › Play Counts | Plays and skips made on the iPod since the last time a computer wrote the library |
| iPod_Control › Device | Information about the iPod itself and its settings |
What's inside the iTunesDB
Think of it as the iPod's own small catalog. It is a single binary file, rewritten as a whole every time something changes.
- Songs. One entry per song: title, artist, album, album artist, track and disc number, year, genre, length, rating, play count, and which file on the iPod holds the music.
- Playlists. A main playlist named after your iPod contains every song. Your own playlists are lists that point to songs in it.
- Albums. A list of albums that the Albums menu and Cover Flow are built from.
- Menu order. Ready-made sorted lists for menus such as Artists and Albums, so the iPod doesn't have to sort thousands of songs every time you open a menu.
Not everything comes from those lists. Cover Flow, for example, is put in order by the iPod on its own: artists alphabetically, each artist's albums after them. That's why no app can give Cover Flow a custom order.
Why copying files onto the iPod doesn't work
The iPod never looks at file names or folders when it plays music. A file that isn't listed in the iTunesDB doesn't exist as far as the iPod is concerned, and a song listed there whose file is missing shows up in the menus but won't play. Adding music always means two things at once: copying the file and writing a matching entry into the database.
The library is signed for your iPod
The iPod classic checks a signature inside the iTunesDB, tied to that one iPod. If the signature doesn't match, the iPod shows an empty library, even though every song is still on it. So any app that writes to an iPod classic has to sign the database for the exact iPod it's connected to, and a library copied over from another iPod isn't accepted as it is. Older models, such as the iPod nano 2nd generation, don't use a signature at all.
Covers are a separate database
Album art doesn't live inside the music files as far as the iPod is concerned. The iPod uses its own artwork database with each cover stored again in the sizes its screen needs, the largest 320 by 320 pixels on an iPod classic. Each song points to its picture. When those links are wrong, a cover shows in Cover Flow but not on the Now Playing screen, or the other way around. How to add missing album artwork shows how to fix it.
Plays made on the iPod wait in their own file
When you listen on the iPod, it doesn't rewrite the whole library after every song. It notes plays, skips and ratings in a small separate file. The next app that writes the library is expected to fold them in first. An app that skips that step loses your play counts.
Why the Music app can undo your changes
Finder and the Music app keep their own copy of your library on the Mac and write the iTunesDB from it when they sync. If you change the iPod with another app and then Music opens with the iPod connected, Music can rebuild the iPod's menus from its copy. The order or covers you set elsewhere can be gone. If you manage your iPod without Music, keep Music closed while the iPod is connected.
How Clickwill uses this
Clickwill reads the iTunesDB straight from the iPod and shows it to you, so what you see is what's on the device. Every edit waits as a pending change. When you choose Write to iPod, Clickwill makes a backup of the library, folds in the plays made on the iPod, writes the new database with its signature, and puts the covers in the sizes the iPod needs. There's no library on your Mac to keep in sync.
Questions
Where is the music stored on an iPod classic?
In a hidden folder called iPod_Control. The song files sit in its Music folder, spread over folders named F00 to F49 and renamed to short random names. The list of songs, albums and playlists is one file, iTunesDB, in iPod_Control › iTunes.
Why are the song file names on an iPod scrambled?
The iPod never looks at file names. It finds every song through the iTunesDB, which knows which file belongs to which song, so the files get short random names when they are copied over.
Can I put music on an iPod classic by copying files to it?
No. The iPod shows only what is listed in its iTunesDB, so files copied into its folders stay invisible. An app has to add each song to the database, and on an iPod classic it also has to sign the database for that one iPod.
What happens if the iTunesDB is deleted?
The iPod shows no music, even though the song files are still on it. The library has to be rebuilt from the files or restored from a backup of the iTunesDB.
More: every way to manage an iPod classic on a Mac, and how to put songs on an iPod classic.