30 Commits
Author SHA1 Message Date
Scott GarrettandClaude Code 1040f47542 Add Matroska tagging and track-removal support
- MP42Ebml: EBML vint/ID primitives, flat Segment scanner, block track
  number decoding, and element builders shared by all Matroska writers.
- MP42MkvImporter / MP42FileImporter: tagsOnly mode that mirrors the
  file's own track flags instead of the MP4 conversion heuristics.
- MP42MatroskaTagMapping: read/write SimpleTag maps shared by importer
  and writer, including community names for MP4-only movie fields.
- MP42MkvTagWriter: mkvpropedit-style in-place rewrite of Tags, cover
  art, and per-track name/language/enabled/forced fields with a
  size+mtime staleness guard; an untouched save is a byte-for-byte
  no-op.
- MP42MkvRemuxer: stream-copy rebuild that drops the blocks of removed
  tracks (TrackNumbers keep their gaps; block bytes are never
  rewritten), regenerates SeekHead and Cues, carries metadata edits in
  the same pass, and writes via temp file + atomic rename.
- MP42MkvTagWriter+Internal.h exposes the tag writer's scanning and
  payload builders so the remuxer reuses them unchanged.

Verified with the external matrix harness: 241 assertions green across
layout fixtures (ffmpeg/mkvmerge/streamed), removal scenarios, cue
parity, and idempotency.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-25 19:48:09 -05:00
Damiano Galassi 3b5e78211d Read Matroska LanguageBCP47 field 2025-09-15 14:24:56 +02:00
Damiano Galassi 47aadecfff Improve metadata conversion from MKV 2025-03-13 16:54:57 +01:00
Damiano Galassi 10b9a7dae3 Update Matroska parser. 2022-02-24 10:16:59 +01:00
Damiano Galassi 9eccc5f9ee Remove a wrong readUInt. 2022-01-19 11:14:59 +01:00
Damiano Galassi bfdb8964ac Read Dolby Vision metadata from mkv. 2021-12-07 21:30:25 +01:00
Damiano Galassi b1b5985c2a Revert some unwanted changes. 2021-05-22 18:41:49 +02:00
Damiano Galassi 0cf26cf3df Fix a regression in the matroska parser, do not fixup cue start times. 2021-05-22 10:11:53 +02:00
Damiano Galassi b7a14c22a4 Fix headers import. 2021-02-23 10:59:17 +01:00
Damiano Galassi 8235bfab97 Update matroska parser. 2020-09-21 13:09:46 +02:00
Damiano Galassi 0e421a6eef Enable and fixes more warnings. 2020-09-19 14:39:02 +02:00
Damiano Galassi 9c812b34d7 Update ffmpeg. 2020-01-07 11:40:35 +01:00
Damiano Galassi de38f09878 Update to FFmpeg 4 2018-05-02 15:06:28 +02:00
Damiano Galassi cffec11113 Fix mkv color tag parser. 2018-02-22 13:27:05 +01:00
Damiano Galassi 7a8cae556e Fix headers. 2017-09-29 22:10:09 +02:00
Damiano Galassi ad673993f5 Make Thread Sanitizer happy. 2017-06-20 16:17:17 +02:00
Damiano Galassi bb81a506c1 Read color info, pixel crop, and codec delay from mkv. 2017-05-12 13:14:15 +02:00
Damiano Galassi d32cab09aa throw an exception in CMemoryBitstream::SetBitPosition so we can catch it and not crash. 2016-11-11 18:18:33 +01:00
Damiano Galassi 0741efe36e Added a few useful methods to the bitstream reader. 2016-09-12 17:33:11 +02:00
Damiano Galassi 1125e84048 Return a more common sample rate is nothing is set in the matroska file. 2016-09-11 08:30:38 +02:00
Damiano Galassi 598bb185c9 Add support for up to 64 tracks when reading from mkv. 2016-09-09 12:43:46 +02:00
Damiano Galassi a98e085a9f Fix a possible initialised var usage. 2016-08-31 11:13:34 +02:00
Damiano Galassi 04c20bbc67 Downsample audio to 48000 Khz if the input has a bigger sample rate. 2016-08-29 16:00:28 +02:00
Damiano Galassi 8c1980c81c Use hb_audio_resample_t from HandBrake to simplify a bit of code. 2016-07-27 20:18:27 +02:00
Damiano Galassi 3b941b8c9e Remove 32bit only files (QuickTime) and update headers. 2016-07-25 17:19:22 +02:00
Damiano Galassi 98689e43a9 Fix ac3 channel layout on 10.11 2015-10-16 12:37:36 +02:00
Damiano Galassi 2d00a04689 clean up the importers and remove the MP42File delegate 2015-09-07 11:44:51 +02:00
Damiano Galassi e5095a611a Enabled more warnings, switched the deployment target to 10.7 and minor code cleanup 2015-08-24 17:32:42 +02:00
Damiano Galassi 70095c73a7 Comment out a line in MatroskaParser that made the timecode start at 0 instead of the timecode of the first cluster. 2014-02-15 08:27:17 +01:00
Damiano Galassi 796e9691ce First import. 2013-11-01 10:20:09 +01:00