I'm trying to build a home security camera. I'm using raspberry pi 3 and I've got some code from an online video that allows me to stream to a local host and if motion is detected, using haar cascades, an image is taken by the camera and sent to an email address. That part is working fine. Now what i would like to do is add a feature that allows the camera to record a video after the image has been sent and then upload that video to dropbox. I am a beginner at python and opencv so i couldn't understand the code i got from the internet and i didn't know how to edit it. Any help would be MUCH appreciated! Thanks