-
-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove auto close feature in VideoRecorder #42
Conversation
Do we want this as a debug message when a video is saved as depending on the video length then it can take some time I believe? |
Good point; on my laptop, it takes ~5 seconds for 1000 frames. There is already line 156: logger.debug(f"Closing video encoder: path={self.path}") I can add a |
We could do with a parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to save multiple videos?
The |
Yes, but I dislike the answer in the sense that to me close should only be called once. But I guess users can now use the function version of the wrappers for cases like that if they care |
Yes, I agree; we decided to keep VideoRecorder after discussion here: openai/gym#2894 |
If user forgets to call
close
, and the VideoRecorder is deleted by the garbage collector, the class tries to save the video, but it raises an error (and it is not easy to understand the reason). With this PR, RecordVideo just warns the user that the last video is not saved and to call close.It also adds a parameter
disable_logger
to disable MoviePy messages.