From a417d079789079c36b77817b8268eb38fd65f305 Mon Sep 17 00:00:00 2001 From: 4DBug Date: Sat, 31 Oct 2026 15:33:36 -0500 Subject: [PATCH] ws-video2-flv: flv extensions (f4v is ISO BMFF, not FLV), H263 Decoder comments --- docs/FORMATS.md | 2 +- src/Formats/Registry.luau | 2 +- src/Formats/codecs/video/H263/Decoder.luau | 8 ++++---- src/Formats/video/flv/init.luau | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/FORMATS.md b/docs/FORMATS.md index f49d610..9c8b539 100644 --- a/docs/FORMATS.md +++ b/docs/FORMATS.md @@ -28,7 +28,7 @@ is tested under both runtimes (luau `--codegen -O2` and LuaJIT through the build | audio | vorbis | .ogg .oga | yes | yes | streaming: true, seek: true, lossy: true, channels: 255 | `tests/audio/vorbis.luau` | | audio | wav | .wav .wave .rf64 .bw64 | yes | yes | streaming: true, depths: 8, 16, 24, 32, float: true, rf64: true | `tests/audio/wav.luau` | | video | avi | .avi | yes | yes | streaming: true, video: "mjpeg", "mpeg1", "rawvideo", audio: true, odml: true | `tests/video/avi.luau` | -| video | flv | .flv .f4v | yes | yes | streaming: true, remux: true, video: "flv1", "h264", audio: true, metadata: true | `tests/video/flv.luau` | +| video | flv | .flv | yes | yes | streaming: true, remux: true, video: "flv1", "h264", audio: true, metadata: true | `tests/video/flv.luau` | | video | h264 | .h264 .264 .avc .jsv .26l .jvt | yes | yes | streaming: true, video: "h264", depths: 8 | `tests/video/h264.luau` | | video | mkv | .mkv .webm .mka .mk3d | yes | yes | streaming: true, remux: true, video: "vp8", "mjpeg", "mpeg1", "rawvideo", audio: true, subtitles: true | `tests/video/mkv.luau` | | video | mp4 | .mp4 .m4v .mov .qt .3gp .3g2 .mj2 | yes | yes | streaming: true, remux: true, video: "mjpeg", "mpeg1", "h264", audio: true, fragments: true | `tests/video/mp4.luau` | diff --git a/src/Formats/Registry.luau b/src/Formats/Registry.luau index 1bef122..4531698 100644 --- a/src/Formats/Registry.luau +++ b/src/Formats/Registry.luau @@ -294,7 +294,7 @@ local list: { Entry } = { name = "flv", category = "video", path = "video/flv", - extensions = { "flv", "f4v" }, + extensions = { "flv" }, mime = { "video/x-flv", "video/flv" }, deps = { "core/Err", "core/Bytes", "Types", "containers/Demux", "codecs/video/Video", "codecs/video/Video/Source", "codecs/video/H263", "codecs/video/H264", "codecs/audio/Aac" }, caps = { decode = true, encode = true, streaming = true, remux = true, video = { "flv1", "h264" }, audio = true, metadata = true }, diff --git a/src/Formats/codecs/video/H263/Decoder.luau b/src/Formats/codecs/video/H263/Decoder.luau index 1fcbcf9..84c8ca8 100644 --- a/src/Formats/codecs/video/H263/Decoder.luau +++ b/src/Formats/codecs/video/H263/Decoder.luau @@ -22,7 +22,7 @@ -- (tests/codecs/h263.luau). Corrupt data ends the picture: the rest is copied from the reference (state.errors). -- -- local core = D.new(flv, maxPixels) --- local hdr, msg = D.header(buf, off, len, flv, core.opp) -- the picture header (no decoding) +-- local hdr, msg = D.header(buf, off, len, flv, core.state.opp) -- the picture header (no decoding) -- local store, msg = core.decode(buf, off, len) -- one picture -> the Store decoded into (decoder-owned) -- core.reset() -- forget the reference (after a seek) local Tb = require("@formats/codecs/video/H263/Tables") @@ -636,9 +636,9 @@ function D.new(flv: boolean, maxPixels: number?): Core end end - -- macroblock (col, row) of a picture (P: an inter picture; top: in the first row of the picture or of a GOB / - -- slice with a header, whose vector predictions do not look up; first: the first macroblock of a slice, whose - -- left neighbour is outside). false on bad data. + -- macroblock (col, row) of a picture (P: an inter picture; top: within the first macroblock columns' worth of + -- the picture / a GOB or slice with a header, whose vector predictions do not look up; first: the first + -- macroblock of a slice, whose left neighbour is outside). false on bad data. local function macroblock(col: number, row: number, P: boolean, top: boolean, first: boolean): boolean if pos > endBits then return false diff --git a/src/Formats/video/flv/init.luau b/src/Formats/video/flv/init.luau index a9eda0f..20ad62f 100644 --- a/src/Formats/video/flv/init.luau +++ b/src/Formats/video/flv/init.luau @@ -33,7 +33,7 @@ local Mux = require("@formats/video/flv/Mux") local Flv = { name = "flv", category = "video", - extensions = { "flv", "f4v" }, + extensions = { "flv" }, mime = { "video/x-flv", "video/flv" }, deps = { "core/Err", "core/Bytes", "Types", "containers/Demux", "codecs/video/Video", "codecs/video/Video/Source", "codecs/video/H263", "codecs/video/H264", "codecs/audio/Aac" }, caps = { decode = true, encode = true, streaming = true, remux = true, video = { "flv1", "h264" }, audio = true, metadata = true },