[R] animated grid graphics

Paul Hiemstra p.hiemstra at geo.uu.nl
Wed Jul 22 09:57:52 CEST 2009


Allan Engelhardt wrote:
> On 21/07/09 14:00, Paul Hiemstra wrote:
>> Hi,
>>
>> Drawing grid graphics always takes long, I would write the images to 
>> png's and make the animation. If you use Linux I can suggest some 
>> nice tools to do this. 
>
> Please do suggest!  I was thinking about a similar problem.
>
> Allan.
Hi Allan and Jeremy,

I use the jpeg2yuv and mpg2enc commands to create an mpg movie from a 
series of jpeg's, in this case created using R. The command to produce 
the mpg movie looks something like:

ls *.jpg | jpeg2yuv -f 25 -I p | mpg2enc -q3 -M2 2048 -o animation.mpg

These tools are part of the ffmpeg project (http://ffmpeg.org/) an I 
think they are part of the debian (and maybe ubuntu) repositories. 
Another cool tool is yuvmotionfps, it allows you to interpolation 
between frame, see http://jcornet.free.fr/linux/yuvmotionfps.html.

cheers and good luck,
Paul

-- 
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone:  +3130 274 3113 Mon-Tue
Phone:  +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul




More information about the R-help mailing list