← Back to team overview

yade-users team mailing list archive

Re: Is there a way to make the animation a .mpg file?

 

Andreas Plesch said:     (by the date of Mon, 24 Oct 2005 15:20:09 -0700 (PDT))

> You may want to check out the new simulation player in
> the latest svn version. It requires to record a
> simulation with the DEM simulator and then should play
> it. It has an option to save snapshots from which you
> may be able to make mpgs, for example with mencoder or
> convert. However, on my install the DEM simulator
> records to files wich do not have the correct content:
> no changes and lots nad values. The player accordingly
> cannot play those here.

I'm very glad to see that you are helping each other! That's the exact
purpose of yade-users mailing list :-))))

Now for the video.

Snapshots saved by DEM simulator are spheres postions x,y,z and radius.
If you load them later you can reconstruct the exact simulation. Olivier
was using this to create videos. There is also a simulation player
written by Olivier, it should read those files to replay whole
simulation, but honestly - I've never used that ;> That's his work.

I'm a very lazy guy, and I used xvidcap to record all the videos on the
website. Only a video with 125000 spheres was made by Olivier using his
method. All the others are made with xvidcap.

for debian xvidcap can be found here:

deb ftp://ftp.nerim.net/debian-marillat/ sarge main

about other distros - I don't know. When you have all the pictures, you
can convert them to .png and then encode them to make a video:

for m in *.xwd; do convert $m `basename $m .xwd`.png; rm $m; done

mencoder "mf://*.png" -o video.mpg -mf fps=25 -ovc lavc -lavcopts vcodec=msmpeg4v2


The codec msmpeg4v2 is by my experience most popular on windows, and I
had least amount of problems with it when I wanted a video to run on
some windows machine.

-- 
Janek Kozicki                                                         |
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



References