Skip to content

feat(video): real decode path for .avi / .mpeg / .mj2 (split from #157) #242

Description

@alicup29

Split out from #157. The cleanup half of #157 is complete and shipped — sleap-io.js#165 (released in 0.5.7) removes .avi/.mpeg/.mpg from MEDIABUNNY_EXTENSIONS and raises a clean UnsupportedVideoFormatError, and app-side src/lib/resolveVideos.ts gates those extensions out with a toast (no crash) via #156. This issue tracks the remaining feature work only.

Problem

sleap-app / sleap-io.js have no decode path for .avi, .mpeg/.mpg (MPEG program stream), or .mj2. Opening one today surfaces "unsupported format — transcode to MP4 first." This is a genuine PyQt-SLEAP parity gap (PyQt decodes these via its Python video backends).

Options to scope

  • Desktop ffmpeg sidecar (Tauri): bundle an ffmpeg binary and decode natively. Fast, but desktop-only, and adds a binary dependency + per-platform packaging.
  • WASM decode path (ffmpeg.wasm / libav.js): works in the browser too, at software-decode speed. See the Linux-MediaVideo WASM-decode investigation (docs/plans/2026-07-27-linux-mediavideo-wasm-decode-design.md) for the libav.js + MediaBunny registerDecoder pattern this could reuse.
  • Upstream MediaBunny adds AVI / MPEG-PS demux (Add AVI container format support Vanilagy/mediabunny#155 — currently noted as "not a goal").
  • Keep transcode-on-import as the sanctioned workflow and just document it clearly (lowest effort).

Acceptance

  • Decide the approach above.
  • Open (or scrub keypoints on) an .avi and an .mpeg without transcoding — OR document the transcode workflow as the intended path.

Once this is filed, #157 can be closed (its cleanup scope is done).

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions