From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:AVI" |
|---|
| claim | "An AVI file is RIFF with form type 'AVI ' at offset 8, then LIST hdrl (avih, LIST strl per stream), LIST movi with chunks named by stream number plus type (00dc, 00db, 01wb) and idx1 with 16-byte entries (tag, flags, offset, length); OpenDML adds RIFF AVIX segments. FFmpeg's avi_probe looks at nothing else than bytes 0-3 and 8-11 and gives the maximum score for these pairs: RIFF + 'AVI ', RIFF + 'AVIX', RIFF + 'AVI' 0x19, RIFF + 'AMV ' (AMV video), and 'ON2 ' at offset 0 with 'ON2f' at offset 8 (On2 AVI); the size field and the hdrl list are not checked, so the 'AVI ' form type is the common case, not the only one it takes." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:AVI" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "magic bytes" |
|---|
| indicator | "52 49 46 46 ?? ?? ?? ?? 41 56 49 20; FFmpeg probe also accepts form types 'AVIX', 'AVI\x19' and 'AMV ' after RIFF, and 'ON2 ' at offset 0 with 'ON2f' at offset 8" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "avi_headers table (108-117) and avi_probe (2025-2036) compare bytes 0-3 and 8-11 only; avi_read_idx1 (1625-1665) reads size/16 entries of tag, flags, pos, len; read_odml_index at 175 handles the OpenDML super index; the string AVIX occurs in avidec.c only in the probe table" |
|---|
| repo | "https://github.com/FFmpeg/FFmpeg" |
|---|
| commit | "7045cc9b8020ebaae156f4947baa752625056f90" |
|---|
| path | "libavformat/avidec.c" |
|---|
| lines | "108-117, 175, 1625-1665, 2025-2036" |
|---|
|
| type | "source" |
|---|
| detail | "#define AVI_MAX_RIFF_SIZE 0x40000000LL" |
|---|
| repo | "https://github.com/FFmpeg/FFmpeg" |
|---|
| commit | "7045cc9b8020ebaae156f4947baa752625056f90" |
|---|
| path | "libavformat/avi.h" |
|---|
| lines | "31" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "AVI layout" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:32:38.819Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:39:09.906Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched avidec.c at 7045cc9 and read avi_headers (108-117), avi_probe (2025-2036; compares AV_RL32 at 0 and 8 only, returns AVPROBE_SCORE_MAX), avi_read_idx1 (size/16 entries of tag, flags, pos, len) and grep for AVIX/AMV/ON2 (only in the table). Matches the claim." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:16:30.978Z" |
|---|
| summary | "FFmpeg's avi_probe (avidec.c 110-117, 2025-2036) accepts RIFF+'AVI ', RIFF+'AVIX', RIFF+'AVI' 0x19, RIFF+'AMV ' and 'ON2 ON2f', not only 'AVI '; idx1 entries of 16 bytes confirmed (avi_read_idx1…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:27:27.306Z" |
|---|
| summary | "Re-read avi_headers and avi_probe (avidec.c 108-117, 2025-2036): the probe compares bytes 0-3 and 8-11 only; the ON2 entry is 'ON2 ' at offset 0 and 'ON2f' at offset 8 (not a contiguous 'ON2 ON2f')…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T10:07:51.819Z" |
|---|
| summary | "Evidence corrected: avidec.c has no AVIX-specific demuxing (AVIX appears only in the avi_headers probe table, lines 108-117); AVI_MAX_RIFF_SIZE is in avi.h line 31, not avidec.c. Probe and 16-byte…" |
|---|
| changed | |
|---|
|
|
|---|