Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: iTunes Plus preset reverse engineered (Read 52122 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes Plus preset reverse engineered

There have been reports that iTunes Plus files are not exactly the same as those produced by the 256 CBR/ABR/VBR encoder settings. Is there some candy Apple is hiding from anything not bearing the Plus brand?

After a recent wave of opinionated ponies (iPods suck, MP3 sucks, MiniDisc rulez, etc.) infiltrating the forums, I thought it was time for some bare facts again and started my investigation.

It should be possible to generate a very accurate mapping from encoder settings to total file size, presumed that you use a source file of a certain length and complexity. I chose "The Hero's Works of Peace" from "A Hero's Life" by Richard Strauss, by Fritz Reiner and the Chicago Symphony Orchestra. The track has some high pitched noise very hard to encode. Quicktime's True VBR setting goes up to 222kbit/s over the whole file.

It turned out that iTunes and XLD use slightly different MP4/M4A containers (probably just different padding), so that precise matching by size wasn't possible. So I extracted the raw AAC streams and got the following interesting results:

Code: [Select]
49309724 test.wav
10631152 test_qt256vbrconstrained_min.m4a.t1
10455702 test_itplus.m4a.t1
10455702 test_qt256vbrconstrained_max.m4a.t1
10397532 test_it256vbr.m4a.t1
10397532 test_qt256vbrconstrained_med.m4a.t1
9163130 test_it256.m4a.t1
9163130 test_qt256abr_med.m4a.t1
9160622 test_qt256abr_max.m4a.t1
9031180 test_qt256cbr_max.m4a.t1
9031138 test_qt256cbr_med.m4a.t1
7860826 test_qttruevbrq127.m4a.t1


"min/med/max" refers to encoder quality (possible values: min,low,med,high,max).

Conclusions:

iTunes' standard setting is identical to Quicktime's ABR setting at medium encoding quality.
iTunes' VBR setting is identical to Quicktime's VBR constrained setting at medium encoding quality.
iTunes Plus is identical to Quicktime's VBR constrained 256kbit/s setting at maximum encoding quality.

All for iTunes 8.1 / Quicktime 7.6. Track length: 4:40 min.

iTunes Plus preset reverse engineered

Reply #1
So the "new" iTunes Plus setting in iTunes will produce the same results as QuickTime's constrained VBR setting at maximum encoding quality?  I am just curious to know if the iTunes Plus setting (in iTunes) is any different from using 256kbps with the VBR option ticked (again, in iTunes).  I encoded one file with the iTunes Plus setting, 256kbps "CBR," and 256kbps VBR using iTunes.  The song is called "Pacing Death's Trail" from the Come Clarity album by In Flames.  It clocks in at 3:01 and is pretty complex.  Apple Lossless (iTunes 8.1/QuickTime 7.6) even uses a high bitrate of 1146kbps to encode it.

The 256kbps CBR file had a file size of 5.7MB and foobar2000 is reporting an overall average bitrate of 260kbps.  The iTunes Plus setting produced a file size of 6.1MB and an overall bitrate of 281kbps.  The 256kbps VBR setting produced a file size of 6.1MB and an overall bitrate of 279kbps.  So, from what I did (not using QuickTime Pro, just the latest iTunes), it does appear that the new iTunes Plus setting does in fact use a different setting than 256kbps VBR in iTunes.  Now, I recently purchased a song from the iTunes Store.  The song was released on March 10th.  It is 3:22 long.  The song purchased from the iTunes Store has a file size of 6.8MB.  I purchased this album from Best Buy the other day and encoded the same song using the iTunes Plus setting.  It has a file size of 6.5MB (same length).  In fact, the 256kbps CBR version of this song comes in at 6.3MB.

I can't test QuickTime Pro's maximum quality constrained VBR setting.  Additionally, these results go against with what I have previously found.  Before, the 256kbps CBR setting (in iTunes) would produce results that were more on par (in terms of file size and overall bitrate) than the 256kbps VBR setting.  This new iTunes Plus setting (in iTunes) produces results on par with modern iTunes Store purchases but the overall bitrate (and file size) are higher than older purchases.  This is probably due to updates in QuickTime over the years as I know that Apple has changed the QuickTime AAC encoder since 2007.

iTunes Plus preset reverse engineered

Reply #2
So the "new" iTunes Plus setting in iTunes will produce the same results as QuickTime's constrained VBR setting at maximum encoding quality?  I am just curious to know if the iTunes Plus setting (in iTunes) is any different from using 256kbps with the VBR option ticked (again, in iTunes).


Yes, 256kbit/s with VBR ticked in iTunes is QT VBR constrained at medium quality while iTunes Plus is the same at maximum quality (it's both in the table). Different sizes for purchased tracks could be embedded tags and artwork or older encoder versions used at file creation time. Apple probably doesn't reencode everything at new encoder releases. You could extract the raw AAC streams using "mp4creator.exe -extract=1 file.m4a" and compare those instead.

iTunes Plus preset reverse engineered

Reply #3
I am guessing that the older files have smaller file sizes due to an older encoder.  The reason I state this is because I delete all embedded artwork (for my AAC files) and have iTunes add it (ie to the Library file).  It is interesting that Apple decided to add this new setting.  It is strange that, with older versions of QuickTime's AAC encoder, the 256kbps CBR setting in iTunes would produce bitrates (and file sizes) more on par with iTunes Plus purchases but now this iTunes Plus setting produces files more on par with newer purchases.

I just hope that people (not here on hydrogenaudio but on other forums/websites) actually conduct blind ABX tests to determine if they need such a high (I would call files with overall bitrates at 280kbps and 270kbps high) bitrate setting.

Edit: So I guess that answers the question as to what setting Apple (or rather, the record companies with Apple's software) is using for iTunes Plus files now.  Before I could never really answer the question as the iTunes Plus files would always fall between CBR and VBR (leaning more towards CBR).  Now they are 256kbps VBR constrained files using the maximum quality setting.

iTunes Plus preset reverse engineered

Reply #4
Interesting that the standard setting is now ABR, as this was a new mode in Leopard (QT 7.3?). It wouldn't make much sense to continue to use the CBR mode as this is mostly useful for streaming.

iTunes Plus preset reverse engineered

Reply #5
Even then, CBR mode has always provided non-CBR results.  I have files encoded from back in 2004 with iTunes at 128kbps "CBR."  The files actually have bitrates at around 132kbps.  It just appears that this new iTunes Plus setting varies the bitrate even more so than ticking the VBR option due to using QuickTime's maximum quality setting.  I really hope Apple adds QuickTime's true VBR mode in iTunes along with allowing us to pick the quality level (high, low, maximum, etc.).

iTunes Plus preset reverse engineered

Reply #6
iTunes' VBR setting is identical to Quicktime's VBR constrained setting at medium encoding quality.
iTunes Plus is identical to Quicktime's VBR constrained 256kbit/s setting at maximum encoding quality.

All for iTunes 8.1 / Quicktime 7.6. Track length: 4:40 min.

Hmm, interesting.  With my iTunes 9.0.2.25, the iTunes Plus and AAC VBR settings produce identical files -- identical size and identical average bitrate.

iTunes Plus preset reverse engineered

Reply #7
iTunes' VBR setting is identical to Quicktime's VBR constrained setting at medium encoding quality.
iTunes Plus is identical to Quicktime's VBR constrained 256kbit/s setting at maximum encoding quality.

All for iTunes 8.1 / Quicktime 7.6. Track length: 4:40 min.

Hmm, interesting.  With my iTunes 9.0.2.25, the iTunes Plus and AAC VBR settings produce identical files -- identical size and identical average bitrate.


Not identical if you do a md5 checksum

iTunes Plus preset reverse engineered

Reply #8
Obviously using a MD5 checksum of the whole file, which possibly contains some timestamps or whatever, might not be very relevant?
Full-quoting makes you scroll past the same junk over and over.

iTunes Plus preset reverse engineered

Reply #9
Hmm, interesting.  With my iTunes 9.0.2.25, the iTunes Plus and AAC VBR settings produce identical files -- identical size and identical average bitrate.


With properly extracted raw AAC streams I get identical results with rpp3po. Suberbu must have compared mp4/m4a tracks that contain padding.

 

iTunes Plus preset reverse engineered

Reply #10
Well, after fooling around, encoding a few files with qtaacenc, I think I've verified what I'd already assumed: That iTunes AAC 320 VBR is also encoded at the "medium" (in qtaacenc "normal") quality mode. 

I encoded the four movements of Beethoven's Symphony #9, first with iTunes at 320 VBR, then with qtaacenc at 320 Constrained VBR at "normal" quality and 320 Constrained VBR at "highest" quality.  Then I extracted all the raw AAC streams with Yamb and compared them. 

On all four tracks, the file sizes for the iTunes tracks and the qtaacenc "normal" quality tracks matched EXACTLY -- 32,939, 33,926, 25,966, and 59,559.

The file sizes of the "highest" quality tracks varied slightly -- two larger, and two smaller -- 32,924, 33,923, 25,988, and 59,564, respectively. 

So apparently only iTunes Plus uses Quicktime's "max" quality setting -- any other bitrate will get you "medium" quality.  I'm sure everyone assumed this was the case, since that was already found to be true for 256kb files, but I thought I'd share that anyway.

iTunes Plus preset reverse engineered

Reply #11
Well, after fooling around, encoding a few files with qtaacenc, I think I've verified what I'd already assumed: That iTunes AAC 320 VBR is also encoded at the "medium" (in qtaacenc "normal") quality mode.


Well, the words of this thread tell a slightly different story. You assumed that "iTunes Plus and AAC VBR settings produce identical files", which turned out to be false. It was the OP who assumed, that for iTunes 'VBR' equals 'medium quality' and that the iTunes Plus preset is the sole exception to this rule.

iTunes Plus preset reverse engineered

Reply #12
Well, after fooling around, encoding a few files with qtaacenc, I think I've verified what I'd already assumed: That iTunes AAC 320 VBR is also encoded at the "medium" (in qtaacenc "normal") quality mode.


Well, the words of this thread tell a slightly different story. You assumed that "iTunes Plus and AAC VBR settings produce identical files", which turned out to be false. It was the OP who assumed, that for iTunes 'VBR' equals 'medium quality' and that the iTunes Plus preset is the sole exception to this rule.

Right... and then others proved me wrong in subsequent posts, pointing out that I was not using extracted aac files for my comparison, and also, I'd only compared one song.  After being proven wrong, I wondered (to myself) it was only iTunes plus that used the "maximum" quality setting, and assumed (to myself) that that was probably correct.  I made no reference to what happened before I was proven wrong in my original post.  And you're incorrect to say that the original poster claimed that the iTunes Plus preset "is the sole exception to this rule."  He never made any claims about any other bitrate than 256kb. 

Anyway, the point of my post was to share some information that someone might find useful in some way.  Can I ask what the point of your response was?

iTunes Plus preset reverse engineered

Reply #13
Hmm, interesting.  With my iTunes 9.0.2.25, the iTunes Plus and AAC VBR settings produce identical files -- identical size and identical average bitrate.


After posting false information as a fact (the first post already mentions that raw streams must be compared), it just stroke me somewhat, to see your next post, after such a long time, start with "Well, ... I think I've verified what I'd already assumed". After all, for six weeks there was only diacon's word vs. yours, without clarification.

Towards the end of you post, you gave that clarification. So I may as well have kept my opinion to myself for the sake of facts. Sorry.

iTunes Plus preset reverse engineered

Reply #14
Conclusions:

iTunes' standard setting is identical to Quicktime's ABR setting at medium encoding quality.
iTunes' VBR setting is identical to Quicktime's VBR constrained setting at medium encoding quality.
iTunes Plus is identical to Quicktime's VBR constrained 256kbit/s setting at maximum encoding quality.

All for iTunes 8.1 / Quicktime 7.6. Track length: 4:40 min.

I tried encoded a file with iTunes 9.2.1.5 (Windows) and qaac 0.15. It seem Apple had updated iTunes to use 'True VBR' instead of 'Constrained VBR'.

iTunes 320 kbps VBR file is identical to 'qaac --tvbr 127 --quality 1'.
iTunes Plus file is identical to 'qaac --tvbr 110 --quality 2'.

*Files are compared with Foobar200's Binary Comparator.

iTunes Plus preset reverse engineered

Reply #15
Interesting, would be great! But it is rare... Do the results are replicated in other samples? (e.g. low complexity tracks); Which version of QuickTime you used? (QuickTime 7.6.6 I guess). Thanks.

Regards

iTunes Plus preset reverse engineered

Reply #16
Conclusions:

iTunes' standard setting is identical to Quicktime's ABR setting at medium encoding quality.
iTunes' VBR setting is identical to Quicktime's VBR constrained setting at medium encoding quality.
iTunes Plus is identical to Quicktime's VBR constrained 256kbit/s setting at maximum encoding quality.

All for iTunes 8.1 / Quicktime 7.6. Track length: 4:40 min.

I tried encoded a file with iTunes 9.2.1.5 (Windows) and qaac 0.15. It seem Apple had updated iTunes to use 'True VBR' instead of 'Constrained VBR'.

iTunes 320 kbps VBR file is identical to 'qaac --tvbr 127 --quality 1'.
iTunes Plus file is identical to 'qaac --tvbr 110 --quality 2'.

*Files are compared with Foobar200's Binary Comparator.


you may be right, the other day i was testing a few things and i had some songs encoded in iTunes Plus "CVBR" setting (so i thought) but than i wanted to see an equivalent for true vbr and i tried Q113 (is the latest which gives an equivalent to 255 kbps) and i noticed that some songs (not all but for very few differences, maybe due to Q110 as you say) were completely identical that even itunes didn't even sync to iPod because "already there" [all with Quicktime 7.6.6]. Maybe Apple has changed the setting after completing true vbr encoding (don't forget that a year ago with Snow Leopard the encoder changed settings to go up to 320 kbps instead of 192 kbps). It wouldn't be the first time that Apple changes iTunes Plus preset, i remember that at first it was 256 ABR then it got the brand "iTunes Plus" in the ripping options and this is when it got VBR constrained; now would be finally time for true vbr

iTunes Plus preset reverse engineered

Reply #17
I've tested a little bit with tvbr 110 (one ripped with qtaacenc and the other one with iTunes (itunes plus preset) 9.2.1.5 and Quicktime 7.6.7 and I can confirm too that the new iTunes Plus is identical to TVBR 110 --highest,same identical bits variation with Foobar too. FINALLY! No more constrained VBR

iTunes Plus preset reverse engineered

Reply #18
Interesting, would be great! But it is rare... Do the results are replicated in other samples? (e.g. low complexity tracks)

I'm not sure I understand your question
iTunes Plus files are always AAC-LC. All other samples I've tested are also encoded to AAC-LC.

Which version of QuickTime you used? (QuickTime 7.6.6 I guess)

Yes, I've used QuickTime 7.6.6.

... i tried Q113 (is the latest which gives an equivalent to 255 kbps) and i noticed that some songs (not all but for very few differences, maybe due to Q110 as you say) were completely identical ...

It doesn't matter whether you use 113 or 110, both will produce the same output. I used 110 because I just like evenly divisible numbers.
Even though qaac/qtaacenc allow user to choose quality from 0-127 for True VBR encoding, there actually are only 15 levels for True VBR.
For example, '--tvbr 0', '--tvbr 1', '--tvbr 2', '--tvbr 3', and '--tvbr 4' will produce identical files.
Table below shows TVBR value range that produce identical file and output bitrate for those values from 4 samples.
Code: [Select]
  TVBR Value        S1     S2     S3    S4
    0 -   4         43     45     38    22
    5 -  13         51     52     45    22
   14 -  22         61     59     51    24
   23 -  31         91     73     71    26
   32 -  40         92     78     74    29
   41 -  49        111     90     90    30
   50 -  58        128    103    105    33
   59 -  68        135    117    115    35
   69 -  77        154    131    132    37
   78 -  86        169    141    146    39
   87 -  95        203    166    179    42
   96 - 104        254    190    213    44
  105 - 113        277    215    237    47
  114 - 122        314    238    272    49
  123 - 127        352    263    308    53

iTunes Plus preset reverse engineered

Reply #19
I'm not sure I understand your question
iTunes Plus files are always AAC-LC. All other samples I've tested are also encoded to AAC-LC.


I'm sorry, I meant the complexity of music files which serve as source of AAC files. For example, in general, metal music files has more complex segments than pop music files; as a result, usually their bitrate is higher if you use VBR encoding. iTunes Plus AAC (C-VBR, Max, Auto, 256 kbps... maybe) is quite similar to CoreAudio/QuickTime True VBR AAC Q105-113 (Max, Auto, 255 kbps) for more complex tracks (resulting high bitrates), but according to what I've seen this is not true for less complex tracks (C-VBR -i.e. iTunes Plus- limits the average bit rate variation, resulting higher bitrates than True VBR). That's what I meant 

iTunes Plus preset reverse engineered

Reply #20
What i have come across on OSX is that iTunes Plus and and Constrained VBR 256 set to MAX with XLD produce the same file  and with True VBR 110 set to max for the most part it produces the same file but some times the files will be smaller.

iTunes Plus preset reverse engineered

Reply #21
What i have come across on OSX is that iTunes Plus and and Constrained VBR 256 set to MAX with XLD produce the same file  and with True VBR 110 set to max for the most part it produces the same file but some times the files will be smaller.


I got the same results using iTunes 9.2.1 and XLD 20100711+QuickTime 7.6.6 (QuickTime X) on Mac OS X 10.6.4; it appears that iTunes Plus is still Constrained VBR 256 Max Auto CoreAudio/QuickTime AAC, at least in Mac environment.

iTunes Plus preset reverse engineered

Reply #22
I think previous posters haven't tested enough songs. Most the time tvbr will give the exact same file size are iTunes Plus but on some occasions it does produce smaller files. As where vbr constrained 100% of the time produces the same file as iTunes Plus.

iTunes Plus preset reverse engineered

Reply #23
I also haven't lately seen anyone posting sizes of extracted AAC streams. The comparison of overall file sizes (including tags and padding) or bitrates calculated from overall file sizes, or t is not sufficient.

iTunes Plus preset reverse engineered

Reply #24
I also haven't lately seen anyone posting sizes of extracted AAC streams. The comparison of overall file sizes (including tags and padding) or bitrates calculated from overall file sizes, or t is not sufficient.

googlebot is right.  You have to use something like Yamb (freeware) to extract the raw AAC stream to really be able to tell if there's a difference.  At the very least, look at the four- or five-digit file size, not the "xx.x".  I made that mistake earlier in the thread and got completely bogus results. 

I don't do much at the 256 bitrate, but I have been experimenting with qtaacenc's 320 Constrained VBR versus "Quality 127" True VBR.  I had favored the constrained setting, as it seemed to always produce larger files at a higher average bitrate, with maybe one out of every five files being identical.  However, I've found that perhaps one out of every ten tracks or so is actually larger when encoded with True VBR at quality 127.  So now I am more apt to "trust" the encoder to do what it needs to do.

I'm trying to get over the whole "bigger means better" mindset.  It's hard for me.  It's helped to see that mono tracks encoded in Apple Lossless have a really low bitrate.  In fact, the track "Sea Fever" from Peggy Lee's "Sea Shells" album has an average bitrate in ALAC of only 321... that's lossless!  Plus the fact that the Minstry "Show Me Your Spine" killer sample posted here seemed to my ears to come through even 128kb AAC just fine, though it failed at 320kb MP3.  Bigger doesn't always mean better, I guess.