Skip to content

Media: broad AVI import support across legacy codecs and DV variants #1701

Open

Description

@tylerjenningsw

EffectCraft can't import .avi files yet. AVI is a container, so accepting the extension doesn't mean decoding every codec it can hold. This issue tracks broad AVI support as a set of focused PRs, with a published compatibility matrix.

What exists

  • FilmCraft, EffectCraft's media backend, already has an AVI reader (filmcraft#650). It covers AVI 1.0 and OpenDML, with decoding for MJPEG, several raw formats, H.264/HEVC and common audio.
  • EffectCraft pins a FilmCraft revision from before that reader. Its central video-extension list (crates/media) also leaves out avi, though the Media Browser's own list has it.
  • DV: filmcraft#2092 (open) covers NTSC DV25 in MOV. It doesn't yet cover PAL DV, DV in AVI or embedded DV audio. That shared decoder should be extended rather than a second one written.

Support target

Area Target
Container AVI 1.0 and OpenDML; large files (offsets beyond 4 GB); indexed and unindexed recordings; bounded handling of truncated files
Existing codecs FilmCraft's MJPEG, raw video, H.264/HEVC and supported audio, exposed and validated
DV cameras PAL and NTSC DV25; DV/DVCAM/DVCPRO25 where applicable; Type-1 (iavs) and Type-2 AVI; embedded or separate audio (Microsoft's DV AVI specification)
Older compressed video MPEG-4 Part 2 Simple / Advanced Simple Profile (applicable DivX / Xvid files), from the public specification; older Microsoft-derived variants identified separately, not fed to it
Older audio Existing PCM / MPEG audio / AC-3, then MS ADPCM, IMA ADPCM and G.711
Picture interpretation Frame rate, pixel and display aspect ratio, field order, stream start offsets (with an interpretation override where the file says nothing)
Later, each scoped on its own Palette / RLE video, Cinepak, Microsoft Video 1, lossless codecs, DV50 / DVCPRO HD

Plan

  • Media: update the FilmCraft backend for AVI import. The dependency update on its own, with the existing MP4, MOV, MKV, WebM, MXF and audio imports checked.
  • Media: enable AVI import across supported entry points. The file dialogs, drag and drop, Media Browser, CLI / control channel and web import, all from one extension list. Import tells apart an invalid AVI, a valid AVI with an unsupported codec, and damaged packets; it never reports an audio-only or blank result as a full success.
  • AVI: preserve stream timing and picture metadata. Rational timestamps, stream offsets, dropped-frame slots, seeking, several audio streams, interlacing and non-square pixels. The AVI adapter currently reports square pixels.
  • DV: extend shared decoding to PAL and NTSC camera formats, in FilmCraft (with filmcraft#2092), independent of MOV or AVI. It covers chroma layouts, interlacing, aspect ratios and embedded audio with correct per-frame sample counts. Then the two AVI layouts: Type-2 (DV video plus the separate audio track, embedded audio not duplicated) and Type-1 (iavs / DVINFO).
  • AVI: MPEG-4 Part 2 video, in FilmCraft, covering the supported profiles, presentation order, seeking and packed B-frames.
  • Legacy audio and archival codecs, one at a time, through the existing codec registry.

How broad support is shown

A test corpus spanning combinations, not filenames:

  • AVI 1.0, OpenDML / AVIX, missing indexes, offsets beyond 4 GB;
  • PAL / NTSC DV, both AVI layouts, interlacing, 4:3 / 16:9, embedded and separate audio;
  • MJPEG with and without Huffman tables, and the raw pixel formats;
  • sequential playback against random seeking, with matching frames and audio sync;
  • truncated chunks, hostile dimensions, counts and offsets, and unsupported codecs, giving errors or documented recovery: never a crash or an excessive allocation;
  • Windows, macOS and Linux, and the web build within its resource limits.

Fixtures are generated or openly licensed, in a pinned, hash-verified corpus. FFmpeg may generate fixtures and serve as an external reference, never as a bundled decoder or runtime requirement.

Activity

  1. ticket-craft commented on Oct 17, 2026

    @ticket-craft

    Possibly related: storytold/filmcraft#598, #767 and #745.

    This looks like a problem shared by several apps: FilmCraft.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions