Skip to content

New plugin: Matroska/WebM playback lister (.mkv/.webm) #14

Description

@NikolaiSachok

Proposal: Matroska/WebM playback lister (WLX) — .mkv / .webm

Problem. DC's bundled MacPreview lister plays .mp4/.mov but shows nothing for .mkv/.webm. It bridges to AVFoundation/QuickLook, and macOS can't demux the Matroska container — even when the streams are codecs macOS decodes natively.

Evidence. A 1080p H.264 + AAC file in both containers, same content:

Container AVURLAsset Tracks Plays
.mp4 readable=1 video+audio
.mkv readable=0 none

So the codecs (H.264/HEVC/AAC/AC-3) are fine — only the container is unsupported. This is the same wall the media-info-wdx columns hit, which is why that plugin ships a hand-written EBML reader. A playback lister could build on that same demuxing foundation.

Design routes (unlike the WDX columns, there is no small clean win here):

  1. Native — demux ourselves, feed macOS decoders. Extend the EBML reader into a full demuxer (Clusters → blocks → timestamps/lacing), push video into AVSampleBufferDisplayLayer + audio into an audio renderer, with A/V sync, play/pause, seeking.

    • ✅ Zero dependencies, native, small binary, matches the collection's identity.
    • ⚠️ Substantial effort (A/V sync + seeking are the hard parts); limited to macOS-supported codecs (H.264/HEVC/AAC/AC-3) — not VP9/AV1/Opus (common in WebM).
  2. Bundle a media engine (libmpv / VLCKit). Host a real player view that demuxes+decodes everything.

    • ✅ Plays any codec/container; little of our own code.
    • ⚠️ Large (~tens of MB) vendored binary + LGPL/GPL attribution and runtime-module packaging; cuts against the repo's lean, dependency-free standard.
  3. Still-preview only (not playback). Decode just the first keyframe (demuxer + VideoToolbox) and show it beside the metadata media-info-wdx already parses, with an "open in default app" action.

    • ✅ Far less work, no dependency.
    • ⚠️ Doesn't play in-pane.

Codec-coverage note. Route 1 covers the vast majority of real-world .mkv (H.264/HEVC + AAC/AC-3). Full .webm (VP9/AV1/Opus) realistically needs Route 2.

Status: parked for deliberate planning — no approach chosen yet. Filed so it isn't lost.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-pluginProposal for a new plugin

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions