INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Gapless Playback on iPod?  (Read 11818 times)

e-head

  • World Citizen
  • ***
  • Posts: 121
Gapless Playback on iPod?
« on: June 17, 2008, 11:08:33 pm »

I was listening to an older mp3 rip on my iPod today when I noticed a small "hiccup" during the transition from one song to the next. This album used to play absolutely smoothly, without even a trace of a "hiccup", when I used to sync with iTunes.

Sure enough, I fire up iTunes, transfer the album over with it, and it plays perfectly seamlessly. Also, interestingly enough, iTunes seemed to have determined gapless playback info for all songs on my iPod when I synced it. This took a few minutes, but it seemed to have worked.

iTunes seems to perform some sort of gapless Voodoo, because it can play back files gaplessly almost without flaw, no matter what the encoder was, how long ago they were encoded, and irregardless of whether they are VBR or CBR. I've also had no issue with fast-forwarding or pausing, as some people have. I think they are just doing some sort of analysis themselves, and not even paying any attention to the file tags.

I then tried the same "problem" album, but re-encoded to m4a files using iTunes, and synced them with MC. I get the same little blip. The same files syned with iTunes play perfectly seamlessly.

So, my question is...

Are there any plans to try and figure out what this gapless Voodoo is that iTunes is using, and trying to reproduce it? It would be really nice to be able to play our old rips gaplessly. Or even to play new m4a files gaplessly, as it is my preferred codec.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: The State of Gapless Playback?
« Reply #1 on: June 18, 2008, 08:38:42 am »

If you use a newish LAME for MP3 encoding (which MC does), you will get perfect gapless playback on an iPod.
Logged
Matt Ashland, JRiver Media Center

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: The State of Gapless Playback?
« Reply #2 on: June 18, 2008, 08:58:59 am »

Does the iPod support LAME gapless headers out-of-the box ?

Thought only Rockbox did.

Always thought any mp3 had to necessarily go through some iTunes 'voodoo' before gapless play worked.

Implication being no iTunes, no gapless. (even with the LAME headers incld)
Logged

e-head

  • World Citizen
  • ***
  • Posts: 121
Re: The State of Gapless Playback?
« Reply #3 on: June 18, 2008, 09:06:09 am »

Thanks for the feedback.

I've done a little investigating, because gapless playback is pretty important to me, and I stumbled upon this explanation of iTunes mysterious tags (I had always assumed it was the replay gain info, but I was wrong):

"As mentioned above, music ripped through iTunes 7 does not create a XING/INFO header within the first frame of the mp3 and thus there also is no LAME header telling some players how to play gapless. iTunes stores the info needed for gapless playback inside ID3v2 tags at the top of the file as extra comments inside the ID3v2 tag -- mainly as iTunSMPB and iTunNORM. There are others like iTunPGAP, but the primary comment that holds the most important hex values is iTunSMPB. The 2nd value is encoder delay (528 for iTunes), the 3rd value is zero-padding, and the 4th hex value is the length in samples of the original track. Here is a great discussion on this topic:

http://www.hydrogenaudio.org/forums/index.php?showtopic=48231&st=136
"

I'm wondering if there is any tool or program that can go back and reconstruct proper LAME gapless headers for old mp3 rips? If anyone knows of one, TIA.


PS
Perhaps the MC devs could be persuaded to tango with the arrogant folks at Apple?
Even though the tags they create are totally proprietary, I will give them credit for phenomenal gapless playback support with virtually any files.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: The State of Gapless Playback?
« Reply #4 on: June 18, 2008, 09:14:11 am »

Does the iPod support LAME gapless headers out-of-the box ?

Sort of.  The iPod doesn't read the file tags.  It relies on the upload program to put the gapless information in its database.  Media Center does this.
Logged
Matt Ashland, JRiver Media Center

e-head

  • World Citizen
  • ***
  • Posts: 121
Re: Gapless Playback on iPod?
« Reply #5 on: June 18, 2008, 10:48:31 am »

Right now I assume MC properly implements gapless info from the LAME info header.

Is there any chance you guys will implement iTunes gapless tags at some point in the future?
I'm banging my head against a wall now for aac encoding about 400 albums with iTunes. The gapless info is there, just in a different format.

Perhaps you could look for LAME gapless info first, and failing that, look for Apple's tags?

I think the 2 biggest pitfalls of digital music are gapless playback and volume normalization.

cheers,
e
Logged

e-head

  • World Citizen
  • ***
  • Posts: 121
Re: Gapless Playback on iPod?
« Reply #6 on: June 18, 2008, 03:05:33 pm »

I assume you guys are giving this deep consideration.
;)

If you guys did end up implementing this, in addition to being able to play back iTunes encoded files gaplessly, there is the added advantage that virtually any files that have ever been imported into iTunes would be gapless (or virtually gapless).

I've used encspot to go back over my mp3 collection, and I'll have to give them credit... they have got gapless playback working pretty good with everything from Xing to lame to Gogo and Fastenc. VBR and CBR, whether missing a LAME/XING/INFO header or not.

It looks like iTunes now embeds everything into the COMMENT iTUNENORM tag.


What would be even more ideal is trying to figure out how iTunes cooks up it's gapless numbers? Then this could simply be done as a part of the analyzing the audio, and the numbers could be stored in the database.
Logged

e-head

  • World Citizen
  • ***
  • Posts: 121
Re: Gapless Playback on iPod?
« Reply #7 on: June 19, 2008, 09:57:39 am »

My OCD gene has really gone into overtime on this, so I thought I'd come back here and share what I've learned.

For LAME encoded files with gapless information, and for it's own aac files, iTunes uses the gapless info from the file itself. (There is some debate on what it does with Nero's gapless info). For older rips, whether it be fastenc, Gogo, or whatever, iTunes does a "psuedo-gapless" analysis on the files.

Gapless inforormation is stored in this ITUNSMPB tag ONLY for it's own rips (aac and mp3). When it does the gapless analysis on foreign rips it just keeps the info in it's "iTunes Library.itl" file.

Exporting your library does not export the gapless info, sadly. If you export your library, delete the iTunes database files, and then re-import, you can see this. iTunes does the gapless analysis all over again.

There also doesn't appear to be a way to get this info using the Apple SDK. Apparently they are a bit secretive about this. They probably don't want people importing their old rips into iTunes, then doing some tagging/scripting voodoo, and getting this info into another application. Damn them! ;)

So... even if MC ended up supporting the ITUNSMPB tag, it would only apply to iTunes rips, where the info is in a file tag.

There are so many things I dislike about iTunes, but I will give credit where credit is due. They took on the challenge of gapless playback and they did a pretty good job. I loaded my iPod with a bunch of gapless albums (all older, "foreign" rips), and they playback pretty much seamlessly regardless of the codec.

The idea of doing a "gapless analysis" and then storing that data, either in the database, or in the file, is not a bad one.

You can't blame them for cooking up their own gapless tags really, considering they are doing gapless with old files without LAME headers, aac files, etc...
Logged
Pages: [1]   Go Up