Author: Lijun Yu
Email: lijun@lj-y.com
A submodule of video loaders.
- AVI-R for
.avi
files only (handles missing frames). - MoviePy for
.mp4
and other files. - Decord.
- OpenCV.
from loaders import get_loader
video_path = ...
loader_class = get_loader('AVI-R') # Or MoviePy, Decord, OpenCV
loader = loader_class(video_path)
for frame_batch in loader(): # Optional params: start=0, end=None, stride=1, batch_size=1
# Do something with the frame batch
loader.close() # Release resources
See actev_base.
See License.