videolib.video.Video¶
- class Video(file_path, standard, mode, width=None, height=None, format=None, quantization=None, dither=False, out_dict={})[source]¶
Bases:
objectClass defining a video. Reads/writes
Frameobjects to/from a file on the disk- Parameters:
file_path (
str) – Path to file on the disk.standard (
Standard) – Color standard to which the data conforms.mode (
str) – Read/Write mode. Must be one of ‘r’ or ‘w’.width (
Optional[int]) – Width of each frame of the video. Required only in read mode.height (
Optional[int]) – Height of each frame of the video. Required only in read mode.quantization (
Optional[int]) – Value to which data will be quantized and scaled back to original range.dither (
Optional[bool]) – Flag denoting whether dithering must be applied after quantization.out_dict (
Optional[Dict]) – Dictionary of ‘-vodec’ and/or ‘-crf’ parameters to pass to FFmpegWriter when writing encoded videos.
Methods
Appends frame to file on disk.
Close the file object associated with the video.
Read a particular frame from the video (0-based indexing).
Reset index of next to the start of the video.
Adds frame to file on disk.
Adds RGB frame array to file on disk.
Adds YUV frame array to file on disk.
Attributes
bit_depth