View Full Version : Adding CRC to mp2 Audio
EiGuscheMa
11th January 2003, 06:55
I am still searching for a program that simply adds a CRC (error protection) to an MPEG1-Layer2 audio file without re-encoding.
Something like re-stream (that works for video only)
Currently I use Besweet, but the -core switch does not prevent it from de- and re-encoding.
Same with TMPEG.
It works but it is time consuming and not lossless, of course.
I wonder if it is possible at all (just add a CRC), though I think it should be.
ChristianHJW
11th January 2003, 13:40
Could you please give me a very short explanation what exactly you are trying to do ? Would it be ok for you to play the MP2 streams from a different container, not .mp2 ?
EiGuscheMa
11th January 2003, 19:29
Hi,
what I am doing is:
I capture from DVB-C in PVA format and demultiplex it with PVAStrumento.
I get a video-stream (.m2v VBR ) and an audio-stream (.mpa Mpeg1-Layer2 192kBps 48kHz)
Then I import these streams into scenarist to create a DVD.
Unfortunenately some streams do not have the CRC error correction bits set, which are required by the DVD spec, however.
So I have to add CRC to the audio before the stream is accepted by scenarist.
DJ Bobo
11th January 2003, 19:41
you can always reencode to 384kbps with CRC :D
EiGuscheMa
12th January 2003, 07:29
Hi,
re-encode: thatīs what Iīm doing now.
But my question is:
How do you add a CRC WITHOUT re-encoding?
Maxiuca
28th December 2003, 12:42
Hi,
I came accross the same problem and after a long google search I found no anwser so I decided to solve it myself :)
My solution will not exactly do what you wanted to do (so add CRC to non-CRC mp2 file), but only
cheat Scenarist (but it's enough i think)
Anyway, you have to change one bit (yes bit, not byte :)) in your mp2 file. This will be the bit that indicates wheter the
mp2 file has or hasn't CRC protection implemented.
Generally the harderst thing will be to find the first header, but if your movie is properly demultiplexed (ex. using DS.jar,
PVAStrumento should also be fine) the header should be the first four bytes (so first 32 bits) and should beging with "FF
FD" (for mpeg 1 layer 2 audio with no CRC protection), which binary is
1111111111111101
According to http://www.dv.co.yu/mpgscript/mpeghdr.htm
those bits mean:
11111111111 - first 11 bits, called frame sync (but it can be also 12 bits, but I dunno when, can anyone help)
11 - MPEG Version 1 (ISO/IEC 11172-3)
10 - Layer II
and
1 - Not CRC protected
So if you change the last bit (1) to 0 (so the whole two bytes will be now "FF FC"), you'll get a CRC protected mp2 :))
Fortunatelly Scenarist checks only first frame.
I've mastered a DVD with a mp2 audio prepared in that way and it works fine. So it's generally a better idea than reencoding
(which takes some time and as all reencodings causes a loss of quality)
And here a simple guide for not so technical dudes:
Get WinHex (www.winhex.com), register it, open your mp2 file, find the fist "FFFD" value, change it to "FFFC". If your mp2
was properly cut FFFD should appear as the fist value. If not and changing the fist FFFD value didn't help, try with the next
one and then again and again and finally you'll find the real header.
---
Maxiuca
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.