now saves the frames as jpeg