Re: [R] HOW to Create Movies with R with repeated plot()?

From: Jason W. Martinez <jmartinez5_at_verizon.net>
Date: Thu 28 Jul 2005 - 02:09:43 EST

Dear R-list,

I'm surprised that no one on this list has mentioned anything about the ffmpeg tools! Hands down these are the tools to use for generating animations and movies.

Processing the images is much quicker than imagemagick and with a little tweaking, you can add additional filter effects to the images as they are being processed.

http://ffmpeg.sourceforge.net/index.php

Also see the smilutils and some examples at:

http://users.pandora.be/acp/ppmfilter/

Although I haven't used these tools in quite a while, I have been able to export the resulting mpeg files into VCD quality videos for playing on DVDs.

I hope this helps.

Jason

On Wed, 2005-07-27 at 08:44, Ted.Harding@nessie.mcc.ac.uk wrote:
> On 27-Jul-05 Jan Verbesselt wrote:
> > Dear R-helpers,
> >
> > Is it possible to create a type of 'movie' in R based on the
> > output of several figures (e.g., jpegs) via the plot() function.
> > I obtained dynamic results with the plotting function and would
> > like to save these as a movie (e.g., avi or other formats)?
>
> A similar question was discussed on R-help some months ago: Start
> at
>
> Cari G Kaufman <cgk@stat.cmu.edu>,
> "[R] animation without intermediate files?"
> Thu, 6 Jan 2005 16:21:36 -0500 (EST)
>
> However, this is not quite your question! It seems you would be
> content with making a movie out of files already saved from R,
> so it's not a "real-time" situation.
>
> There are several approaches you could adopt.
>
> One (if you are using Linux with ImageMagick installed -- or if
> this is available for your platform if different) is to use the
> program 'animate' in that suite of programs.
>
> The format of the image files does not matter for 'animate'
> (though I think all should have the same format), so they could
> be .jpg, .gif, etc. Suppose you had a set of files
>
> graph001.jpg
> graph001.jpg
> ...
> graph100.jpg
>
> then the command
>
> animate graph*.jpg
>
> would present them as an animation in due order. There are several
> options to the 'animate' command which you can use to control
> features of how they are displayed. One you would probably want to
> use is "-delay" -- e.g.
>
> animate -delay 7 graph*.jpg
>
> would pause for 7/100 seconds between successive images.
>
> Another option is to create an "animated GIF" -- a single file
> which encapsulates several images and displays them in sequence
> when the file is opened with suitable software (most Web browsers
> do this well; likewise so does ImageMagick's 'display').
>
> Programs which can create animated GIFs include the GIMP and
> gifsicle in the Free Software world. There are also several programs
> for non-Linux platforms.
>
> Sorry I can't help with suggestions for creating .avi files.
>
> Best wishes,
> Ted.
>
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 27-Jul-05 Time: 14:08:00
> ------------------------------ XFMail ------------------------------
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 

Jason W. Martinez
E-mail: jmartinez5@verizon.net

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jul 28 02:17:30 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:05 EST