Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Long AAC files fail
« previous next »
  • Print
Pages: [1]

Author Topic: Long AAC files fail  (Read 2868 times)

zajacattack

  • Guest
Long AAC files fail
« on: December 29, 2007, 06:25:15 PM »
Is there any hint as to why long AAC files won't play?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Long AAC files fail
« Reply #1 on: December 29, 2007, 06:38:46 PM »
Have you searched, I'm almost positive it's been explained before in general terms.
Logged

zajacattack

  • Guest
Re: Long AAC files fail
« Reply #2 on: December 29, 2007, 06:43:34 PM »
Yes, I can't seem to find what you are referencing.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Long AAC files fail
« Reply #3 on: December 29, 2007, 07:04:39 PM »
Lear has mentioned it in the past, but I can't find anything explaining why.  You may have to track him down and ask him directly.

Personally, I expect the answer is some variation of "faad sucks".
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Long AAC files fail
« Reply #4 on: December 29, 2007, 07:08:05 PM »
IIUC, it's nothing to do with faad, the issue is with the mp4/m4a container format, and Rockbox has its own written-from-scratch mp4 parser.

So whilst faad has many faults, we can't blame this one on it ;)
Logged

zajacattack

  • Guest
Re: Long AAC files fail
« Reply #5 on: December 29, 2007, 07:11:55 PM »
So, it's most likely something in the parser?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Long AAC files fail
« Reply #6 on: December 29, 2007, 07:14:38 PM »
If I recall it's filesize based. So a test could be a few large mp4 files with ALAC and AAC audio in them, and see if they both fail at similar filesizes?
Logged

zajacattack

  • Guest
Re: Long AAC files fail
« Reply #7 on: December 29, 2007, 07:16:41 PM »
So, would the filesize limit thus apply to ALL formats, or just AAC?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Long AAC files fail
« Reply #8 on: December 29, 2007, 07:17:57 PM »
MP4 container. All formats that use it.
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Long AAC files fail
« Reply #9 on: December 30, 2007, 04:46:56 AM »
The MP4 container stores the size of each individual frame of the file (one frame is usually 1024 samples). This allows accurate seeking, but all this size information can be quite large. The current parser simply reads this table as is, and if the table is too large, it won't fit in memory, causing the playback to fail.

To complicate things a bit, this frame size table isn't enough to seek. There are actually 4 different tables involved (e.g., frames are grouped in chunks). The 3 other tables are usually small, but not always, which makes it difficult to say if a file will work or not given the file size or file time.

One way to fix this is to not just read the tables as is, but to merge individual frame sizes as they are read. This reduces the amount of memory required, at the expense of seek precision. It needs to be done at buffering time though, since you pretty much have to seek in the file in order to do it, given the memory constraints in Rockbox.
Logged

zajacattack

  • Guest
Re: Long AAC files fail
« Reply #10 on: December 30, 2007, 02:38:08 PM »
OK, so the problem IS in the MP4 container and in the design of how rockbox parses the files? If something could be done to allow larger tables than memory to be read, that would fix the problem, correct?
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Long AAC files fail
« Reply #11 on: December 31, 2007, 05:55:10 AM »
Yes, that's a correct interpretation of what I said.  :)
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Long AAC files fail
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.083 seconds with 14 queries.