Martin O’Hanlon has created a brilliant Python class to control raspivid. It works on a threaded basis so you can trigger the camera without causing your calling code to wait for it to finish. I recommend this to anyone who uses Python and wants to control their camera. Great stuff.