views:

24

answers:

2

I have an application that rips aac+ audio streams, cutting them at every regular interval (i.e. 10 minutes). Sometimes files are playable OK, but sometimes, Windows Media Player just closes when trying to build DirectShow graph.

I am using Orban aacplus plugin, and it works under directshow. When I play this file with winamp or vlc, that have it's own aacplus decoding engine, it works fine. However, I need it to work under directshow.

Anyway, problematic file is here:

http://www.videophill.com/files/00272-20100418100002.aac

I know that there is frame alignment error and I confirmed my theory by filling first 256 bytes with 0x00, tried to play it again, and it worked.

Is there any info on aacplus frames available on the web, so I can try to find the beginning of the frame manually and cut the rest off?

+1  A: 

Hi, Most likely you are cuting frames somewhere in the middle and that will most probably totaly confuse any decoder. It may be that some decoders will parse through your broken frame in order to find the next frame header, but I wouldn't bet on it, decoders are not that robust.

So, you need to parse a frame, which isn't that easy, you are in fact building a whole new decoder... I would take a look at FAAD, open source decoder, maybe that helps.

Also, best place to ask this kind of questions is www.hydrogenaudio.org/forums/.

Regs, Danijel Domazet

Danijel