IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
CRC for existing mp3
zz1
post Feb 11 2006, 21:29
Post #1





Group: Members
Posts: 4
Joined: 9-February 06
Member No.: 27647



Hi to all! (my first post here)

Is it possible to add CRC to an existing mp3 file?
(without recompressing/lossing quality)
Go to the top of the page
+Quote Post
Florian
post Feb 11 2006, 21:55
Post #2


Mp3tag developer


Group: FB2K Moderator (Donating)
Posts: 854
Joined: 5-May 03
From: Dresden, Germany
Member No.: 6411



No, this is not possible (because CRC uses 16 bits from MPEG frame if present).


--------------------
Mp3tag - universal multi-format tag editor
http://www.mp3tag.de/en/
Go to the top of the page
+Quote Post
SebastianG
post Feb 13 2006, 09:42
Post #3





Group: Developer
Posts: 1317
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



Correction: This is currently not possible because of the lack of software to do it. But in theory it is -- it requires reformating the whole stream and it's possible that it gets a bit bigger. You may ask the coder of "mp3repacker" (omion) whether he's willing to add this functionality.

Anyhow, I'd like to mention that the CRC checkums only cover a small portion of each frame (header + side info block -- not the main data). By checking these checksums you won't notice errors in the main data.

Sebi
Go to the top of the page
+Quote Post
Sebastian Mares
post Feb 13 2006, 14:55
Post #4





Group: Members
Posts: 3629
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE (SebastianG @ Feb 13 2006, 09:42 AM)
Correction: This is currently not possible because of the lack of software to do it. But in theory it is -- it requires reformating the whole stream and it's possible that it gets a bit bigger. You may ask the coder of "mp3repacker" (omion) whether he's willing to add this functionality.
*


Well, assuming you have 128 kbps frames, you could upgrade them to 160 kbps to make room for the CRC and not alter the audio data, but what do you do with 320 kbps frames?


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
SebastianG
post Feb 13 2006, 15:43
Post #5





Group: Developer
Posts: 1317
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



Yeah, didn't think about that. smile.gif

But according to omion some bits are usually wasted anyways on a 320 kbps stream, so it might be even possible for a 320 kbps stream to add CRC16 checksums for all frames (you may have to increase the number of padded frames which gains 8 bits of extra space per newly padded frame).

I guess this'll fail only in some rare cases.

Sebi
Go to the top of the page
+Quote Post
zz1
post Feb 14 2006, 09:00
Post #6





Group: Members
Posts: 4
Joined: 9-February 06
Member No.: 27647



QUOTE (SebastianG @ Feb 13 2006, 02:42 AM)
Anyhow, I'd like to mention that the CRC checkums only cover a small portion of each frame (header + side info block -- not the main data). By checking these checksums you won't notice errors in the main data.
*

So CRC checkums won't detect if audio data is bad?

What is the best way to test mp3's for errors? I have been using program called MP3Test.
Go to the top of the page
+Quote Post
zz1
post Feb 14 2006, 09:10
Post #7





Group: Members
Posts: 4
Joined: 9-February 06
Member No.: 27647



QUOTE (Sebastian Mares @ Feb 13 2006, 07:55 AM)
Well, assuming you have 128 kbps frames, you could upgrade them to 160 kbps to make room for the CRC and not alter the audio data, but what do you do with 320 kbps frames?
*

Sorry for this n00bish question... If I have two mp3's that foobar reports that they are 192kbps and one have CRC checksum and the other does not than the file with CRC will have worse quality (will really have lower bps for audio data)?
Go to the top of the page
+Quote Post
Omion
post Feb 14 2006, 09:37
Post #8





Group: Developer
Posts: 432
Joined: 22-February 04
From: San Diego, CA
Member No.: 12180



QUOTE (SebastianG @ Feb 13 2006, 01:42 AM)
You may ask the coder of "mp3repacker" (omion) whether he's willing to add this functionality.
*
No. biggrin.gif

@zz1:
It would be possible to do (*), but as others have said, this is of limited functionality, as it only checks ~34 bytes of each frame. There are over 1000 bytes of audio data in a 320kbps frame, so the CRC won't help a whole lot. If you're worried about errors, I'd just make a PAR2 file from all the MP3(s) in the directory. I'm actually in the process of making a PAR2 of a bunch of stuff to be burnt to a DVD (6 hours left... sad.gif it's not fast)

QUOTE
Sorry for this n00bish question... If I have two mp3's that foobar reports that they are 192kbps and one have CRC checksum and the other does not than the file with CRC will have worse quality (will really have lower bps for audio data)?

The maximum possible quality will be higher with the one without CRCs. What quality they actually are depends, of course, on the encoder. BTW, my repacker will strip off the CRCs, in case you want to save a couple of KB on that file.

(*) There are some encoders (FhG?) which don't pad correctly. There are plenty of wasted bits, but my mp3repacker can't reach them. It would probably need a Huffman repacker to get out (which I'm not going to make). A 320kbps file encoded this way won't have enough space for the CRC. Other than that, I've never run into a file which you couldn't add 2 bytes per frame, even the CBR320 ones.

This post has been edited by Omion: Feb 14 2006, 09:42


--------------------
"We demand rigidly defined areas of doubt and uncertainty!" - Vroomfondel, H2G2
Go to the top of the page
+Quote Post
zz1
post Feb 16 2006, 20:57
Post #9





Group: Members
Posts: 4
Joined: 9-February 06
Member No.: 27647



QUOTE (Omion @ Feb 14 2006, 02:37 AM)
QUOTE (SebastianG @ Feb 13 2006, 01:42 AM)
You may ask the coder of "mp3repacker" (omion) whether he's willing to add this functionality.
*
No. biggrin.gif

@zz1:
It would be possible to do (*), but as others have said, this is of limited functionality, as it only checks ~34 bytes of each frame. There are over 1000 bytes of audio data in a 320kbps frame, so the CRC won't help a whole lot. If you're worried about errors, I'd just make a PAR2 file from all the MP3(s) in the directory. I'm actually in the process of making a PAR2 of a bunch of stuff to be burnt to a DVD (6 hours left... sad.gif it's not fast)
*


hehe, I haven't even asked and I already got rejected unsure.gif crying.gif laugh.gif
so crc won't do much..
thank you all for your answers smile.gif
Go to the top of the page
+Quote Post
Sebastian Mares
post Feb 16 2006, 21:28
Post #10





Group: Members
Posts: 3629
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



You could also use "normal" hashes like MD5 or SHA-1 for example. However, recalculate the hash after each tagging process or using a program that ignores tags for calculating the checksums.


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
Jojo
post Feb 17 2006, 07:24
Post #11





Group: Members
Posts: 1361
Joined: 25-November 02
Member No.: 3873



QUOTE (Sebastian Mares @ Feb 16 2006, 01:28 PM)
or using a program that ignores tags for calculating the checksums.
*

such as mp3Tag http://www.mp3tag.de/en/


--------------------
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th July 2014 - 23:00