FFMpeg based digital video recorder with motion detector