skvideo.io.vread
skvideo.io.vread¶Load a video from file entirely into memory.
Video file name, e.g. bickbuckbunny.mp4
Set the source video height used for decoding. Useful for raw inputs when video header does not exist.
Set the source video width used for decoding. Useful for raw inputs when video header does not exist.
Only read the first num_frames number of frames from video. Setting num_frames to small numbers can significantly speed up video loading times.
If true, only load the luminance channel of the input video.
Input dictionary parameters, i.e. how to interpret the input file.
Output dictionary parameters, i.e. how to encode the data when sending back to the python process.
Program to use for handling video data. Only ‘ffmpeg’ and ‘libav’ are supported at this time.
Setting to 0 (default) disables all debugging output. Setting to 1 enables all debugging output. Useful to see if the backend is behaving properly.
Skip the first start_frame frames before reading (issue #166).
Combine with num_frames for a windowed read like
vread(..., start_frame=1000, num_frames=200). Uses FFmpeg’s
fast keyframe seek, so the actual first frame returned may snap
to the nearest keyframe at or before the requested position.
ndarray of dimension (T, M, N, C), where T is the number of frames, M is the height, N is width, and C is depth.