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:
4DBug committed 2026-10-31 09:57:26 -05:00
1 parent ba996820b5
commit bd06545e2e
9 files changed
+136 -11

No files matched your search

+1 -1
View File
@@ -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)]