A Requiem For iTunes DRM

Let me say right upfront that I don’t support piracy. I believe that content creators do deserve to be paid for their work. So this post is not about freeing content for file trading. In fact, these methods will not remove the personally identifiable information from the files, so if you do put them on a file trading network they can be traced directly back to you. But I do believe in being able to use the content I’ve paid for freely without being trapped by DRM.

While there are DRM-free digital music purchase options, such as Amazon or Napster 2.0, even iTunes Plus when available, iTunes remains the dominant digital music outlet and most of the music, and nearly all of the video, available via iTunes is still ‘protected’ by Apple’s FairPlay DRM. iTunes is well designed, easy to use, and has a massive selection, which keeps it in the lead. And, of course, the tight integration with the iPod which utterly dominates the portable market. It has a lot going for it. But FairPlay locks the content into iTunes, the iPod/iPhone, and Apple TV – oh yeah, and a handful of Motorola phones which are the only 3rd party devices supported. If you want to load the music on most phones, stream it to your TiVo or any other network media client, access it on a Linux system, etc, you’re out of luck.

Well, unless you strip the DRM to free the content and get a generic AAC music file or or H.264 video file.

There are a few ways to strip the DRM. Perhaps the most obvious is the analog hole. Play the content and re-record it. Burn a CD and re-rip it. But these are lossy methods that take the digital file, decode it to analog, then re-sample the analog and re-encode it to digital. You will lose quality, there is no way around it. Plus it takes time and you often lose all the metadata from the track and have to manually re-enter it. This is not an optimal solution. Even with software applications such as Tunebite to automate the process it is still lossy and time consuming. And Tunebite isn’t cheap.

The developer community has developed various software applications to make stripping iTunes DRM easier. One of the best known was Hymn and then JHymn from the Hymn Project (Here Your Music aNywhere) which was able to decrypt iTunes music files directly. But Apple changed the system with iTunes 6 and JHymn stopped working. For a while you could just avoid upgrading iTunes, but eventually Apple starting forcing updates by blocking access to content from older versions.

So the community developed a new technique, intercepting the AAC data from Quicktime. During playback the files are decrypted and then passed to the decoder, and in the process the unencrypted data was exposed. This allowed QTFairUse6 and myFairTunes to free the content. This technique still required playing the music, but it was lossless. The AAC data was captured as-is, there was no digital-analog-digital loop. They could also ‘play’ the tracks at 6x speed, to process the files faster than ‘real time’. And the tools would transfer all of the metadata so the new DRM free files would have all the data the original files had. This worked well, but with iTunes 7.6 Apple patched this loophole. You can still use these if you haven’t yet updated iTunes, but it is inevitable that Apple will start pushing the need to upgrade as they always have in the past.

And so the arms race continues. And the community has delivered again, and this time with perhaps the best solution yet, Requiem. Requiem works on Windows or Mac and decrypts any purchased iTunes content – music or video. (It doesn’t work on video rentals.) It works in the current 7.7.1 iTunes release.

There is no need to ‘play’ the tracks, it quickly decrypts them in place. For every .m4p file you get a matching .m4a file, for every .m4v you get an .mp4. Quick and easy. So much so that it is the first such solution to attract the attention of Apple. They pretty much ignored the previous solutions, but when Requiem surfaced they started sending out Cease and Desist notices to sites that linked to it. So I won’t be linking to it, but it sure is easy to find if you Google on ‘Requiem 1.7.3′, the current version. It is generally available via BitTorrent despite Apple’s efforts.

The easiest way to use it is to run the Java JAR file and just point it at your iTunes directory. It’ll de-DRM any DRM’d iTunes content it finds. Then you’re left with two tasks:
1. Update iTunes to use the unprotected files
2. Move or delete the old protected files (.m4p and .m4v)

To do step one you’ll need to find your iTunes library files – mine are in C:\Documents and Settings\Mr MegaZone\My Documents\My Music\iTunes. (I’m obviously on Windows, Mac users feel free to chime in in the comments with instructions.) First make backup copies of iTunes Library.itl and iTunes Music Library.xml. Now replace iTunes Library.itl with an empty (0 byte) file. You can do that by deleting the existing file, then right click and say New -> Text Document, and rename the document. Then open iTunes Music Library.xml in your favorite text editor. Search and replace .m4p with .m4a and .m4v with .mp4. (If you didn’t unprotect all of the files in your library you’ll have to look for the specific entries to replace instead of doing all of them.) Now open iTunes. It will see the ‘corrupted’ iTunes Library.itl file and import the data from the XML file to repair it. There you go, iTunes will now use the de-DRM’d files.

For step two open Windows explorer and navigate to your iTunes music folder. Open Search, select All files and folders, more advanced options, then under Type of File and select MPEG-4 Audio File (Protected) and search. This will find all the .m4p files. You can then move the files to back them up, or delete them. (I suggest backing them up.) Do the same for MPEG-4 Video File, this should find the .m4v files. (The .mp4 files show as MPEG-4 Movie.)

And now your iTunes content is DRM free!

There is one other issue, while iTunes Plus music is DRM-free, the files don’t work in all AAC-capable players. This is because Apple has inserted an ‘atom’ within the file in such a way that it breaks some decoder’s parsers. The ‘pinf’ atom is set as a sibling instead of a child node. Fortunately there is another community tool, PutPinfInItsPlace, which will fix the files. All it does is correct the one byte ‘error’ Apple has deliberately placed in the file. Once fixed the files will switch from ‘Purchased AAC audio file’ to ‘AAC audio file’ in iTunes. It is Java-based and works on Windows or Mac. It isn’t as easy to use as Requiem in that you have to select the files to fix. You can select multiple files at once, but only in one directory at a time. So you can’t just point it at your iTunes library and fix it all at once. Still, it isn’t hard and you only need to do it once. Since it is simply fixing he atom tree structure in the file there isn’t any change to the content.

Between these two tools you can have an iTunes library that consists entirely of DRM-free .m4a and .mp4 files that work on any device that handles the formats. At least until the next time Apple finds a way t prevent the tools from working until the next round of stripping tools. That is nearly inevitable.

DRM is just an inconvenience for legitimate users and doesn’t really stop piracy. And I think it discourages purchases. I have over 15,000 tracks in iTunes, and they’re all legal – ripped from CDs or purchased from iTunes. Over the past three years I’ve spent over $2,700 in iTunes – but only when I’ve been able to strip the DRM losslessly. During any period when DRM stripping has lagged I won’t purchase anything from iTunes (well, except iTunes Plus now). Make the content DRM free so people can use it on any device and they’re much more likely to purchase. In the meantime you can do the above to free your iTunes content. Have fun.

About MegaZone

MegaZone is the Editor of Gizmo Lovers and the chief contributor. He's been online since 1989 and active in several generations of 'social media' - mailing lists, USENet groups, web forums, and since 2003, blogging.    MegaZone has a presence on several social platforms: Google+ / Facebook / Twitter / LinkedIn / LiveJournal / Web.    You can also follow Gizmo Lovers on other sites: Blog / Google+ / Facebook / Twitter.
This entry was posted in Apple, General Tech and tagged , , , , . Bookmark the permalink.
  • xdreamwalker

    This is sweet! A long time ago I used myFairTunes to strip all of my music. It really had bugged me that it would not strip the videos, but I have lived with that. I was real bummed out when it stopped working, and I stopped buying music.
    I guess I forgot about the whole thing until today. I was very please with the results. I didn’t have any music to strip, but it took care of some TV episodes for me.

  • Leonardo DiCrapio

    I’ve purchased my share of music from iTunes, but all MP3/AAC are a rip-off at 99 cents per track. The tracks should be priced at $0.25 to $0.50 per track. That price point would be reasonable given the lower audio quality than from a CD. That’s why I think that Amazon’s $5 should become more the norm rather than the weekly sale. But at least Amazon charges $5 for some album, instead of Apple’s $10 rip-off point.

  • http://www.eyrie-productions.com/ Gryphon

    Seriously, Leo? A buck is too much for a song?

    And I thought I was cheap.

  • OompahLoompah108

    This is a great explanation on the DRM scheme. I like the Google instructions on how to get Requiem -> it points to the site where I’ve hosted it! ;)

    Thanks to Brahms, and all his hard work, we can strip our music + videos. I am anticipating the wait for the updated version so it can work with iTunes 8!

  • http://www.davidarussell.co.uk/ David Russell

    An AAC file from iTunes plus is 256kbps. A lossless audio file (ie the same amount of sound as the CD) is about three times that. So $10 for an iTunes album when the CD is also $10, you are effectively paying three times what the product is worth.

  • http://www.gizmolovers.com/ MegaZone

    That’s faulty logic. If you accept that a lossless version is three times the size of the 256Kbps AAC file (I’ll accept that, but it varies), that doesn’t mean the AAC is worth 1/3 the lossless file. Is the lossless file *three times better*? No, I don’t think it is. In fact, for *most* users they’d be hard pressed to tell the difference between professionally encoded 256Kbps AAC and lossless audio.

    It is highly subjective, for most users there is no additional value in having the CD and ripping it to lossless. I own ~750 or so CDs, and I ripped them all to 128Kbps AAC. That’s fine for me, I still rip the rare CD I purchase that way. Lossless holds no additional value for me – except the *potential* future value of some new codec even better than AAC in the future. Having lossless to be able to export to a new format for could be useful. But that’s a low level of value to me.

    There’s also the hassle of dealing with the CDs and the waste they produce. I feel obligated (and I am legally, but that’s different) to keep all the CDs I ripped music from. I have several boxes full of CDs in my basement, uselessly taking up space. Alternatively I could destroy them, but that’s wasteful. Some people rip and resell the CDs but I’m not comfortable with that morally, and legally that’s a no-no.

    So for me the digital copies have value CDs do not – the value of NOT having physical media to deal with. There is also the value of convenience and instant gratification. With CDs I have to either go out and buy them at retail, and pay more to get it now, or order them online and wait for them. Then I have to deal with the packaging, and do the ripping, hope it is in CDDB for the metadata (granted, it usually is), and then deal with the media long term. With digital music I buy it, it downloads in seconds or minutes, and I’m done.

    For someone else lossless may be of high value. But for me, and I’d say probably most users, the convenience and lower hassle of digital music holds value, and any qualitative difference in the music is imperceptible to most. Especially in the kinds of environments most people listen to music in – the car, on earbuds, etc.

  • TomKessler

    Very simple process used Requiem 1.7.4 to strip all DRM

    I am using iTunes 7.7.1.11 and as the article mentions Apple will try and lay the DRM back in?

    Now that iTunes 8 is out had anyone run into this?

    Does it make sense to convert these to m4a to mp3 next prior to going to version 8?

  • http://www.gizmolovers.com/ MegaZone

    They won’t – can’t – add DRM back into to tracks where the DRM has been removed. But they have change iTunes 8 so that Requiem no longer strips the DRM from new tracks. The author is working on it to try to get Requiem working on iTunes 8.

    For now don’t upgrade to 8 if you want to keep stripping DRM.

  • jhegg

    Requiem 1.8.1 is out and works with iTunes 8.

    Can anyone tell me how the instructions above for updating iTunes differ with a Mac. I can’t seem to find that info.

  • TomKessler

    Got my new Google G1 phone with Android on it. Was oh so nice to copy my DRM free music over to the phone and not have to have any concern about if it would work or not.

    Amazon Mp3 has been great too at .89 cents a song over .99 cents

  • http://www.gizmolovers.com/ MegaZone
  • Marci

    nice but this only works for MAC…..any idea what i can use for PC ??

  • http://www.gizmolovers.com/ MegaZone

    Requiem works fine on PCs, that’s where I use it.

  • Marci

    oh ok thanks :)