tests/video: comments: specs only
This commit is contained in:
1 parent
96602286f8
commit
1d4f02d984
14 files changed
+37
-109
No files matched your search
+3
-14
@@ -1,10 +1,5 @@
|
||||
-- video/flv tests: FLV files from ffmpeg (Sorenson Spark + MP3 / PCM s16 / PCM u8 / ADPCM / Nellymoser / Speex /
|
||||
-- A-law, H.264 with B-frames + AAC, Flash screen video, audio only): tracks and every packet against ffprobe
|
||||
-- (composition times in the pts, keyframes), onMetaData, frames against ffmpeg (Sorenson bit-exact, H.264 PSNR), audio
|
||||
-- through the api hook (PCM and Flash ADPCM mono / stereo exact against ffmpeg's adpcm_swf; Nellymoser / Speex known
|
||||
-- but UNSUPPORTED), seeking; crafted VP6 / enhanced FourCC / encrypted / truncated files; our writer (FLV, MP4,
|
||||
-- Matroska sources) read back by ffprobe and ffmpeg (tools/fixtures/flv.py) and by our demuxer with the source's
|
||||
-- packets; fuzz. Fixtures: tools/fixtures/flv.py.
|
||||
-- video/flv tests: FLV files from ffmpeg against ffprobe / ffmpeg (Nellymoser, Speex, VP6: known but UNSUPPORTED).
|
||||
-- Fixtures: tools/fixtures/flv.py.
|
||||
local T = require("@tests/T")
|
||||
local C = require("@tests/video/_common")
|
||||
local F = require("@rosetta")
|
||||
@@ -27,7 +22,6 @@ for _, c in Fx do
|
||||
byName[c.name] = c
|
||||
end
|
||||
|
||||
-- every frame's CRC against ffmpeg's (codecs we decode bit-exactly), else PSNR
|
||||
local function frames(v: any, c: any, label: string)
|
||||
if v.codec == "flv1" then
|
||||
v:reset()
|
||||
@@ -88,7 +82,6 @@ for _, c in Fx do
|
||||
end
|
||||
end
|
||||
|
||||
-- details: H.264 config and composition times, metadata, screen video size
|
||||
do
|
||||
local v = assert(C.open(byName["h264_aac.flv"].data))
|
||||
local vt, at = v.demuxer:track("video"), v.demuxer:track("audio")
|
||||
@@ -110,8 +103,7 @@ do
|
||||
t:check(s.codec == "flashsv" and s.width == 64 and s.height == 48, "screen video: known codec, size from its first packet")
|
||||
end
|
||||
|
||||
-- crafted files: VP6 (known, UNSUPPORTED, size from its key frame header), an enhanced FourCC tag, encrypted tags,
|
||||
-- truncation, not FLV
|
||||
-- crafted files: VP6 (known, UNSUPPORTED, size from its key frame header), an enhanced FourCC tag, encrypted tags
|
||||
local function flv(tags: { { any } }): buffer
|
||||
local w = Bytes.writer(256)
|
||||
w:string("FLV")
|
||||
@@ -176,7 +168,6 @@ do
|
||||
t:check(e2 ~= nil and e2.code == F.Err.CORRUPT, "not FLV: CORRUPT")
|
||||
end
|
||||
|
||||
-- our writer: read back by ffprobe / ffmpeg (fixtures) and by our demuxer, packets equal to the source's
|
||||
local SOURCES = { mp4 = Src.mp4, mkv = Src.mkv, ts = Src.ts }
|
||||
for _, c in Mx do
|
||||
local label = "write " .. c.name
|
||||
@@ -193,7 +184,6 @@ for _, c in Mx do
|
||||
if at then
|
||||
C.audio(t, v, c, label, EXACT_AUDIO[at.codec], 30)
|
||||
end
|
||||
-- the source's packets, byte for byte
|
||||
local src = assert(C.open(SOURCES[c.source] or byName[c.source].data))
|
||||
local a, b = src.demuxer, v.demuxer
|
||||
local same = true
|
||||
@@ -226,7 +216,6 @@ for _, c in Mx do
|
||||
end
|
||||
end
|
||||
|
||||
-- fuzz
|
||||
local samples = {}
|
||||
for _, n in { "sorenson_mp3.flv", "h264_aac.flv", "sorenson_pcm.flv", "screen.flv" } do
|
||||
local d = byName[n].data
|
||||
|
||||
Reference in new issue
Block a user