Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 13 additions & 66 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,19 @@ its series' file in [changelog/](changelog/) when a newer one ships.

## [Unreleased]

## [0.71.0] - 2026-11-20
## [0.71.1] - 2026-11-20

### Fixed

- Stray bytes ahead of the first Cluster that happen to decode as an element
header (the tail of an old tag an in-place edit before 0.56.0 could leave)
no longer make `analyze`, `ingest -analyze` and `validate` report a complete
file as cut short, or lose its first Clusters without a word: the block walk
resynchronizes past them as the head reads do.
- A Void or CRC-32 ahead of the first Cluster declaring a few bytes too many
no longer swallows the head of the element behind it: the readers
resynchronize on that element instead of losing it without a word.
- `reindex --resync` and `salvage` keep the Info and Tracks that sit behind
such bytes (the output had no track, exit 0), and `keyframes -walk` no longer
loses the keyframes of the Clusters a stray size led it past.
- A few stray bytes between the last Cluster and the Cues or Tags closing a
finished file (up to 64) end the block walk as the end of the media: such a
file is no longer reported as cut short by `analyze`, nor refused by
`demux`, `split`, `remove-track` and `fingerprint`. A longer run is still
refused: it may hide a Cluster.
- `diagnose` no longer answers healthy when stray bytes sit between the head
elements it reads and the first Cluster: it walks the head to the first
Cluster.
- The strict `reindex`, `reindex-inplace` and `retime` refuse bytes that read
as an element running past the end with the offset and the command that
works (`mkvgo reindex --resync`), not `copy unknown 0x8C body: EOF` nor a
"truncated file" pointing back at the command that refused.
- Bytes that read as a Cluster header too small to hold a block (8 bytes at
most, opening with no element of a Cluster) are passed over as the stray
bytes they are instead of refused as a damaged region, and `diagnose` counts
them.
- `analyze` warns when the file it measured was read past undecodable bytes.
- What a strict block walk now reads past without an error, where it failed
or lost media before: bytes ahead of the first Cluster that decode as an
element whose size leads nowhere or that declare no size, the excess of a
Void or CRC-32 that declares too much, 8 bytes at most read as a Cluster,
64 at most before the closing elements. `Container.ResyncedBytes`,
`validate`, `diagnose` and `analyze` say so for the head; a tolerant walk
counts them all (`SkippedBytes`). `ReadStream` cannot look past an element
and keeps skipping a header that decodes by its size.
- Bitmap subtitles: a block whose display sets together composite more than
two subtitle planes is passed over as damaged (each composition had its own
picture, 64 MiB for 30 bytes of block); a PGS object's buffer grows with
its data instead of taking the 4 MiB its first segment may declare; a nil
`SubtitleIndex` refuses `MarshalBinary` instead of panicking.
- Bitmap subtitles, again: a PGS block hands back two planes of pictures at
most, not four (256 MiB for 115 bytes of block); a VobSub control sequence
with no end command stops where the next one starts instead of running its
header as commands (a picture forced on, at the wrong time); `extract-subtitle
-format png` encodes a picture shown again once, each cue keeping its file.
- `to-mp4`, `to-webm`, `to-hls`, `demux`, `split` and `remove-track` warn when
the Matroska source was read past undecodable bytes between its elements,
and exit 3 under `--exit-damaged`: they said nothing.

### Changed

- A VobSub header with no `palette:` line (an old `.idx`, whose palette is in
the `.ifo` beside it, or a track muxed from one) is read instead of refused:
each picture is drawn in greys from black to white in the order of the pixel
values it shows. A header with no `size:` line is still refused, and the
refusal no longer speaks of a CodecPrivate for a `.idx` file.

### Added

- `Diagnosis.ResyncedBytes` (`resynced_bytes` in JSON): the bytes the head
read passed over ahead of the first Cluster, so a caller needs no second
read to count them. `WithWholeHead` (`reader` and `matroska`) gives the
same count to a head read of its own. A Void declaring too much counts for
its excess.
- Under `WithInBandColourFallback` (`-in-band`, `mp4.Options.InBandColour`),
three video tracks whose header names no colour now get it from their first
sample, where they kept none or the wrong "determined": a VP9 track whose
CodecPrivate holds the Matroska feature records, or whose Colour element
states the range alone (the keyframe header was read only when the profile
was missing); an AV1 track whose `av1C` holds no sequence header (a PQ
video read as having no colour); an HEVC track whose `hvcC` holds arrays
but no SPS. A VP9 Matroska file with no colour anywhere costs one more
bounded read under the option.
- A VP9 keyframe header that says its colour is unknown sets
`ColourDetermined`, as an H.264, HEVC or AV1 stream stating "unspecified"
does: the colour was read, there is none to find elsewhere.
70 changes: 70 additions & 0 deletions changelog/0.70-0.79.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,76 @@

Archived entries of mkvgo 0.70.x to 0.79.x, as they were published; a version moves here once a newer one ships. The current versions are in [CHANGELOG.md](../CHANGELOG.md).

## [0.71.0] - 2026-11-20

### Fixed

- Stray bytes ahead of the first Cluster that happen to decode as an element
header (the tail of an old tag an in-place edit before 0.56.0 could leave)
no longer make `analyze`, `ingest -analyze` and `validate` report a complete
file as cut short, or lose its first Clusters without a word: the block walk
resynchronizes past them as the head reads do.
- A Void or CRC-32 ahead of the first Cluster declaring a few bytes too many
no longer swallows the head of the element behind it: the readers
resynchronize on that element instead of losing it without a word.
- `reindex --resync` and `salvage` keep the Info and Tracks that sit behind
such bytes (the output had no track, exit 0), and `keyframes -walk` no longer
loses the keyframes of the Clusters a stray size led it past.
- A few stray bytes between the last Cluster and the Cues or Tags closing a
finished file (up to 64) end the block walk as the end of the media: such a
file is no longer reported as cut short by `analyze`, nor refused by
`demux`, `split`, `remove-track` and `fingerprint`. A longer run is still
refused: it may hide a Cluster.
- `diagnose` no longer answers healthy when stray bytes sit between the head
elements it reads and the first Cluster: it walks the head to the first
Cluster.
- The strict `reindex`, `reindex-inplace` and `retime` refuse bytes that read
as an element running past the end with the offset and the command that
works (`mkvgo reindex --resync`), not `copy unknown 0x8C body: EOF` nor a
"truncated file" pointing back at the command that refused.
- Bytes that read as a Cluster header too small to hold a block (8 bytes at
most, opening with no element of a Cluster) are passed over as the stray
bytes they are instead of refused as a damaged region, and `diagnose` counts
them.
- `analyze` warns when the file it measured was read past undecodable bytes.
- What a strict block walk now reads past without an error, where it failed
or lost media before: bytes ahead of the first Cluster that decode as an
element whose size leads nowhere or that declare no size, the excess of a
Void or CRC-32 that declares too much, 8 bytes at most read as a Cluster,
64 at most before the closing elements. `Container.ResyncedBytes`,
`validate`, `diagnose` and `analyze` say so for the head; a tolerant walk
counts them all (`SkippedBytes`). `ReadStream` cannot look past an element
and keeps skipping a header that decodes by its size.
- Bitmap subtitles: a block whose display sets together composite more than
two subtitle planes is passed over as damaged (each composition had its own
picture, 64 MiB for 30 bytes of block); a PGS object's buffer grows with
its data instead of taking the 4 MiB its first segment may declare; a nil
`SubtitleIndex` refuses `MarshalBinary` instead of panicking.
- Bitmap subtitles, again: a PGS block hands back two planes of pictures at
most, not four (256 MiB for 115 bytes of block); a VobSub control sequence
with no end command stops where the next one starts instead of running its
header as commands (a picture forced on, at the wrong time); `extract-subtitle
-format png` encodes a picture shown again once, each cue keeping its file.
- `to-mp4`, `to-webm`, `to-hls`, `demux`, `split` and `remove-track` warn when
the Matroska source was read past undecodable bytes between its elements,
and exit 3 under `--exit-damaged`: they said nothing.

### Changed

- A VobSub header with no `palette:` line (an old `.idx`, whose palette is in
the `.ifo` beside it, or a track muxed from one) is read instead of refused:
each picture is drawn in greys from black to white in the order of the pixel
values it shows. A header with no `size:` line is still refused, and the
refusal no longer speaks of a CodecPrivate for a `.idx` file.

### Added

- `Diagnosis.ResyncedBytes` (`resynced_bytes` in JSON): the bytes the head
read passed over ahead of the first Cluster, so a caller needs no second
read to count them. `WithWholeHead` (`reader` and `matroska`) gives the
same count to a head read of its own. A Void declaring too much counts for
its excess.

## [0.70.0] - 2026-11-19

### Changed
Expand Down
5 changes: 3 additions & 2 deletions cmd/mkvgo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ Global flags:
retime, salvage...; ignored by commands without a report); an
error goes to stderr as {"error":"...","exit":N}
-in-band Complete a video track's description from its first sample
when the header leaves it short: colour behind a bare hvcC,
VP9 profile with no vpcC, HDR10 static metadata kept in-band
when the header leaves it short: colour behind a bare hvcC
or av1C, VP9 profile or colour the header does not state,
HDR10 static metadata kept in-band
(info, tracks, probe; one bounded read; ignored elsewhere)
-fps-reads Let the frame-rate estimate of a Matroska track without
DefaultDuration read the block headers it needs in the first
Expand Down
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkvgo <command> [options]

Global flags:
- `-json`, `--json` -- the command's report as JSON on stdout (info, tracks, chapters, attachments, tags, probe, keyframes, validate, compare, analyze, fingerprint, verify, playability, ladder, ingest, track-ends, cue-health, diagnose, salvage, reindex, reindex-inplace, retime; ignored by commands without a report). An empty list is `[]`, an empty map `{}`, never `null`; an optional section is left out. An error goes to stderr as `{"error":"...","exit":N}`.
- `-in-band` -- the inspection commands (`info`, `tracks`, `probe`) complete a video track's description from its first sample where the header leaves it short: colour behind a bare `hvcC`, a VP9 profile with no `vpcC`, HDR10 static metadata (MaxCLL/MaxFALL, mastering display) kept only in the HEVC SEI / AV1 metadata OBUs. It also reads the channel count each AC-3, E-AC-3 and AAC stream states (`stream_channels` in JSON, `channels_mismatch` when the container's `channels` says otherwise; Matroska). One bounded read, only for such a track; the container wins per field. The library's `WithInBandColourFallback` / `mp4.Options.InBandColour`. Ignored on stdin (`-`) and by the writing commands, which always apply it
- `-in-band` -- the inspection commands (`info`, `tracks`, `probe`) complete a video track's description from its first sample where the header leaves it short: colour behind an `hvcC` with no SPS or an `av1C` with no sequence header, a VP9 profile or colour the header does not state, HDR10 static metadata (MaxCLL/MaxFALL, mastering display) kept only in the HEVC SEI / AV1 metadata OBUs. It also reads the channel count each AC-3, E-AC-3 and AAC stream states (`stream_channels` in JSON, `channels_mismatch` when the container's `channels` says otherwise; Matroska). One bounded read, only for such a track; the container wins per field. The library's `WithInBandColourFallback` / `mp4.Options.InBandColour`. Ignored on stdin (`-`) and by the writing commands, which always apply it
- `-fps-reads` -- the inspection commands (`info`, `tracks`, `probe`) let the frame-rate estimate of a Matroska track without DefaultDuration read the block headers it needs in the first 512 KiB, one exact 32-byte read each; off by default, when the estimate uses only the bytes the head read already holds and the statistics tags. The library's `WithFrameRateReads`. On 63 real files without DefaultDuration (local ext4 disk, page cache dropped per file): 12 estimated by default, 63 with the flag, about 126 more reads per file and a median probe of 7.8 ms instead of 5.0 ms (no difference once cached)
- `-f`, `--force` -- overwrite an existing output file. Without it, every command that writes a new file refuses to clobber an existing one (`out.mkv already exists`); with it, an output that is one of the command's inputs is still refused. `edit-inplace` modifies its input file by design, and `split` overwrites existing parts (but never its source).
- `--sync` -- a command writing a new Matroska file flushes it to disk before renaming it into place, so a completed output survives a power loss; without it the output is still written to `<output>.mkvgo.tmp` and renamed, so a failure keeps the file already there, but a power loss soon after the command ends can leave an empty file under the output's name, the file it replaced gone (the rename can reach the disk before the data). The replace commands always flush.
Expand Down
Loading
Loading