Addition of timer for the video acquisition which avoid to use an infinite loop.