PDA

View Full Version : 22 bytes of garbage in ripped header



neff
08-09-2005, 02:30 PM
I use dMC to rip my CDs to MP3s and I was playing the results on my iriver DAP using the RockBox firmware www.rockbox.org (http://www.rockbox.org) when I encountered a track that played too slow. Someone on the Rockbox developer channel had a look at the file for me and this is what they said...


There are 22 bytes of garbage right after the ID3V2 tag before the MP3 stream starts, in which the Rockbox metadata parser finds a valid MP3 frame header. The ID3 tag ends at 0x38ca, where the garbage starts, beginning with the data 80e3:

000038c0: 0000 0000 0000 0000 0000 80e3 4cdd d66e ............L..n
000038d0: 2e34 8d01 bc63 364f 9a14 ffff ffff ffff .4...c6O........
000038e0: ffca e277 2d9a 0b9c 83b9 3847 9071 9820 ...w-.....8G.q.

The real MP3 frame starts at 0x38e0, but rockbox finds an MP1 header at 0x38df: 0xffffcae2. This header says that the sample rate is 32000Hz, and Rockbox sets the resampling rate accordingly. The MAD decoder will of course detect the error and synchronize on the correct stream, but the resampler is not updated.

Now I know nothing about the format of MP3 files but does this imply a bug in dMC? Should those bytes be zeroed?

Incidentally - I have re-ripped the CD and the track plays fine this time so if it is a problem it's an intermittent problem, maybe only when the garbage contains something that can be interpreted?

Spoon
08-09-2005, 02:45 PM
If it rips then the results should be indentical each time, there should be nothing extra added into the header (although there are lame header tags and an xing vbr header).