microsoft / malmo

Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment. --- For installation instructions, scroll down to *Getting Started* below, or visit the project page for more information:
https://www.microsoft.com/en-us/research/project/project-malmo/
MIT License
4.1k stars 600 forks source link

malmo::MissionRecordSpec::recordMP4 #903

Closed SHI-Yu-Zhe closed 3 years ago

SHI-Yu-Zhe commented 3 years ago

I was trying to record the MP4 video of the viewpoint of the agent as visual perception, using the following code: my_mission_record = MalmoPython.MissionRecordSpec('./record/data.tgz') my_mission_record.recordMP4(2, 1000000) ... agent_host.startMission(my_mission, pool, my_mission_record, 0, experiment_id) After running a mission, I do obtain a frame_info.txt file with recordings in the form of width=1600 height=900 20201219T235503.604921 frame_000001 xyzyp: 0.5 4 1.5 -90 0 20201219T235504.115000 frame_000002 xyzyp: 0.5 4 1.5 -90 0 20201219T235504.627629 frame_000003 xyzyp: 0.5 4 1.5 -90 0 and a shell to convert the mp4 video to png images: mkdir video_frames ffmpeg -i "video.mp4" video_frames/frame_%06d.png Obviously, "video.mp4" should be the video recorded by malmo, yet it never shows in this directory. frame_info.txt video_ffmpeg.out missionInit.xml video_to_pngs.sh I wonder that where the output video has been saved. Thanks for your attention.

SHI-Yu-Zhe commented 3 years ago

Solved. The core issue is the x264 lib of ffmpeg. I need to install x264 and rebuild ffmpeg to enable it. It works well now.

satyamedh commented 3 years ago

@YuzheSHI close issue