ws-video: MJPEG (codecs/Jpeg, yuv420p full range; encoder remaps limited-range frames) and MPEG-1 (codecs/Mpeg1, display reordering with the packet pts as tag) in the codec registry; VideoFrame times count from the demuxer's startTime (TS starts at 1.4 s); Matroska Vorbis keeps its codec delay; fixtures decode with -fps_mode passthrough
This commit is contained in:
1 parent
ba996820b5
commit
bd06545e2e
9 files changed
+136
-11
No files matched your search
@@ -773,6 +773,7 @@ do
|
||||
end
|
||||
realtime("tracker 32 ch (mod)", song("mod", false), 32)
|
||||
realtime("tracker 32 ch + NNA, filters", song("it", true), 64)
|
||||
end
|
||||
-- ------------------------------------------------------------------------------------------- ws-video-codecs: fps
|
||||
do
|
||||
local Jpeg = require("@formats/codecs/Jpeg")
|
||||
|
||||
@@ -62,7 +62,7 @@ def yuv_frames(path, w, h, extra=None, codec=None):
|
||||
"""the first video stream decoded by ffmpeg to yuv420p (yuvj420p for MJPEG: full range, no conversion): a list of
|
||||
frame bytes"""
|
||||
pix = "yuvj420p" if codec == "mjpeg" else "yuv420p"
|
||||
raw = ffmpeg(["-i", path] + (extra or []) + ["-map", "0:v:0", "-f", "rawvideo", "-pix_fmt", pix, "-"])
|
||||
raw = ffmpeg(["-i", path] + (extra or []) + ["-map", "0:v:0", "-fps_mode", "passthrough", "-f", "rawvideo", "-pix_fmt", pix, "-"])
|
||||
n = w * h + 2 * ((w + 1) // 2) * ((h + 1) // 2)
|
||||
return [raw[i:i + n] for i in range(0, len(raw) - n + 1, n)]
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ def case(tmp, name, rgba=False, raw_frames=2, pcm_frames=8192):
|
||||
if vs:
|
||||
w, h = vs[0]["width"], vs[0]["height"]
|
||||
if rgba:
|
||||
raw = V.ffmpeg(["-i", path, "-map", "0:v:0", "-f", "rawvideo", "-pix_fmt", "rgba", "-"])
|
||||
raw = V.ffmpeg(["-i", path, "-map", "0:v:0", "-fps_mode", "passthrough", "-f", "rawvideo", "-pix_fmt", "rgba", "-"])
|
||||
n = w * h * 4
|
||||
c["rgba"] = [V.crc(raw[i:i + n]) for i in range(0, len(raw) - n + 1, n)]
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user