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
translations translations
Search



Donate

Rockbox Technical Forums


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

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  M4A files (Foobar2000/NeroAacEnc) play at double speed
« previous next »
  • Print
Pages: [1]

Author Topic: M4A files (Foobar2000/NeroAacEnc) play at double speed  (Read 9222 times)

Offline madsic

  • Member
  • *
  • Posts: 110
    • Vi har pander!
M4A files (Foobar2000/NeroAacEnc) play at double speed
« on: April 24, 2007, 08:12:29 AM »
Having searched the forums I came across some advice regarding how to make m4a files that would be compliant with the way Rockbox expects M4A files to be (something about the placements of tags, I think). So I got hold of Foobar2000 and the Nero Aac Encoder that would work with it and set to work.

Now unlike many other M4A/MP4 files that I've tried on Rockbox, this one isn't skipped over but loaded and played. Tag information displays correctly. However playback is very fast (mouse voice). The displayed length of the file is half of what it should be and the 'current position' advances quicker than realtime too. The bitrate displayed is double that which WinAmp report (106 kbps to WAs 53 kbps).

I have seen mention that the m4a codec on some targets (mine is an iPod nano) was not yet at realtime but this is obviously quite another problem. Is this a general thing or something to do with the encoding process? The file plays normally in WinAmp.

Any help appreciated.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #1 on: April 24, 2007, 08:25:58 AM »
Which type of AAC file is it?
Logged

Offline madsic

  • Member
  • *
  • Posts: 110
    • Vi har pander!
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #2 on: April 24, 2007, 08:34:13 AM »
Not sure what you mean. This is what WinAmp's file info says:

Code: [Select]
Track Type Info
1 audio MPEG-4 AAC LC, 4353.479 secs, 53 kbps, 22050 Hz

Does that help?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #3 on: April 24, 2007, 08:59:14 AM »
Try encoding the file at 44100 Hz instead. There are some resampling issues on iPods.
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #4 on: April 24, 2007, 09:12:57 AM »
I doubt the resampler is the problem. I suspect it is the SBR detection. In FAAD (I think it was) I found a note to this effect:

Quote
SBR not indicated, but the file might still contain SBR. MPEG specification says that one should assume SBR if samplerate <= 24000 Hz.

Maybe I should try to find more information about this...

By the way, you can try the "Optimize MP4 stream" (don't remember the exact name) function in Foobar on the files that don't play. If that doesn't help, I'd be interested in a test file... :)
Logged

Offline madsic

  • Member
  • *
  • Posts: 110
    • Vi har pander!
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #5 on: April 24, 2007, 09:25:50 AM »
Thanks to the both of you for promt replies. I didn't immidiately figure out how to convert 22kHz to 44 in Foobar2000, so I tried a 44Khz MP3 instead and the M4A conversion plays very nicely (I tried playing the file on winamp alongside rockbox and they kept apace).

To Lear: I'm unable to find what you're referring to. I've looked under converter settings in Preferences as well as 'Encoding Preset', 'ReplayGain processing' and 'DSP Processing' in the Converter Setup (the window you get when you start a conversion). Can you point me i the right direction?

EDIT: I found and did "Optimize MP4 Layout" on the converted file. Didn't change anything that I can observe. I'm no expert but Llorean's explanation makes sense. If you're stille interested, I've uploaded an example here.
« Last Edit: April 24, 2007, 09:45:05 AM by madsic »
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #6 on: April 24, 2007, 09:38:06 AM »
Lear: I know that midi plays double speed because the 22050hz isn't resampled and so plays as if it were 44100 and sounds double speed, and Doom suffers the same problem (again because it's using midi), and I'd been told that the iPod simply wasn't resampling at all (though this may have changed, it was quite some time ago)
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #7 on: April 24, 2007, 09:53:30 AM »
Llorean: Ah, I didn't know what the resampling problem was. But I left out one detail from my explanation: If certain parts of the metadata reader sees a frequency of less than 24k, it doubles the it, in this case making Rockbox see it as 44.1k (the decoder doubles the frequency if the file really is SBR).

madsic: It's not in the settings at all. Try right-clicking on the file. I think it's in the utils submenu (can't easily check right now)...
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #8 on: April 25, 2007, 12:49:21 AM »
I removed the automatic frequency doubling, so 22 kHz files should play with the proper speed now. The SBR detection was improved, so that the SBR test files I have still work (apart from not playing in real time on most Rockbox players, that is).

However, this might mean that other (SBR) files play at the wrong speed...
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9369
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #9 on: April 25, 2007, 01:03:40 AM »
Quote
The SBR detection was improved, so that the SBR test files I have still work (apart from not playing in real time on most Rockbox players, that is).

Does the SBR actually get decoded?  Or do you mean that the LC part runs slow?
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #10 on: April 25, 2007, 03:35:38 AM »
Yes, the SBR is decoded. LC AAC is realtime on all targets, as far as I know.
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #11 on: April 25, 2007, 09:45:24 AM »
Lear: I have some 22 KHz files that don't play right. I'm not sure if they used to but I think so. They  play too slow. If you want I could upload an example for you.
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #12 on: April 25, 2007, 03:44:50 PM »
Quote from: NicolasP on April 25, 2007, 09:45:24 AM
Lear: I have some 22 KHz files that don't play right. I'm not sure if they used to but I think so. They  play too slow. If you want I could upload an example for you.

Strange... Please do.
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #13 on: April 26, 2007, 01:36:04 PM »
Annoying. That seems to be one of those files where there is no indication of SBR in the headers (which is perfectly valid, I've learned). Maybe I should revert parts of that latest change (to double the frequency if <= 24000 Hz). And perhaps see if the codec can update the frequency information after the playback has started (which would be a little ugly...).
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: M4A files (Foobar2000/NeroAacEnc) play at double speed
« Reply #14 on: April 26, 2007, 02:08:58 PM »
With your latest commit, the files are played correctly :)
One small thing though : the frequency is displayed as 44 KHz in the ID3 info screen.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  M4A files (Foobar2000/NeroAacEnc) play at double speed
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.168 seconds with 21 queries.