Improvements
Reduced video file I/O by 67%
The node previously opened the source video file 6 times per execution. It now opens it twice — once to read metadata and once to extract frames. For large or network-mounted video files this is a meaningful reduction in per-run overhead.
Halved peak memory during frame extraction
Frame data is now written directly into a pre-allocated buffer rather than building an intermediate list that was then copied into a stacked array. Peak memory during extraction is approximately half what it was previously.
Boundary frames served from memory instead of disk
first_frame and last_frame outputs are now sliced from the already-loaded frame batch rather than triggering two additional video reads. This eliminates redundant I/O and removes two numpy allocations per execution.
Bug Fixes
Fixed: BytesIO buffer not released in thumbnail endpoint
The /video_frame_extractor/thumbnail API handler now explicitly closes its internal buffer after encoding the JPEG response, ensuring memory is freed promptly on each request.
All changes are internal — no inputs, outputs, or node behavior has changed.