fixed video encoding issues when simulation and video frame are not the same size