Record a video of a simulation

Requests regarding how to set up experiments in ARGoS.
vlsi
Posts: 3
Joined: Thu Mar 21, 2013 3:41 pm

Record a video of a simulation

Postby vlsi » Wed Aug 21, 2013 10:30 pm

Hello,

I have some simulation running, and I would like to ask if it's possible to extract a video from the simulation. I have spotted this camera icon, but whenever I have pushed it, it produced lots of frames that are stored in my folder. Should I incorporate these frames to another program to crate a video, or is there any other way of doing it?

Thank you in advance.

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Record a video of a simulation

Postby pincy » Sat Aug 24, 2013 12:12 am

Hi vlsi,

sorry for the late reply, I'm just back from vacation.

If you want to record a video of a running simulation, you need to create the frames through the "record" button as you pointed out.

Creating the video from these frames is easy. On Linux, you can use either MEncoder or FFMpeg.

I usually work with MEncoder. This is a page that introduces you to the topic: http://www.mplayerhq.hu/DOCS/HTML/en/me ... mages.html.

My favorite command is:

mencoder mf://DIR/*.png -mf w=WIDTH:h=HEIGHT:fps=10 -o OUTFILE -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=3000

where:
- DIR is the directory in which the frames are stored;
- WIDTH and HEIGHT are the width and height of the frames;
- OUTFILE is the name of the AVI file to create.

I also find this script extremely useful: http://h264enc.sourceforge.net/

Cheers,
Carlo
I made ARGoS.

vlsi
Posts: 3
Joined: Thu Mar 21, 2013 3:41 pm

Re: Record a video of a simulation

Postby vlsi » Tue Aug 27, 2013 2:48 pm

Hello Carlo,

Thank you very much for your reply ! Everybody was away for summer, I understand :) I had noticed that button, and the frames created in the folder. I was wondering if there is some operation directly from this software to extract a video, but ok. I will have a look at your links then, thank you for this useful info !
I have some other questions too, because I am new to this, so maybe you find out more topics from me soon.

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Record a video of a simulation

Postby pincy » Tue Aug 27, 2013 9:52 pm

Feel free to ask further questions :-)

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”