forgot to import os.  stopRecording now kills the raspivid process