Re: Matroska file decoding - Question on seekhead
Austin Einter <[email protected]> Mon, 4 Sep 2017 08:02:45 +0530
| Newsgroups | gmane.comp.multimedia.matroska.user |
|---|---|
| Message-ID | <CANXt1k8PP=AOwpDCODx6K0CMx6N4H=njcYmLvnb1HJWGV4QF4w@mail.gmail.com> |
--===============8177229198573420219== Content-Type: multipart/alternative; boundary="94eb2c19577c15dca0055853ed4f" --94eb2c19577c15dca0055853ed4f Content-Type: text/plain; charset="UTF-8" Thanks Dave Rice for your kind response. On Sun, Sep 3, 2017 at 9:25 PM, Dave Rice <[email protected]> wrote: > Hi Austin, > > On Sep 3, 2017, at 9:08 AM, Austin Einter <[email protected]> wrote: > > First of all a BIG THANKS to Matroska, for providing a open source media > file container. > > I have a requirement, where I need to parse a matroska file. Initial few > bytes of file is given as below. > > 0x1a 0x45 0xdf 0xa3 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x23 0x42 0x86 0x81 > 0x01 > 0x42 0xf7 0x81 0x01 0x42 0xf2 0x81 0x04 0x42 0xf3 0x81 0x08 0x42 0x82 0x88 > 0x6d > 0x61 0x74 0x72 0x6f 0x73 0x6b 0x61 0x42 0x87 0x81 0x04 0x42 0x85 0x81 0x02 > 0x18 > 0x53 0x80 0x67 0x01 0x00 0x00 0x00 0x00 0x33 0xdb 0x10 *0x11 0x4d 0x9b > 0x74* 0x40 > 0x42 0xbf 0x84 0x11 0xac 0x83 0x8a 0x4d 0xbb 0x8b 0x53 0xab 0x84 0x15 0x49 > 0xa9 > 0x66 0x53 0xac 0x81 0xe5 0x4d 0xbb 0x8c 0x53 0xab 0x84 0x16 0x54 0xae 0x6b > 0x53 > 0xac 0x82 0x01 0x56 0x4d 0xbb 0x8c 0x53 0xab 0x84 0x12 0x54 0xc3 0x67 0x53 > 0xac > 0x82 0x11 0x5c 0x4d 0xbb 0x8d 0x53 0xab 0x84 0x1c 0x53 0xbb 0x6b 0x53 0xac > 0x83 > 0x33 0xd9 0x1c 0xec 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x94 0x00 0x00 0x00 > 0x00 > 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > 0x00 > 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > 0x00 > > I am trying to parse this file. I have parsed first 59 bytes successfully. > Now I am at 60th byte. From 6th byte bytes are 0x11 0x4d 0x9b 0x74, so it > means seekhead is starting. > > I used mkvinfo to view parsed data. As per mkvinfo as shown below, > seekhead starts at 59 which is fine. > > <image.png> > > > Looks the first seek entry starts at 71. Now from 59th to 71st position > what is there. This part I am not able to understand. > > Can somebody please help me to understand this part. > > > As noted the SeekHead element starts at position 59. The first Child > Element of SeekHead is then a CRC-32 element, which is: > > 0xbf 0x84 0x11 0xac 0x83 0x8a > > > Element ID: 0xbf > Element Data Size: 0x84 > Element Value: 0x11 0xac 0x83 0x8a > > After the CRC-32 Element is the first Seek Element. > > More info about the CRC-32 element is in the EBML specification, see > https://tools.ietf.org/html/draft-ietf-cellar-ebml. > Dave Rice > > _______________________________________________ > Matroska-users mailing list > [email protected] > https://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-users > Read Matroska-Users on GMane: http://dir.gmane.org/gmane. > comp.multimedia.matroska.user > > --94eb2c19577c15dca0055853ed4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks Dave Rice for your kind response.</div><div class= =3D"gmail_extra"><br><div class=3D"gmail_quote">On Sun, Sep 3, 2017 at 9:25= PM, Dave Rice <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" ta= rget=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex"><div style=3D"word-wrap:break-word">Hi Austin,<div><br><div><= blockquote type=3D"cite"><span class=3D""><div>On Sep 3, 2017, at 9:08 AM, = Austin Einter <<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a>> wrote:</div><br class=3D"m_728928339938= 5397415Apple-interchange-newline"></span><div><div dir=3D"ltr"><span class= =3D"">First of all a BIG THANKS to Matroska, for providing a open source me= dia file container.=C2=A0<div><br></div><div>I have a requirement, where I = need to parse a matroska file. Initial few bytes of file is given as below.= </div><div><br></div><div><div>0x1a 0x45 0xdf 0xa3 0x01 0x00 0x00 0x00 0x00= 0x00 0x00 0x23 0x42 0x86 0x81 0x01</div><div>0x42 0xf7 0x81 0x01 0x42 0xf2= 0x81 0x04 0x42 0xf3 0x81 0x08 0x42 0x82 0x88 0x6d</div><div>0x61 0x74 0x72= 0x6f 0x73 0x6b 0x61 0x42 0x87 0x81 0x04 0x42 0x85 0x81 0x02 0x18</div><div= >0x53 0x80 0x67 0x01 0x00 0x00 0x00 0x00 0x33 0xdb 0x10 <b>0x11 0x4d 0x9b 0= x74</b> 0x40</div><div>0x42 0xbf 0x84 0x11 0xac 0x83 0x8a 0x4d 0xbb 0x8b 0x= 53 0xab 0x84 0x15 0x49 0xa9</div><div>0x66 0x53 0xac 0x81 0xe5 0x4d 0xbb 0x= 8c 0x53 0xab 0x84 0x16 0x54 0xae 0x6b 0x53</div><div>0xac 0x82 0x01 0x56 0x= 4d 0xbb 0x8c 0x53 0xab 0x84 0x12 0x54 0xc3 0x67 0x53 0xac</div><div>0x82 0x= 11 0x5c 0x4d 0xbb 0x8d 0x53 0xab 0x84 0x1c 0x53 0xbb 0x6b 0x53 0xac 0x83</d= iv><div>0x33 0xd9 0x1c 0xec 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x94 0x00 0x= 00 0x00 0x00</div><div>0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x= 00 0x00 0x00 0x00 0x00 0x00</div><div>0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x= 00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00</div></div><div><br></div><div>I= am trying to parse this file. I have parsed first 59 bytes successfully. N= ow I am at 60th byte. From 6th byte bytes are 0x11 0x4d 0x9b 0x74, so it me= ans=C2=A0seekhead is starting.=C2=A0</div><div><br></div><div>I used mkvinf= o to view parsed data. As per mkvinfo as shown below, seekhead starts at 59= which is fine. =C2=A0</div><div><br></div></span><div>=C2=A0<span id=3D"m_= 7289283399385397415cid:ii_15e47d9c56acaf21"><image.png></span></div><= span class=3D""><div><br></div><div><br></div><div>Looks the first seek ent= ry starts at 71. Now from 59th to 71st position what is there. This part I = am not able to understand.</div><div><br></div><div>Can somebody please hel= p me to understand this part.</div></span></div></div></blockquote></div><d= iv><br></div>As noted the SeekHead element starts at position 59. The first= Child Element of SeekHead is then a CRC-32 element, which is:<br></div><sp= an class=3D""><div><blockquote type=3D"cite"><div dir=3D"ltr"><div><div>0xb= f 0x84 0x11 0xac 0x83 0x8a</div></div></div></blockquote><br></div></span><= div>Element ID: 0xbf</div><div>Element Data Size: 0x84</div><div>Element Va= lue: 0x11 0xac 0x83 0x8a</div><div><br></div><div>After the CRC-32 Element = is the first Seek Element.</div><div><br></div><div>More info about the CRC= -32 element is in the EBML specification, see=C2=A0<a href=3D"https://tools= .ietf.org/html/draft-ietf-cellar-ebml" target=3D"_blank">https://tools.ietf= .org/<wbr>html/draft-ietf-cellar-ebml</a>.</div><span class=3D"HOEnZb"><fon= t color=3D"#888888"><div>Dave Rice</div></font></span></div><br>___________= ___________________<wbr>_________________<br> Matroska-users mailing list<br> <a href=3D"mailto:[email protected]">[email protected]= atroska.<wbr>org</a><br> <a href=3D"https://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-use= rs" rel=3D"noreferrer" target=3D"_blank">https://lists.matroska.org/<wbr>cg= i-bin/mailman/listinfo/<wbr>matroska-users</a><br> Read Matroska-Users on GMane: <a href=3D"http://dir.gmane.org/gmane.comp.mu= ltimedia.matroska.user" rel=3D"noreferrer" target=3D"_blank">http://dir.gma= ne.org/gmane.<wbr>comp.multimedia.matroska.user</a><br> <br></blockquote></div><br></div> --94eb2c19577c15dca0055853ed4f-- --===============8177229198573420219== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Matroska-users mailing list [email protected] https://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-users Read Matroska-Users on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.user --===============8177229198573420219==--