Added motion emitting and MJPEG saving