How to extract playlists (list of file locations) from iTunes using python – Stack Overflow
Posted by jpluimers on 2024/12/18
While migrating from iTunes on one machine to Apple Music on another one, I needed to migrate part of the (disorganised) playlists.
I knew there was a binary ~/Music/iTunes/iTunes Library.itl file, but that is encoded or encrypted, making it hard to parse.
Luckily there is also ~/Music/iTunes/iTunes Music Library.xml which I found via the links below.
- [Wayback/Archive] What file holds my itunes playlists – Apple Community
- [Wayback/Archive] How to extract playlists (list of file locations) from iTunes using python – Stack Overflow
The iTunes library xml file is in the same directory as the .itl file. The file is in Apple plist format, and Python’s standard library has a good parser for it.
- [Wayback/Archive] plistlib — Generate and parse Apple .plist files — Python 3.13.0 documentation
- [Wayback/Archive] iTunes: What are the iTunes library files?
- [Wayback/Archive] java – ITL (iTunes Library) Format – Stack Overflow
- [Wayback/Archive] GitHub – josephw/titl: Tools for iTunes Libraries
- [Wayback/Archive] GitHub – jeanthom/libitlp: iTunes “itl” database parsing (archived and unmaintained since 2020)
In the end it was easier to use the stream URLs from [Wayback/Archive] Webradiozenders Streaming URL’s.
That site has streams for various other – mainly European – countries as well.
Queries:
- [WaybackSave/Archive] radio 10 nl url stream – Search on Google
- [WaybackSave/Archive] extension of itunes playlist file – Google Suche
- [WaybackSave/Archive] decode itl file – Sök på Google
--jeroen






Leave a comment