Skip to content

Add AVI container format support#155

Open
wiedymi wants to merge 1 commit intoVanilagy:mainfrom
wiedymi:feature/avi-container
Open

Add AVI container format support#155
wiedymi wants to merge 1 commit intoVanilagy:mainfrom
wiedymi:feature/avi-container

Conversation

@wiedymi
Copy link
Copy Markdown

@wiedymi wiedymi commented Sep 30, 2025

Implements reading and writing of AVI (Audio Video Interleave) files, a RIFF-based container format.

Features:

  • Full AVI demuxer with support for multiple video and audio codecs
  • AVI muxer with RF64 support for large files (>4GB)
  • Codec mapping for common fourCC codes (H.264, HEVC, VP8, VP9, AV1, etc.)
  • Audio codec support (AAC, MP3, Vorbis, FLAC, PCM variants, μ-law, A-law)
  • Index (idx1) generation for seeking
  • Proper timestamp and duration handling

Files added:

  • src/avi/avi-demuxer.ts - AVI file parser
  • src/avi/avi-muxer.ts - AVI file writer
  • src/avi/avi-misc.ts - Codec mappings and utilities
  • src/avi/riff-writer.ts - RIFF chunk writing utility

Integration:

  • Added AviInputFormat and AviOutputFormat classes
  • Exported AVI singleton in ALL_FORMATS
  • Test suite with 7 tests covering format detection, muxing, and demuxing

@wiedymi wiedymi force-pushed the feature/avi-container branch 4 times, most recently from 561cba5 to f8b6e34 Compare September 30, 2025 16:14
Implements reading and writing of AVI (Audio Video Interleave) files, a RIFF-based container format.

Features:
- Full AVI demuxer with support for multiple video and audio codecs
- AVI muxer with RF64 support for large files (>4GB)
- Codec mapping for common fourCC codes (H.264, HEVC, VP8, VP9, AV1, etc.)
- Audio codec support (AAC, MP3, Vorbis, FLAC, PCM variants, μ-law, A-law)
- Index (idx1) generation for seeking
- Proper timestamp and duration handling

Files added:
- src/avi/avi-demuxer.ts - AVI file parser
- src/avi/avi-muxer.ts - AVI file writer
- src/avi/avi-misc.ts - Codec mappings and utilities
- src/avi/riff-writer.ts - RIFF chunk writing utility

Integration:
- Added AviInputFormat and AviOutputFormat classes
- Exported AVI singleton in ALL_FORMATS
- Test suite with 7 tests covering format detection, muxing, and demuxing
@wiedymi wiedymi force-pushed the feature/avi-container branch from f8b6e34 to 9eb113a Compare February 16, 2026 13:12
@wiedymi
Copy link
Copy Markdown
Author

wiedymi commented Feb 16, 2026

@Vanilagy well, i rebased the PR, though I would like to double check on it again, not sure if you plan to do .avi support yourself, in this case we can just close it.

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.

1 participant