writing working testing for video encoding