A CLI tool for auditing Matroska .mkv files. lsmkv reports each file's average bitrate, size, duration, and codec.
Metadata is read directly from the .mkv container without decoding, so it stays fast across large libraries.
- Recursively scans directories for
.mkvfiles - Reports average bitrate, size, duration, and codec for each
- Accepts directories and individual files as command line arguments
git clone https://github.com/mininit/lsmkv.git
cd lsmkv
cargo build --releaseThe binary will be at target/release/lsmkv.
brew install mininit/tap/lsmkvlsmkv [OPTIONS] [PATHS]...
If no path is given, lsmkv recursively scans the current directory.
| Argument | Description |
|---|---|
PATHS |
Files or directories to scan. Defaults to . if omitted |
| Flag | Description |
|---|---|
-h, --help |
Print help |
-V, --version |
Print version |
| Column | Description |
|---|---|
| Bitrate | Average bitrate in Mbps |
| Size | File size (binary units, e.g. 25.7M) |
| Duration | Runtime in minutes |
| Codec | Video codec (e.g. AV1, H.265) |
Recursively scan the current directory:
lsmkvRecursively scan a media library:
lsmkv ~/VideosCheck specific files:
lsmkv video_1.mkv video_2.mkvMixed files and directories:
lsmkv video_1.mkv ~/Videos$ lsmkv .
18.4Mbps 25.7M 11.7min AV1 ./video_3.mkv
5.7Mbps 11.0M 16.1min H.265 ./video_1.mkv
3.4Mbps 7.8M 19.1min H.264 ./video_2.mkvlsmkv streams output instantly and does not sort. Pipe through sort instead:
lsmkv ~/Videos | sort -k1,1 -rn # highest bitrate firstlsmkv ~/Videos | grep 'H\.264' # show only H.264 encoded filesgrep matches anywhere in the line, so it's fine for quick checks. For exact column matching, use awk:
lsmkv ~/Videos | awk '$4 == "AV1"' # show only AV1 encoded files