video module

class video.Video[source]

Bases: object

get_frame(gray=False)[source]

Return the current frame from the video.

ready()[source]

Check if the video is ready.

class video.VideoFile(file)[source]

Bases: video.Video

initialize()[source]

Open video file.

class video.VideoReader(video, buffer, timeout)[source]

Bases: threading.Thread

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class video.VideoWriter(file, width=640, height=480, fps=25)[source]

Bases: object

initialize()[source]

Open output file and initialize video codec.

write(frame)[source]

Save a frame in the file.

class video.Webcam(webcam_id=0, width=640, height=480, fps=25)[source]

Bases: video.Video

initialize()[source]

Initialize capture device.

video.frame_extraction(video, output_file, reduction=5)[source]

Extract frames from a video and store them as images.