[Matroska-devel] CRC-32

Pavel Koshevoy pkoshevoy at sorensonmedia.com
Tue Apr 20 17:27:36 CEST 2010


Hi Steve,

Are you sure #2 and #3 are right?  #2 uses a different EBML ID for the 
CRC-32 element, and it has an EBML ID for the CRC-32 value.  Perhaps you 
meant to say #1 and #3 are correct?  It's confusing because each 
description is worded differently, and ambiguously.  Thanks for the 
mkvmerge suggestion, I'll try it once I get a chance (and all required 
libs to build mkvmerge).

Thank you,
	Pavel.


On 4/20/2010 9:21 AM, Steve Lhomme wrote:
> Hello Pavel,
>
> The correct way is #2 and #3. I thought mkvmerge could produce files
> with CRC but I don't see a switch for that, nor code that is using it.
> libebml can use it. You could compile your own and
> change bChecksumUsedByDefault from false to true and use mkvmerge on
> top. It will produce CRC for all Master elements in the file (so that
> would be a lot).
>
> Steve Lhomme
>
> On Tue, Apr 20, 2010 at 4:46 PM, Pavel Koshevoy
> <pkoshevoy at sorensonmedia.com <mailto:pkoshevoy at sorensonmedia.com>> wrote:
>
>     Hi,
>
>     I am working on an EBML/Matroska SDK, and I am at the
>     stage where I need to add CRC-32 element support, both
>     for reading and writing.
>
>     I am quiet confused on the spec for CRC-32 use in
>     Matroska/EBML.  Quoting from various specs on the subject:
>
>     1. http://ebml.sourceforge.net/specs/
>        CRC-32       1+      [BF]
>
>        The CRC is computed on all the data from the last
>        CRC element (or start of the upper level element),
>        up to the CRC element, including other previous
>        CRC elements. All level 1 elements should
>        include a CRC-32.
>
>     2. http://www.matroska.org/technical/specs/rfc/index.html
>
>         The CRC32 container can be placed around any
>         EBML element or elements. The value stored in
>         CRC32Value is the result of the CRC-32 [CRC32]
>         checksum performed on the other child elements.
>
>           CRC32 := c3 container [ level:1..; card:*; ] {
>             %children;
>             CRC32Value := 42fe binary [ size:4; ]
>           }
>
>     3. http://www.matroska.org/technical/specs/index.html
>
>          CRC-32     1+      [BF]
>
>          The CRC is computed on all the data of the
>          Master element it's in, regardless of its position.
>          It's recommended to put the CRC value at the
>          beggining of the Master element for easier reading.
>          All level 1 elements should include a CRC-32.
>
>
>     Which of these specifications is the correct one?
>     Is there a small sample matroska file with CRC-32
>     elements (preferably at segment, cluster, and
>     SimpleBlock/BlockGroup levels) that I could take
>     a look at?  Is there a tool that produces
>     matroska files with nested CRC-32 elements?
>
>     Thank you,
>             Pavel.
>     _______________________________________________
>     Matroska-devel mailing list
>     Matroska-devel at lists.matroska.org
>     <mailto:Matroska-devel at lists.matroska.org>
>     http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
>     Read Matroska-Devel on GMane:
>     http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
>
>
>
>
> _______________________________________________
> Matroska-devel mailing list
> Matroska-devel at lists.matroska.org
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel




More information about the Matroska-devel mailing list