Refactored video_logger to grab and write video in a thread.