writing processed images to videos