added support for rendering fixed number of frames