Page 1 of 1

Record a video of a simulation

Posted: Wed Aug 21, 2013 10:30 pm
by vlsi
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.

Re: Record a video of a simulation

Posted: Sat Aug 24, 2013 12:12 am
by pincy
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

Re: Record a video of a simulation

Posted: Tue Aug 27, 2013 2:48 pm
by vlsi
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.

Re: Record a video of a simulation

Posted: Tue Aug 27, 2013 9:52 pm
by pincy
Feel free to ask further questions :-)

Cheers,
Carlo