method to create a video from images