On 18. mars 2011, at 12.49, Rita wrote: > If I have 30 PNGs and i would like to make a slideshow or an animated gif > what is the best way to do this? Can matplotlib do this? >
I have used ffmpeg in the past with some success. It generates mpeg 4 video files, but maybe that's OK for you? The only requirement is that your files are named on the format file_0000.png file_0001.png ... See examples below. Cheers Paul. +++++++++++++++++++++++++ ffmpeg -qscale 5 -r 20 -b 9600 -i img%04d.png movie.mp4 ffmpeg -qscale 5 -r 20 -i img%04d.png movie.mp4 # The options are # # * -qscale 5 … define fixed video quantizer scale (VBR) where 1 is the best and 31 the worst. Since mpeg/jpeg has problems to compress line graphics it’s a good idea to set this variable close to 1. You get a big movie file, but otherwise the movie doesn’t look, well, that good. # * -r … framerate # * -b … video bitrate # * -i input files, %04d says that we have four numbers in the filename where the number is filled with zeros left of it. # * movie.mp4 is the filename, the extension says that it is a quicktime movie. You can also create a Macromedia Flash movie by using the .flv extension. # Info from: http://tinyurl.com/dlwlnk # Note that the images have to be numbered 1,2,3,... not (for example) 2, 4, 6... or 10, 20, 30... ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users