Search code examples
pythonmacosreinforcement-learningopenai-gym

PermissionError: [Errno 13] Permission denied: 'ffmpeg' Open AI GYM


I'm new to Open Ai gym but I was trying to find a way to record each episodes of my agent's learning. I found the class that should do the job :

env = gym.make("CartPole-v0")
rec = VideoRecorder(env, "recording.mp4")

But each time, I'm using :

rec.capture_frame()

I get the following error :

PermissionError: [Errno 13] Permission denied: 'ffmpeg' Open AI GYM

Would you guys happen to know what could be the problem?

Thanks a lot !


Solution

  • I just found a way to make things work on Mac OS :

    brew install ffmpeg
    

    then in your terminal do

    sudo  ffmpeg -i input.mp4 output.avi
    

    It did the trick for me