Skip to content

Conversation

@wiedymi
Copy link

@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 3 times, most recently from 802c2ba to 561cba5 Compare September 30, 2025 15:39
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
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