Creating image masks from video file