ws-video2-flv: video/flv (FLV demux: tags, onMetaData AMF0, Sorenson / H.264 (avcC, composition times) / VP6 / screen video / enhanced FourCC tracks, MP3 / AAC / PCM / G.711 / ADPCM / Nellymoser / Speex audio, keyframe seek; FLV mux: H.264 / Sorenson / VP6 / screen copied, AAC (ADTS re-framed) / MP3 / PCM audio, onMetaData)

Outside the folder: codecs/video/Video BUILTIN gains known (decoder-less) entries vp6f, vp6a, flashsv, flashsv2.
This commit is contained in:
4DBug committed 2026-10-31 15:09:20 -05:00
1 parent 2a5da31c80
commit efc0812746
9 files changed
+1230

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
-- tools/fixtures/_flv_encode: run by tools/fixtures/flv.py (luau, from the repo root) so ffprobe / ffmpeg can check our
-- FLV writer: remuxes FLV fixtures (tests/gen/flv_cases) and the MP4 / Matroska / MPEG-TS sources (tests/gen/flv_src)
-- and prints "<name> <source> <hex>" lines (or "<name> <source> ERR <message>").
local F = require("@formats")
local Cases = require("@tests/gen/flv_cases")
local Src = require("@tests/gen/flv_src")
local function hex(b: buffer): string
local t = table.create(buffer.len(b))
for i = 0, buffer.len(b) - 1 do
t[i + 1] = string.format("%02x", buffer.readu8(b, i))
end
return table.concat(t)
end
local function find(name: string): string
for _, c in Cases do
if c.name == name then
return c.data
end
end
error("no fixture " .. name)
end
local JOBS = {
{ "remux_h264_aac.flv", "h264_aac.flv", find("h264_aac.flv") },
{ "remux_sorenson_mp3.flv", "sorenson_mp3.flv", find("sorenson_mp3.flv") },
{ "remux_pcm.flv", "sorenson_pcm.flv", find("sorenson_pcm.flv") },
{ "remux_screen.flv", "screen.flv", find("screen.flv") },
{ "mp4_h264_aac.flv", "mp4", Src.mp4 },
{ "mkv_h264_mp3.flv", "mkv", Src.mkv },
{ "ts_h264_aac.flv", "ts", Src.ts },
}
for _, j in JOBS do
local name, source, data = j[1], j[2], j[3]
local out, err = F.convert(buffer.fromstring(data), "flv")
if out then
print(name .. " " .. source .. " " .. hex(out))
else
print(name .. " " .. source .. " ERR " .. tostring(err))
end
end