Help - Search - Members - Calendar
Full Version: What produces gapless AAC?
Hydrogenaudio Forums > Lossy Audio Compression > AAC > AAC - General
Pavel Nezamaev
Hello!

What produces gapless AAC? iTunes or QuickTime? In other words, if I encode gapless CD to AAC files using iTunes 4 (and QuickTime 7) will it play without gaps in iTunes 7?

Cheers!
eofor
QUOTE(Pavel Nezamaev @ May 2 2007, 10:52) *

Hello!

What produces gapless AAC? iTunes or QuickTime? In other words, if I encode gapless CD to AAC files using iTunes 4 (and QuickTime 7) will it play without gaps in iTunes 7?

Cheers!


Quicktime does the encoding. But iTunes 4???? Why not upgrade to 7, which is is much, much faster (and has most of the tagging bugs ironed out).
chrisgeleven
As far as I know, iTunes 7 scans any AAC or MP3 file and attempts to figure out where the gaps are. Don't know how it does it (especially for old AAC and MP3 files that don't have any gapless info), but it is remarkably accurate.
jido
I am not sure, you need to try. I suppose iTunes could be writing the gapless info into the file as it writes the other tags. Quicktime Pro would save the gapless info, but iTunes 4 just use the Quicktime library not the Quicktime application itself.
Pavel Nezamaev
QUOTE(eofor @ May 2 2007, 15:28) *

Quicktime does the encoding. But iTunes 4???? Why not upgrade to 7, which is is much, much faster (and has most of the tagging bugs ironed out).

I've just bought a Mac (which has iTunes 4 installed by default) and ripped a couple of CDs with it. And I wanted to know what to do — leave iTunes 4 files or re-encode those CDs again with iTunes 7. But iTunes 7 hopefully plays iTunes 4 files without gaps.

Thanks everybody for replying!
ozmosis82
Short answer:

Windows -- iTunes (with a little help from QuickTime)
OS X -- iTunes via QuickTime & Core Audio

Long answer:

When it encodes, iTunes adds the appropriate information to each file's tag, which is used during playback. iTunes also supports Nero AAC files with their method of incorporating gapless info (as of iTunes v7.1.2, if I'm not mistaken).

The answer to your original question can be found in the following thread:

http://www.hydrogenaudio.org/forums/index....showtopic=48231

More specifically:
QUOTE(kincaid @ Sep 14 2006, 12:07) *

QUOTE(nyaochi @ Sep 14 2006, 09:58) *

I also confirmed that iTunes v7.0.0.70 does attach the information for calculating accurate stream length to MP3 files.

Creating two WAVE files with 441000 samples (10 seconds) and 441001 samples (10 seconds + 1 sample), I encoded them to two MP3 files by using iTunes v7.0.0.70. I checked the MP3 files and noticed some differences in ID3v2.2 tags generated by the encoder.

[441000.mp3]
TT2: segment1
COM(eng): iTunPGAP=0
TEN: iTunes v7.0.0.70
COM(eng): iTunNORM= 0000121E 00000C71 00006417 00002D9A 000024A1 0000234E 0000827F 000085FB 0000023E 00000D43
COM(eng): iTunSMPB= 00000000 00000210 000007C8 000000000006BAA8 00000000 00026783 00000000 00000000 00000000 00000000 00000000 00000000

[441001.mp3]
TT2: segment1
COM(eng): iTunPGAP=0
TEN: iTunes v7.0.0.70
COM(eng): iTunNORM= 0000121E 00000C71 00006416 00002D9A 000024A1 0000234E 0000827F 000085FA 0000023E 00000D43
COM(eng): iTunSMPB= 00000000 00000210 000007C7 000000000006BAA9 00000000 00026783 00000000 00000000 00000000 00000000 00000000 00000000

Note that there're some differences in iTunNORM and iTunSMPB comment frames. The different values may represent the number of padded samples by the encoder.

As these MP3 files have 385 frames, the number of decoded samples will be 1152 * 385 = 443520 [samples] (without any handling for gapless playback). Assuming that the second and third values in iTunSMPB present the numbers of encoder delay and encoder padding in samples, I obtain the original sample length: 443520 - 528 (0x210) - 1992 (0x7C8) = 441000 [samples] = 10 [sec]. The forth value in iTunSMPB frame probably represents the original sample length since 0x6BAA8 equals to 441000 [samples]. I'm not sure how other values in these frames are used, but I hope this will be a good starting point to understand the mechanism of the gapless playback proposed by Apple.



This analysis is correct. Additionally, the sixth value is the byte offset from the first audio frame to the 8th-from-last frame. This provides a resynchronization mechanism to restore a decoder's true sample number after a seek.
eofor
QUOTE(ozmosis82 @ May 3 2007, 07:57) *

Short answer:

Windows -- iTunes (with a little help from QuickTime)
OS X -- iTunes via QuickTime & Core Audio


I believe the original question was which application actually inserts the gapless tag, iTunes or Quicktime. He's using an outdated version of iTunes (v4) with the latest QT (v7) and wonders if the gapless info will be inserted.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.