IPB

Welcome Guest ( Log In | Register )

Could we add gapless to Apple's AAC encoder?, task for iTunesencode or other?
guruboolez
post Jun 21 2005, 08:11
Post #1





Group: Members (Donating)
Posts: 3474
Joined: 7-November 01
From: Strasbourg (France)
Member No.: 420



I have a question about a possible new iTunesEncode feature (or any other program driving Apple's AAC encoder). Wouldn't it be possible to add a gapless feature? It might sound silly, but after all, nyaochi did it with the latest Fraunhofer MP3 encoder (here and here). I'm not a coding expert -I'm not a coder at all- but I think that doing it wouldn't be an impossible task.

Adding somewhere in the tags the precise offset (constant for Apple's encoder) and calculating the amount of padded sample maybe suffice? I don't really know. faac and Nero AAC are gapless, and apparently Apple is not hurry to implement this feature. It's a pity, because Apple's encoder is pretty good. Gapless playback is not possible on any iPod, but on a computer (playing with foobar2000 as exemple) users would benefits from it.

Could we reproduce Nyaochi's ACMenc patch to work with iTunes? Or make something similar? What do you think?
Go to the top of the page
+Quote Post
 
Start new topic
Replies
nyaochi
post Jun 22 2005, 01:40
Post #2





Group: Members
Posts: 169
Joined: 30-September 01
From: Tokyo, Japan
Member No.: 99



I don't know much about AAC and MP4 container (I don't even install iTunes on my computer tongue.gif ), but technically speaking, it should be possible to write such a frontend program for iTunes. We need: 1) encoder delay of iTunes AAC encoder; 2) number of padded silent samples at the end of stream by iTunes (of course it's not constant); and 3) container to store above 1) and 2) information.

As for ACMENC implementation, 1) is supposed to be specified by a user (through a command-line preset); 2) is calculated by the number of samples in an input audio and the number of samples (MP3 frames) in the output MP3 stream. We use MP3-Info frame to store the encoder delay/padding information. To achieve 2), we must count manually the number of frames in the output stream generated by F-IIS ACM codec. We cannot reuse my source code because MP3 and AAC/MP4 are totally different.

I'm not sure how AAC gapless is achieved, but the scenario I guess would be:
1) convert an input audio file into AAC file by iTunes' COM interface;
2) open the input audio file and obtain the number of samples;
3) open and parse the output AAC file to count up the number of frames;
4) construct MP4 stream from the AAC stream and delay/padding information by using libmp4v2(?) similarly to FAAC.

In addition to the general audio-programing knowledge, the knowledge about AAC stream format and MP4 container format will be necessary.

This post has been edited by nyaochi: Jun 22 2005, 01:46
Go to the top of the page
+Quote Post

Posts in this topic
- guruboolez   Could we add gapless to Apple's AAC encoder?   Jun 21 2005, 08:11
- - Otto42   Short answer: no. Long answer: yes, but I'm n...   Jun 21 2005, 18:25
|- - Mike Giacomelli   QUOTE (Otto42 @ Jun 21 2005, 09:25 AM)Short a...   Jun 22 2005, 05:35
|- - Gabriel   QUOTE How would you get the encoder delay out of i...   Jun 22 2005, 08:56
- - Tropican   This may be a dumb question, but if the encoding d...   Jun 21 2005, 23:55
- - nyaochi   I don't know much about AAC and MP4 container ...   Jun 22 2005, 01:40
- - Tropican   QUOTE (nyaochi @ Jun 21 2005, 07:40 PM)We nee...   Jun 22 2005, 02:19
|- - nyaochi   QUOTE (Tropican @ Jun 22 2005, 10:19 AM)How d...   Jun 22 2005, 03:11
- - Tropican   Sorry, my last post was poorly written. QUOTE (ny...   Jun 22 2005, 04:10
- - Tropican   QUOTE (Gabriel @ Jun 22 2005, 02:56 AM)you ha...   Jun 22 2005, 22:31
- - M   Pardon my ignorance on the technicalities involved...   Jun 23 2005, 02:37
|- - soundcheck   QUOTE (M @ Jun 22 2005, 09:37 PM)Pardon my ig...   Jun 23 2005, 06:31
|- - bond   QUOTE (soundcheck @ Jun 23 2005, 07:31 AM)QUO...   Jun 23 2005, 20:20
|- - soundcheck   QUOTE (bond @ Jun 23 2005, 03:20 PM)QUOTE (so...   Jun 23 2005, 23:06
|- - bond   QUOTE (soundcheck @ Jun 24 2005, 12:06 AM)The...   Jun 24 2005, 09:22
|- - soundcheck   QUOTE (bond @ Jun 24 2005, 04:22 AM)hm could ...   Jun 24 2005, 21:00
- - Mono   Actually that's Apple's official stance: Q...   Jun 23 2005, 04:13
- - westgroveg   I think guruboolez needs CASE.   Jun 23 2005, 05:55
- - bond   ok so its seems to be indeed a non-mp4 file, thx...   Jun 25 2005, 10:09
|- - soundcheck   QUOTE (bond @ Jun 25 2005, 05:09 AM)ok so its...   Jun 25 2005, 18:29
|- - M   QUOTE (soundcheck @ Jun 25 2005, 12:29 PM)I t...   Jun 25 2005, 19:13
- - bond   can you run mp4box's -info on the itunes audib...   Jun 25 2005, 19:05
- - nyaochi   Since no one seems to take this task, I read the s...   Jun 27 2005, 03:04
|- - rjamorim   QUOTE (nyaochi @ Jun 26 2005, 11:04 PM)Does a...   Jun 27 2005, 03:57
|- - Juho Vähä-Herttua   I just implemented true gapless playback of AAC fi...   May 2 2006, 13:56
- - bond   somehow i get the feeling that this "hacking...   Jun 27 2005, 09:59
- - nyaochi   Thanks for the info, rjamorim and bond To summa...   Jun 27 2005, 12:03
- - Tropican   QUOTE (nyaochi @ Jun 27 2005, 06:03 AM)1) but...   Jun 29 2005, 02:58
- - loophole   http://www.apple.com/quicktime/tutorials/chaptertr...   Jun 29 2005, 05:04
|- - Fofer   Great info here, looks like this is a great way fo...   Jul 10 2005, 17:04
- - cvkslashdot   Check my tutorial w/ images if you have a mac: ht...   Jul 20 2005, 01:15
- - Otto42   This isn't really "gapless" as I see...   Jul 20 2005, 16:35
- - nyaochi   I bet Apple will implement the gapless feature in ...   Jul 20 2005, 16:49
- - e-San   I know topic seems to be dead but i am quite shure...   Mar 28 2011, 09:10


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2014 - 03:40