Package pyvision :: Package types :: Module Video :: Class Video
[hide private]
[frames] | no frames]

Class Video

source code

    object --+    
             |    
VideoInterface --+
                 |
                Video
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, filename, size=None)
The basic video class that is used to play back a movie file.
source code
 
__iter__(self)
Return an iterator for this video
source code
 
__len__(self) source code
 
query(self)
Must be overridden to implement the specific frame-grabbing required by different video sources.
source code
 
setFrame(self, n) source code

Inherited from VideoInterface: grab, next, play, resize

Inherited from VideoInterface (private): _pauseAndPlay

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, size=None)
(Constructor)

source code 

The basic video class that is used to play back a movie file.

Parameters:
  • filename - The full path name of the video file including extension. Also, with current versions of OpenCV, this can be a url to a network IP camera, but you will need to consult your IP camera manufacturer's documentation as url formats vary.
Overrides: object.__init__

Note: The following is an example of using the Video class with an IP camera. The rtsp url is for a linksys WVC54GCA IP camera. The ip address will need to be changed as appropriate for your local network. Other model cameras use different urls. It can take a few seconds for the feed to be established. cam_url = "rtsp://192.168.2.55/img/video.sav" vid = Video(cam_url) vid.play()

__iter__(self)

source code 

Return an iterator for this video

Overrides: VideoInterface.__iter__

query(self)

source code 

Must be overridden to implement the specific frame-grabbing required by different video sources.

Overrides: VideoInterface.query
(inherited documentation)