mkvdump

A command-line tool for debugging Matroska/WebM files in common formats.
```
$ mkvdump --help
mkvdump 0.2.0
Carlos Bentzen cadubentzen@gmail.com
MKV and WebM parser CLI tool
USAGE:
mkvdump [OPTIONS]
ARGS:
Name of the MKV/WebM file to be parsed
OPTIONS:
-f, --format Output format [default: yaml] [possible values: json, yaml]
-h, --help Print help information
-p, --show-element-positions Add element positions in the output
-V, --version Print version information
```
Sample output:
```yaml
mkvdump sample.mkv
- id: EBML
headersize: 5
size: 36
children:
size: 3
size: 4
value: 1
- id: EBMLReadVersion
headersize: 3
size: 4
value: 1
- id: EBMLMaxIDLength
headersize: 3
size: 4
value: 4
- id: EBMLMaxSizeLength
headersize: 3
size: 4
value: 8
- id: DocType
headersize: 3
size: 7
value: webm
- id: DocTypeVersion
headersize: 3
size: 4
value: 2
- id: DocTypeReadVersion
headersize: 3
size: 4
value: 2
id: Segment
headersize: 12
size: Unknown
children:
size: 9
size: 229
value: null
id: Info
headersize: 5
size: 44
children:
id: TimestampScale
headersize: 4
size: 7
value: 1000000
id: MuxingApp
headersize: 3
size: 16
value: Lavf58.29.100
id: WritingApp
headersize: 3
size: 16
value: Lavf58.29.100
id: Tracks
headersize: 5
size: 101
children:
id: TrackEntry
headersize: 9
size: 96
children:
size: 2
size: 3
value: 1
id: TrackUID
headersize: 3
size: 4
value: 1
id: FlagLacing
headersize: 2
size: 3
value: 0
id: Language
headersize: 4
size: 7
value: und
id: CodecID
headersize: 2
size: 7
value: VAV1
id: TrackType
headersize: 2
size: 3
value: video
id: DefaultDuration
headersize: 4
size: 8
value: 41708333
id: Video
headersize: 9
size: 32
children:
id: PixelWidth
headersize: 2
size: 4
value: 1280
id: PixelHeight
headersize: 2
size: 4
value: 720
id: Colour
headersize: 3
size: 15
children:
size: 3
size: 4
value: broadcast range
id: ChromaSitingHorz
headersize: 3
size: 4
value: left collocated
id: ChromaSitingVert
headersize: 3
size: 4
value: half
id: CodecPrivate
headersize: 3
size: 20
value: '[81 05 0c 00 0a 0b 00 00 00 2d 4c ff b3 df ff 98 04]'
id: Tags
headersize: 5
size: 61
children:
id: Tag
headersize: 10
size: 56
children:
size: 10
size: 10
children: []
id: SimpleTag
headersize: 10
size: 36
children:
id: TagName
headersize: 3
size: 10
value: ENCODER
id: TagString
headersize: 3
size: 16
value: Lavf58.29.100
id: Cluster
headersize: 6
size: 2679
children:
id: Timestamp
headersize: 2
size: 3
value: 0
id: SimpleBlock
headersize: 2
size: 45
value:
tracknumber: 1
timestamp: 0
keyframe: true
id: SimpleBlock
headersize: 2
size: 59
value:
tracknumber: 1
timestamp: 42
id: SimpleBlock
headersize: 2
size: 32
value:
tracknumber: 1
timestamp: 83
# ...
```
Getting mkvdump
Cargo
If you have cargo
installed, you can install mkvdump from crates.io with:
bash
$ cargo install mkvdump
Docker
To pull latest mkvdump from Dockerhub:
bash
$ docker pull cadubentzen/mkvdump
Images are available for linux/amd64
and linux/arm64
. Need a new architecture? PRs are welcome!
Running the container
Asssuming a Mastroska file in the host located in /host-path/sample.mkv
. You could run mkvdump on it with the following command, by mounting a volume:
bash
$ docker run -v /host-path:/media cadubentzen/mkvdump /media/sample.mkv
Prebuilt binaries
Download prebuilt binaries for Linux on x86_64
and aarch64
from the release page.
Download it somewhere accessible in your PATH and make it runnable:
bash
$ sudo curl -L https://github.com/cadubentzen/mkvdump/releases/download/v0.2.0/mkvdump-linux-x86_64 -o /usr/local/bin/mkvdump
$ sudo chmod +x /usr/local/bin/mkvdump
License
© 2022 Carlos Bentzen cadubentzen@gmail.com.
This project is licensed under either of
at your option.
The SPDX license identifier for this project is MIT OR Apache-2.0
.