minosworld / minos

MINOS: Multimodal Indoor Simulator
MIT License
201 stars 33 forks source link

Saving video giving error in MINOS #137

Open Usama323 opened 5 years ago

Usama323 commented 5 years ago

I am entering following command! python3 -m minos.tools.pygame_client --agent_config agent_firstperson --empty_room --height 400 --width 600 --save_video task.avi

Getting following error ! pygame 1.9.4 Hello from the pygame community. https://www.pygame.org/contribute.html 2018-12-19 08:22:15,426 INFO {'machine': 'usama-HP-Notebook', 'stk_git_hash': '478f622', 'sim_id': 'sim00', 'sim_git_hash': '478f622'} Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/usama/Desktop/minosmi/minos/minos/tools/pygame_client.py", line 457, in main() File "/home/usama/Desktop/minosmi/minos/minos/tools/pygame_client.py", line 423, in main VIDEO_WRITER = VideoWriter(filename, framerate=24, resolution=(args.width, args.height), rgb=is_rgb) File "/home/usama/Desktop/minosmi/minos/minos/lib/util/VideoWriter.py", line 33, in init self.proc = sp.Popen(command, stdin=sp.PIPE, stderr=sp.PIPE) File "/usr/lib/python3.5/subprocess.py", line 947, in init restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg' Exception ignored in: <bound method VideoWriter.del of <minos.lib.util.VideoWriter.VideoWriter object at 0x7f508606ea20>> Traceback (most recent call last): File "/home/usama/Desktop/minosmi/minos/minos/lib/util/VideoWriter.py", line 44, in del self.close() File "/home/usama/Desktop/minosmi/minos/minos/lib/util/VideoWriter.py", line 39, in close self.proc.stdin.close() AttributeError: 'VideoWriter' object has no attribute 'proc' 2018-12-19 08:22:15,485 INFO sim00:Stopping the simulator 2018-12-19 08:22:15,485 INFO Counter() 2018-12-19 08:22:15,486 INFO sim00:Stopping child servers 2018-12-19 08:22:15,486 INFO sim00:Stopped child servers 2018-12-19 08:22:15,486 INFO sim00:Simulator killed.

msavva commented 5 years ago

You will need to install ffmpeg and make sure it is available on your command line (i.e. running ffmpeg in the terminal succeeds) before saving videos.

Usama323 commented 5 years ago

Thanks @msavva it worked perfectly !!