PiCapture Video Source Selection on Python Reply To: Video Source Selection on Python

#961
mwlinder
Keymaster

The PiVideo software can be used within python for this purpose. First, make sure that you have installed PiVideo and can communicate with the PiCapture board:

pivideo -p i2c1 -q all

In your python program, you then use something like this:

import pivideo_class
vid=pivideo_class.PiVideo()
vid.pivideo_port=’i2c1′
vidopen=vid.open

Now you have an open communication port to the PiCapture processor, and can issue commands like:

vid.source=’video1′

or:

vid.source=’video3′

Please note that you need to make sure that the port used for communication (I2C1, I2C0, or serial) matches the jumpers on the PiCapture and the code above.

mwlinderReply To: Video Source Selection on Python