From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:FLV" |
|---|
| claim | "FFmpeg's flv demuxer accepts an FLV when bytes 0-2 are FLV, the version byte (3) is below 5, byte 5 is 0, and the big-endian u32 at offset 5 (data offset) is above 8 with offset + 100 below the probe buffer size; the plain demuxer rejects the file when the string 'NGINX RTMP' sits at data offset + 40 (the separate live_flv demuxer takes those). Only 3 bytes of magic: the other checks matter. FFmpeg's unrelated KUX probe uses 'KDK' 00 00 instead." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:FLV" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "46 4C 56" |
|---|
| offset | 0 |
|---|
| meaning | "FLV signature" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "probe() function" |
|---|
| repo | "https://github.com/FFmpeg/FFmpeg" |
|---|
| commit | "c2bbf2b83d064313ca3739f81c651553cfbb26fb" |
|---|
| path | "libavformat/flvdec.c" |
|---|
| lines | "125-142" |
|---|
|
| type | "source" |
|---|
| detail | "probe(p, live): d[0..2]=='FLV', d[3]<5, d[5]==0, offset=AV_RB32(d+5), offset+100 < buf_size, offset > 8; is_live = memcmp(d+offset+40,'NGINX RTMP',10); flv_probe=probe(p,0), live_flv_probe=probe(p,1); kux_probe checks KDK" |
|---|
| repo | "https://github.com/FFmpeg/FFmpeg" |
|---|
| commit | "c2bbf2b83d064313ca3739f81c651553cfbb26fb" |
|---|
| path | "libavformat/flvdec.c" |
|---|
| lines | "125-166" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T23:51:07.438Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T13:17:57.843Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read libavformat/flvdec.c probe(), flv_probe, live_flv_probe, kux_probe at c2bbf2b: d[0..2]=='FLV', d[3] < 5, d[5]==0, offset > 8, offset+100 < buf_size, NGINX RTMP at offset+40 splits flv from live_flv; KUX is 'KDK' 00 00." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:58:49.270Z" |
|---|
| summary | "Narrow: FFmpeg's flv_probe rejects files with NGINX RTMP at offset+40 (live_flv_probe takes those); also needs offset+100 < probe size; 'FLV' is 3 bytes" |
|---|
| changed | |
|---|
|
|
|---|