[Matroska-devel] CRC-32

Steve Lhomme slhomme at matroska.org
Tue Apr 20 17:21:49 CEST 2010


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
> 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
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane:
> http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20100420/b9658267/attachment.html>


More information about the Matroska-devel mailing list