Skip to content

Add MKV container support for H.264 and H.265#9

Open
graemeg wants to merge 2 commits into
nowrep:masterfrom
graemeg:issue-4-mkv-support
Open

Add MKV container support for H.264 and H.265#9
graemeg wants to merge 2 commits into
nowrep:masterfrom
graemeg:issue-4-mkv-support

Conversation

@graemeg
Copy link
Copy Markdown

@graemeg graemeg commented May 7, 2026

Fixes #4.

The container list in RegisterCodecs only advertised mp4 and mov, which prevented the host app from offering MKV as an output container for H.264 and H.265 (it was already working for AV1 via the same path).

Adding mkv to the container list is sufficient because the existing non-mp4 branch in DoOpen already passes raw Annex B extradata unchanged — which is the correct format for Matroska, so no additional conversion logic is needed.

Also includes a fix to ffmpeg-vaapi.patch for compatibility with the updated meson-7.1 branch.

graemeg added 2 commits May 7, 2026 13:31
The upstream meson-ports/ffmpeg meson-7.1 branch diverged, breaking
patch application in two ways:

- libavcodec_optional_deps changed from a single line to a multi-line
  block, causing hunk nowrep#2 to fail entirely.
- A bug in the new branch causes a crash when vaapi=enabled and
  xlib=disabled: the precondition loop calls conf.get(precondition)
  without a default, but xlib_x11 is never added to conf when xlib is
  disabled. Fixed by using conf.get(precondition, 0) consistently.
The container list only advertised mp4 and mov, which prevented the
host app from offering mkv as an output container for H.264/H.265.
Adding mkv to the list is sufficient because the existing non-mp4 branch
in DoOpen already passes raw Annex B extradata unchanged, which is the
correct format for Matroska.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request] Add mkv AV1 H265/H264

1 participant