Repository navigation
Releases: alesanfra/iterframes
Releases · alesanfra/iterframes
Release list
v0.7.0
v0.6.0
v0.5.0
v0.4.0
0.4.0 (2026-09-19)
The rewrite: static FFmpeg wheels, frames without copies, and hardware
decoding.
Breaking
- Python 3.11 or later is required, for the buffer protocol in the
stable ABI read_batchis replaced byread_all, which returns NumPy arrays in
the order of the video.read_batchreturnedFrameobjects in reverse
order- Frames are C-contiguous arrays instead of strided views on a buffer
padded at the end of each row FrameReaderyieldsFrameobjects, which support the buffer
protocol, instead of(bytearray, height, width)tuples
Added
- The wheels bundle a static FFmpeg 9.0, so FFmpeg no longer needs to be
installed. One abi3 wheel per platform covers every CPython from 3.11
on: Linux x86_64 and aarch64 (manylinux_2_28), macOS arm64 - AV1 decoding, through dav1d
- Errors are raised instead of ending the iteration silently:
FileNotFoundErrorand otherOSErrors when the file cannot be opened,
ValueErrorwhen it is not a video,RuntimeErrorwhen decoding fails readacceptsos.PathLikepathsFFMPEG_VERSION, the version of the linked FFmpeg- Hardware decoding with
device, named as in PyTorch:"mps"for
VideoToolbox on macOS,"cuda"for NVDEC on Linux, which also resizes
on the GPU, or"auto".DEVICESlists the devices of the build on_device=True, withdevice="cuda", leaves the frames on the GPU as
CudaFrameobjects in NV12, whose planes support DLPack- Documentation site on Read the Docs
Changed
- FFmpeg decodes on several threads, and waiting for a frame releases the
GIL, so other Python threads keep running - The conversion to RGB, and the resizing, run on several threads too
- Frames reach NumPy without a copy: the arrays share memory with the
FFmpeg frames - The decoder thread stops as soon as the iterator is dropped
- A change of resolution or pixel format within a stream no longer stops
the decoding - Development uses uv;
requirements-dev.txt,
the Dockerfile, and the build scripts are replaced byuv.lockand
scripts/build-ffmpeg.sh - Tests compare the frames with PyAV instead of decord
- CI lints Rust and Python, tests every wheel, and publishes to PyPI
through trusted publishing - Updated to PyO3 0.29 and Rust edition 2024
ffmpeg-nextandffmpeg-sys-nextare replaced bybuild.rs, which
builds the static FFmpeg, links it, and generates its bindings, so that
maturin buildneeds no FFmpeg installed and no environment variables.
The system FFmpeg is no longer used, and thestaticfeature is gone