Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:26:21+00:00 2026-06-03T21:26:21+00:00

It would be useful to be able to dump mkv file to some text

  • 0

It would be useful to be able to dump mkv file to some text (like in mkvinfo -v), edit it and reconstruct back, leaving binary data as hex dumps, for example.

Something like:

$ mkv2xml < test.mkv > test.xml
$ head test.xml
<EBML>
    <EBMLVersion>1</EBMLVersion>
    <MaxIdLen>4</<MaxIdLen>
    <MaxSizeLen>8</MaxSizeLen>
    <DocType>matroska</DocType>
    <DocTypeVersion>2</DocTypeVersion>
    <DocTypeReadVersion>2</DocTypeReadVersion>
    <Segment>
        <Tracks>
        <Track>
            <TrackNumber>1</TrackNumber>
            <CodecID>V_MJPEG</CodecID>
            <Video><PixelWidth>320</PixelWidth><PixelHeight>240</PixelHeight></Video>
        </Track>
        </Tracks>
        <Cluster>
            <Timecode>5.023</TimeCode>
            <SimpleBlock track="1" time="5.045">
                ffd8fffe001a80......
$ xml2mkv < test.xml | mplayer -cache 100 -

This can be useful to simplify writing [debugging] tools work with video without actually messing with muxing/demuxing details, just by looking at output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:26:23+00:00Added an answer on June 3, 2026 at 9:26 pm

    Implemented myself in Python: https://github.com/vi/mkvparse

    Can convert to xml, change something (with xml2/2xml, for example), convert back and play in one pipeline.

    Example XML file: http://vi-server.org/pub/xml2mkv_test.xml

    Trimmed (even more) snippet here:

    <mkv2xml>
    <EBML>
      <EBMLVersion>1</EBMLVersion>
      <DocType>matroska</DocType>
    </EBML>
    <Segment>
    <Info>
      <TimecodeScale>1000000</TimecodeScale>
      <MuxingApp>libebml v1.0.0 + libmatroska v1.0.0</MuxingApp>
      <Duration>46665.0</Duration>
      <DateUTC>1282406803.0</DateUTC>
      <SegmentUID>9d516a0f927a12d286e1502d23d0fdb0</SegmentUID>
    </Info>
    <Tracks>
      <TrackEntry>
        <TrackNumber>1</TrackNumber>
        <TrackType>1</TrackType>
        <CodecID>V_MPEG4/ISO/AVC</CodecID>
        <CodecPrivate>
          014d401fffe10014274d401fa918080093600d418041adb0ad7bdf0101000428
          ce09c8
        </CodecPrivate>
        <Video>
          <PixelWidth>1024</PixelWidth>
          <PixelHeight>576</PixelHeight>
        </Video>
      </TrackEntry>
      <TrackEntry>
        <TrackNumber>2</TrackNumber>
        <TrackType>2</TrackType>
        <CodecID>A_AAC</CodecID>
        <Audio>
          <SamplingFrequency>48000.0</SamplingFrequency>
          <Channels>2</Channels>
        </Audio>
      </TrackEntry>
      <TrackEntry>
        <TrackNumber>3</TrackNumber>
        <CodecID>S_TEXT/UTF8</CodecID>
      </TrackEntry>
      ...
    </Tracks>
    <Cluster>
      <Timecode>0</Timecode>
      <SimpleBlock>
        <track>1</track>
        <timecode>0.0</timecode>
        <keyframe/>
        <data>
          00004e1925b82001ebd34d359f84a010001019b0f94a107609ec4dc0b6341175
          98899cbb3a0a9de562532111ed77f7876006014200856a5fc3c2ccdf6e10a385
          ...
        </data>
      </SimpleBlock>
      <SimpleBlock>
        <track>10</track>
        <timecode>0.009</timecode>
        <keyframe/>
        <data>
          01449ffe0b246a488f09c715768924b01aa2e9b2415aaa29e4696becea270d36
          a0d565bd24d5e6f09f3d4e000a8f192aa6aaa071f2ba14bd2fa14d633ad665ee
          72e92eadce23415fd6bb871941941b1bfd5b0e75ad6826755e61ef5483f93cd3
          82d61c779fa74b4acd62572b399ac3d9039900e94a5c542e4110dd29b65e2000
          220011a10c00000000b0a8540100880380
        </data>
        <data>
          0144d7902c180b04c28161a8482a160a048aa1209848423208cdeed6de7c6b7a
          .....
        </data>
        ...
      </SimpleBlock>
      <BlockGroup>
        <Block>
          <track>4</track>
          <timecode>0.042</timecode>
          <duration>3.375</duration>
          <data encoding="text"><![CDATA[A jobb oldaladon láthatod...
    ...tudod mit...]]></data>
        </Block>
        <BlockDuration>3375</BlockDuration>
      </BlockGroup>
      <BlockGroup>
        <Block>
          <track>5</track>
          <timecode>0.042</timecode>
          <duration>3.375</duration>
          <data encoding="text"><![CDATA[Auf der rechten Seite sieht man...|...rate mal...]]></data>
        </Block>
        <BlockDuration>3375</BlockDuration>
      </BlockGroup>
    </Cluster>
    </Segment>
    </mkv2xml>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find functools.partial to be extremely useful, but I would like to be able
Sometimes it would be useful to name variables like no programmer should name his
I have some useful wpf buttons to test some functionality. It would be good
It would be incredibly useful to be able to temporarily convert a regular element
Given an instance of some class in Python, it would be useful to be
Java provides some useful character classes like \d and \w . Can I define
I believe it would be useful to be able to produce an informal report
I work with several different servers, and it would be useful to be able
It would be very useful to be able to overload the . operator in
I've been thinking that it would be useful to be able to do such

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.