# Format and feature support

FFmpeg capability is determined from the **loaded core**, not from filename
extensions or this document. The app queries muxers, demuxers, decoders,
encoders and filters; a preset is disabled with missing components listed.
Browser playback is a separate capability checked with MIME/media APIs.

## 0.2.1 release fixture matrix

All 15 files are generated and re-probed with native FFmpeg 7.1.3 for test
preparation and pass the checksum/probe verifier. That proves fixture
provenance, not ffmpeg.wasm behavior. A 2026-07-24 Vitest run passed 303 tests
with one conditional native subtitle-filter skip and includes broad execution
of typed plans against native FFmpeg 7.1.3.

Chromium automation also runs a broad operation matrix against the real pinned
ST core. The real MT core is queried and completes an H.264/AAC conversion, but
the complete ST operation matrix has not been duplicated under MT. The
following table distinguishes exact browser evidence from still-pending
coverage; it must not be generalized to Firefox, Safari or mobile.

| Input               | Fixture                            | Expected streams                 | Browser preview expectation                                        | Recorded pinned-core Chromium evidence                         |
| ------------------- | ---------------------------------- | -------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------- |
| MP4 / H.264 + AAC   | `pattern-av.mp4`, compatible clips | H.264 video, AAC audio           | commonly playable after `canPlayType`/media load succeeds          | broad ST operations; real MT conversion; exhaustive MT pending |
| WebM / VP8 + Vorbis | `pattern.webm`                     | VP8 video, Vorbis audio          | commonly playable in Chromium/Firefox; browser-dependent elsewhere | ST probe, remux and VP8/Vorbis re-encode; MT pending           |
| WAV / PCM s16le     | `tone.wav`                         | mono PCM                         | commonly playable                                                  | ST WAV output re-probed; exact input fixture and MT pending    |
| MP3                 | `tone.mp3`                         | mono MP3                         | commonly playable                                                  | ST MP3 outputs re-probed; exact input fixture and MT pending   |
| FLAC                | `tone.flac`                        | mono FLAC                        | browser/version-dependent                                          | ST input and FLAC output re-probed; MT pending                 |
| MP3 + attached PNG  | `attached-cover.mp3`               | MP3 audio, attached-picture PNG  | audio may play; cover rendering is app-owned                       | ST probe/stream selection; MT pending                          |
| MP4 tags            | `metadata.mp4`                     | H.264/AAC                        | same as MP4                                                        | ST import/removal and output metadata round-trip; MT pending   |
| MP4 chapters        | `chapters.mp4`                     | H.264/AAC/data plus two chapters | media may play; browser does not expose all chapter data           | ST generated-output chapter round-trip; fixture import pending |
| malformed MP4       | `truncated.mp4`                    | no usable streams expected       | must not preview                                                   | ST bounded failure, cleanup and recovery; MT pending           |

The runtime query for pinned core 0.12.10 recorded 341 demuxers, 173 muxers,
515 decoders, 204 encoders and 465 filters (1,698 entries total). Runtime
discovery only says that FFmpeg exposes an item; the application must still
build a valid plan, the input must be compatible, resources must fit and the
browser may still be unable to preview the result.

## Output presets

Preset availability always depends on detected runtime requirements:

| Preset family      | Required examples                        | Browser result preview                                   |
| ------------------ | ---------------------------------------- | -------------------------------------------------------- |
| MP4 H.264/AAC      | `mp4`, `libx264`, `aac`                  | usually, but verify actual output                        |
| WebM VP9/Opus      | `webm`, `libvpx-vp9`, `libopus`          | enabled when the loaded core advertises all requirements |
| WebM VP8/Vorbis    | `webm`, `libvpx`, `libvorbis`            | commonly Chromium/Firefox                                |
| Matroska H.264/AAC | `matroska`, `libx264`, `aac`             | generally download-only in browsers                      |
| animated WebP      | `webp`, `libwebp_anim`                   | browser-dependent image preview                          |
| GIF                | `gif`, `gif`, `palettegen`, `paletteuse` | broadly image-previewable                                |
| MP3                | `mp3`, `libmp3lame`                      | commonly playable                                        |
| M4A/AAC            | `ipod`, `aac`                            | commonly playable                                        |
| Ogg Vorbis         | `ogg`, `libvorbis`                       | browser-dependent                                        |
| Opus               | `opus`, `libopus`                        | Chromium ST/MT encode and re-probe recorded              |
| WAV/PCM            | `wav`, `pcm_s16le`                       | commonly playable                                        |
| FLAC               | `flac`, `flac`                           | browser-dependent                                        |

“Lossless” applies only to a lossless audio codec such as PCM/FLAC relative to
its decoded samples. It does not make a lossy source lossless. Stream-copy
remux avoids re-encoding compatible streams but may change container metadata.

## Structural editing

- The Edit workspace exposes fast/accurate trim for the selected timeline range
  and fast/normalized concat for clips in visible timeline order. Availability
  still fails closed against loaded-core capabilities.
- Fast trim uses stream copy where container/stream/timestamp constraints are
  compatible. It can begin at a nearby keyframe and is not promised
  frame-accurate.
- Accurate trim decodes/re-encodes selected streams and can still be limited by
  source timestamps.
- Stream-copy concat requires compatible codec parameters, time bases,
  dimensions, sample layout and selected streams; the UI requires a completed
  compatibility check before enabling it. Otherwise normalized re-encoding is
  required.
- Normalized concat uses an explicit export preset and requires an explicit
  insert-silence, drop-all-audio or reject policy when clips have mismatched
  audio presence.
- Normalized concat can overlap every edit with one uniform 0.04–10 second
  `xfade` and, when audio is retained, `acrossfade`. End clips must contain at
  least one transition duration and internal clips two; the active core must
  expose each required filter.
- Crop, resize, frame-rate conversion, fades, normalization, burn-in and
  contact sheets require specific filters discovered at runtime.
- Even-dimension correction is applied when the selected pixel format/encoder
  requires it and is reported in the plan/result.

## Images and scene selection

Thumbnail/contact-sheet scene mode first performs a bounded full-source
analysis with `select`/`showinfo`, stopping after at most 100 qualifying
frames. Extraction then selects those exact source PTS values; no guessed time
rounding or remote analysis is used. If no frame meets the 0.01–0.95 threshold,
the operation reports that result and asks for a lower threshold or a
deterministic selection mode.

Contact-sheet labels require runtime `drawtext`. The app mounts only its
same-origin DejaVu Sans 2.37 asset after verifying 757,076 bytes and SHA-256
`7da195a74c55bef988d0d48f9508bd5d849425c1770dba5d7bfc6ce9ed848954`.
No remote or host-system font fallback is used. `SOURCE.md` and
`LICENSES/DEJAVU_FONTS.txt` provide provenance and terms.

## Subtitles

The text fixtures cover SRT, WebVTT and ASS import with explicit time shift.
The Chromium ST matrix converts a generated SRT to WebVTT with a time shift,
soft-muxes it into Matroska, burns it into H.264 video and extracts the
soft-muxed stream. The exact standalone WebVTT and ASS fixtures and equivalent
MT paths are not separately browser-smoked. Soft-subtitle muxing depends on
container support (for example converted text in MP4 versus text/ASS in
Matroska). ASS burn-in requires `subtitles`/libass and local font support; no
remote font is fetched. Bitmap subtitle streams are identified but are not
claimed to support arbitrary conversion or OCR. Unsupported container/codec
combinations must remain disabled with reasons.

## Metadata and chapters

Format and stream tags can be inspected. Edits/removal are limited to fields
the selected muxer writes; “remove metadata” is best effort and the output is
re-probed to report remaining structural/encoder/container fields. Stream
language, title and dispositions are separate from format tags.

Chapters use validated integer time bases, monotonic non-overlapping ranges and
escaped titles. Some output containers do not support chapters. Browser media
elements do not reliably expose them, so ffprobe round-trip is authoritative.

## Known unsupported or conditional cases

- remote protocols, live capture, DRM/encrypted media and network playlists;
- hardware-accelerated encoding or desktop-FFmpeg performance;
- files above the 2 GiB WASM input ceiling or stricter product policy;
- arbitrary filters/commands, arbitrary compositing and nonlinear overlap;
- frame-accurate stream-copy trimming;
- complete metadata erasure/anonymity;
- browser preview of every FFmpeg-readable result;
- Opus on browsers, inputs or deployments outside the exact reviewed
  Chromium regression: both ST and MT pass the non-empty encode/re-probe gate,
  but runtime capability discovery and normal per-job limits still apply;
- any capability omitted by the active core's runtime query.

Update this file only from re-probed generated/public-domain fixtures and
record the engine mode, browser and exact core version.
