Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: evilking on September 21, 2011, 06:16:35 PM

Title: [Solved] Sansa Clip+ AAC playback problem
Post by: evilking on September 21, 2011, 06:16:35 PM
Hi. I'm having a problem with AAC files (they are all CBR 400kbps). The last track of a playlist will pause at 1:54, refuse to unpause and eventually crash. There are many factors:

1) This is any last track of any playlist where the last track is AAC.
2) This happens only when playback starts before the last track i.e. play the 1st/3rd/second to last track and wait for the last track to play automatically. If playing the last track directly, it plays fine.
3) This does not happen with MP3s, I have not tried other formats.
4) I'm using the latest Nero codec, I've not tried other aac encoders.
5) Every other track in a playlist plays fine. I can have a playlist of two tracks and play the first, wait for the second to pause, restart the player, swap the tracks over and do it again. It's definitely not file specific.
6) When the player pauses, I can turn it off, turn it back on, go to resume playback and it will pick up the track at 1:54 and play right to the end just fine.
7) I can get the track to pause at 1:44 or 2:00 depending on settings that affect ram, including 'database load to ram' and 'directory caching'.i.e. turning them on makes the track pause sooner. I've not tried other settings yet (all this testing is time consuming).
8] I've not yet tried other bitrate AAC.

Other info: I'm running the latest rockbox 3.9.1 and the latest bootloader. The Clip+ is 8GB and brand new (5 days old). I have a 32GB microSD bought from Amazon direct (not marketplace), it's genuine (full 32GB is usable and speed is fine). The internal memory has ~100mb free, the SD card has 8.24GB free.


Has anyone come across this before? Does this sound familiar?


Thanks
EK
Title: Re: Sansa Clip+ AAC playback problem
Post by: Buschel on September 22, 2011, 01:28:17 PM
Good tests you've performed. Some more questions:

If you play two tracks, whereas the 2nd on is the AAC which will pause at 1:44 (or at a similar time position):
1) How big is the first file?
2) How much RAM is available for buffering (can be gathered from System/RockboxInfo)?
3) Does the time position of the freeze change if you play another file (different length) before the same 2nd one? The filesize should of the first file should be reasonably different (+/-30s or +/-1.5 MB for a 400kbps file).

I assume this is connected to buffering.
Title: Re: Sansa Clip+ AAC playback problem
Post by: evilking on September 22, 2011, 05:20:34 PM
I think it's my encoder, I'm using dbpoweramp converter with the Nero exe, and I passed some files through the mp4 optimize function in dbpoweramp and the issue disappeared. I had a similar problem a couple years ago with the Creative Zen, which would refuse to play aac created by dbpoweramp unless passed through the optimize function.

Here is a description of what the optimize function does from dbpoweramp help file:

"[m4a Optimize]

Typically m4a files can have meta data after the audio data chunk, which is no good for streaming devices (which need the meta data before audio). This optimizer will remove unused blank chunks and move the meta data before the audio data, also an RTP hint track can be generated (used by certain decoders to find properties of the audio track without first having to decode it).

The optimize might also solve issues when trying to play m4a files on devices which are inflexible on the content and order of m4a chunks."


I didn't check the RTP hint box (it wasn't necessary on the Zen), and I've only tried it on two 3-minute files to test, I'm converting the rest now and will test them properly on the way to work tommorow.

Post Merge: September 22, 2011, 05:34:16 PM
Good tests you've performed. Some more questions:

If you play two tracks, whereas the 2nd on is the AAC which will pause at 1:44 (or at a similar time position):
1) How big is the first file?
2) How much RAM is available for buffering (can be gathered from System/RockboxInfo)?
3) Does the time position of the freeze change if you play another file (different length) before the same 2nd one? The filesize should of the first file should be reasonably different (+/-30s or +/-1.5 MB for a 400kbps file).

I assume this is connected to buffering.

The size varies a lot, 8-30mb depending on song, I have not tried shorter than 3 minutes for the first file.

RAM available is 6.1mb.

The time position doesn't change at all regardless of the first file! This is what caught my attention, I only started using it this week and not having much experience with rockbox I assumed it was random and aac support was not finished yet or something. It was only yesterday I noticed it was the same 1:54 on every album/playlist (7-10 minute metal, or 3 minute rock).

It's probably the stupid encoder, dbpoweramp is excellent and convienient in most respects, but this is twice now it's causes issues with m4a.
Title: Re: Sansa Clip+ AAC playback problem
Post by: Buschel on September 23, 2011, 12:40:06 AM
Good to see you have solved your issue. Maybe I can find a way to make the decoder more robust. Could you upload one of the problematic files?
Title: Re: Sansa Clip+ AAC playback problem
Post by: evilking on September 23, 2011, 12:44:44 AM
It works! I didn't noticed before but with the old files the "view database info" on the debug menu used to show -1% next to progress followed by the number of files in brackets. Now with all files optimized it shows 100% (with same number of files in brackets).

I'll upload some test files later today.