Skip to main content

Topic: Could we add gapless to Apple's AAC encoder? (Read 35694 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • nyaochi
  • [*][*][*]
Could we add gapless to Apple's AAC encoder?
Reply #25
Thanks for the info, rjamorim and bond 

To summarize the current situation, MPEG-4 specification does not define a field to store encoder's delay. To store the delay value, we must either:
1) Define own field in "udta" MP4 box. Hack FAAD source code to utilize the information. This is straightforward approach to the current situation, but Ivan posted in the thread, "Next revision of nero encoder will have Nero Digital Gapless data embedded in the MP4 file, fully compatible with the ISO File Format guidelines." I'm not a developer of MPEG-4 AAC encoder and don't want to propose another specification while Nero Digital Gapless data is about to be released (or already been released?) by a major MPEG-4 AAC developer. We should avoid such chaotic situation beforehand.

2) Use "edts" MP4 box for this job. Hack FAAD source code to support "edts" MP4 box. I don't think this approach is a good idea because "edts" box seems to aim at stream editing (cutting and combining) and should not be used just for gapless playback.

And another problem is,,, I'm not so MP4/AAC freak.

  • Tropican
  • [*][*]
Could we add gapless to Apple's AAC encoder?
Reply #26
Quote
1) but Ivan posted in the thread, "Next revision of nero encoder will have Nero Digital Gapless data embedded in the MP4 file, fully compatible with the ISO File Format guidelines." I'm not a developer of MPEG-4 AAC encoder and don't want to propose another specification while Nero Digital Gapless data is about to be released (or already been released?) by a major MPEG-4 AAC developer.
[a href="index.php?act=findpost&pid=309201"][{POST_SNAPBACK}][/a]


Yes, perhaps it is best to wait.  The really nifty part is since Apple does not seem interested in 'true' gapless then perhaps only Nero's spec will become common in the AAC gapless world, allowing for greater compatibility. 

Very good work nyaochi with your earlier test, I think now it is better understood (at least by me) where we stand on iTunes gapless.
  • Last Edit: 28 June, 2005, 09:59:04 PM by Tropican

  • loophole
  • [*][*][*][*]
Could we add gapless to Apple's AAC encoder?
Reply #27
http://www.apple.com/quicktime/tutorials/chaptertracks.html

perhaps they are implemented like this, mp4 is heavily based on .mov after all...

  • Fofer
  • [*]
Could we add gapless to Apple's AAC encoder?
Reply #28
Great info here, looks like this is a great way for TRUE gapless, chaptered playback in iTunes and the iPod:

http://www.dougscripts.com/itunes/index.php#070805b

http://www.voxmedia.org/wiki/PodcastChapterTool


Now that the ingredients are in place, something tells me a GUI or a script will come out soon that will allow you to insert a CD, choose a menu selection and it will do all the heavy for you.

Could we add gapless to Apple's AAC encoder?
Reply #29
Check my tutorial w/ images if you have a mac:

http://gapless.itunes.wanderingfocus.com/

  • Otto42
  • [*][*][*][*][*]
Could we add gapless to Apple's AAC encoder?
Reply #30
This isn't really "gapless" as I see it. It's more similar to foobar's CUE file support, kinda. You have the whole album in one file and can set markers at where the tracks are. Yes, you can do gapless with it, but it's still one file and not multiple files.

  • nyaochi
  • [*][*][*]
Could we add gapless to Apple's AAC encoder?
Reply #31
I bet Apple will implement the gapless feature in iTunes and iPod by using Apple Core Audio Format:
http://www.hydrogenaudio.org/forums/index....showtopic=35482
http://developer.apple.com/documentation/M...pec/CAFSpec.pdf

The specification discusses the gapless playback for at least MP3, AAC, and ALAC by taking an AAC example of encoder delay and the number of samples in a frame. IMHO we should wait for the next major update of iTunes/iPod.

Could we add gapless to Apple's AAC encoder?
Reply #32
I just implemented true gapless playback of AAC files to XMMS2 using mp4ff from faad project. This thread has been dead for a while but it seems to have a high google rank when searching about gapless AAC so I'll post here what I've learnt.

I think the Nero/Audiocoding guys never bothered to hack into the MP4 container a way to store delay, because both Nero and FAAC have the same delay, and FAAD is compatible with that delay, so it takes it into account automatically when decoding.


This is not true, Nero and FAAC have the delay of 1024 samples which is same as the frame duration they are using and the encoder stores the 1024 offset in ctts sample offset field just correctly. So the most simple way of supporting encoder delay is simply to drop the first frame. What FAAD mp4ff doesn't support very well is decoder delays that are longer than the first frame (it affects total duration of the song in a wrong way at least). I don't know how foobar2000 uses faad and I'm not interested in closed source software in this case.

Is this experimental program mentioned earlier in the thread available somewhere? I could check what I can do but I'm not really interested in manipulating the values manually if there's already some solution available.

  • e-San
  • [*]
Could we add gapless to Apple's AAC encoder?
Reply #33
I know topic seems to be dead but i am quite shure the problem still exists.

After reading few topics i have some idea.
I use to convert my CD albums to audiobooks to copy it to my iPod. I like it this way.
It is necessery (for me) to add chapters informations to make it usefull for foobar and others.

I use to use linux to do whole this stuff.
I convert audio files with iTunes and some scripting.

I convert each song and then completes all into audiobook.
Ofcourse there are gaps. Quite annoying.

Since i in the end make audiobook i can stick with converting whole album to one wav file and then convert it with iTunes.

iTunes add samples at the beggining and the end of file as Your reserch result.
Since it is not between songs it is not so annoying but i want to add chapters.

My idea to force iTunes to stick with one-lenght silence at the begginig of file is to add proper number of samples at the end of wav file so i can add this information to my chapters file.

What do you think about it?

Best regards!

p.s. by the way. as far as i remember MP4Box (or neroAacEnc) has posibility to DISABLE one of chapters.
it would be posibility to produce mp4 files with iTunes gapless. force iTunes to add constant silence samples at the beggining an the rest at the end. then, mark beggining as chapter and disable it. same for ending.