Skip to content
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

[Question] RecordVideo funtion not saving any videos #3049

Closed
eak0mo opened this issue Aug 30, 2022 · 2 comments
Closed

[Question] RecordVideo funtion not saving any videos #3049

eak0mo opened this issue Aug 30, 2022 · 2 comments

Comments

@eak0mo
Copy link

eak0mo commented Aug 30, 2022

Question

when using the following syntax test_env=record_video.RecordVideo(gym.make("BipedalWalker-v3",render_mode="rgb_array"),video_folder="",name_prefix="")

for the RecordVideo function, there is a video file created that is immediately deleted and produces these warnings.
image

@younik
Copy link
Contributor

younik commented Aug 30, 2022

Regarding the first warning, you should specify a non-existing folder to get rid of it

The second one is tricky; it happens when the agent runs backward from the start

@pseudo-rnd-thoughts
Copy link
Contributor

@younik I don't seem to be able to replicate the issue

env = gym.make("BipedalWalker-v3",render_mode="rgb_array")
for _ in range(10):
    env.reset()

    for _ in range(20):
        render = env.render()
        assert render.shape == (400, 600, 3), render.shape
        env.step(env.action_space.sample())

env.close()

Weirdly I found that the render image was (400, 600, 3) not (400, 620, 3)

I couldn't find the warning raised by any other env

for spec in gym.envs.registry.values():
    env = spec.make(render_mode="rgb_array")
    env = gym.wrappers.RecordVideo(env, video_folder="video", name_prefix=spec.id)

    env.reset()
    env.step(env.action_space.sample())
    env.close()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants