Code: Select all
#!/bin/bash
from picamera import mmalobj as mo, mmal
from signal import pause
camera = mo.MMALCamera()
splitter = mo.MMALSplitter()
render_l = mo.MMALRenderer()
render_r = mo.MMALRenderer()
camera.outputs[0].framesize = (400, 300)
camera.outputs[0].framerate = 30
camera.outputs[0].commit()
p = render_l.inputs[0].params[mmal.MMAL_PARAMETER_DISPLAYREGION]
p.set = mmal.MMAL_DISPLAY_SET_FULLSCREEN | mmal.MMAL_DISPLAY_SET_DEST_RECT
p.fullscreen = False
p.dest_rect = mmal.MMAL_RECT_T(0, 100, 400, 300)
render_l.inputs[0].params[mmal.MMAL_PARAMETER_DISPLAYREGION] = p
p.dest_rect = mmal.MMAL_RECT_T(400, 100, 400, 300)
render_r.inputs[0].params[mmal.MMAL_PARAMETER_DISPLAYREGION] = p
splitter.connect(camera.outputs[0])
render_l.connect(splitter.outputs[0])
render_r.connect(splitter.outputs[1])
pause()
I updated and upgraded (update, upgrade, rpi-update)) and also updated motion. Now the script doesn't work. I've tried several things, including a fresh Raspbian install on a new SD card, although I ran into many problems installing motion, because some of the dependencies wouldn't install.
Was there some change in the Motion that makes this script not work anymore?