[Chimera-users] Encoding movie by hand

Tom Goddard goddard at cgl.ucsf.edu
Mon May 12 10:12:39 PDT 2008


Anindito Sen wrote:
>
> Hi Tom
>
> How can we make a movie (not morphing) out of several still snaps 
> (.jpg) saved from  of many density maps.
> using chimera.
>
> Thanks
> qandy
>
> Dr. Anindito Sen (Ph.D)
> Research Associate , Dept. of Biochemistry and Molecular Genetics 
> University of Virginia
> Box 800733 Charlottesville, VA 22908



Hi Qandy,

  You can create a movie directly from a set of images using the ffmpeg 
executable included in the Chimera distribution.  When you make a movie 
using Chimera it runs the ffmpeg executable to make the movie file and 
the options used are printed to the Chimera reply log (Favorites / Reply 
Log).  For example, in the reply log I see

ARG_LIST IS  ['-r', '25', '-i', '/tmp/chimovie_JgKl-%05d.ppm', '-y', 
'-f', 'mov', '-b', '2000', '-bufsize', '200', 
'/Users/goddard/chimera_movie.mov']
Movie saved to /Users/goddard/chimera_movie.mov

so the ffmpeg command used was:

ffmpeg -r 25 -i /tmp/chimovie_JgK1-%05d.ppm -y -f mov -b 2000 -bufsize 200

You could run a similar command from a shell to encode a movie outside 
of Chimera.  The files are specified by the "-i" option.  In the example 
they are ppm format but jpg will work too.   The %05d means that the 
file names ended in a 5-digit number with leading zeros (e.g. 
chimovie_JgK1-00000.ppm, chimovie_JgK1-00001.ppm, ...).  The -r option 
indicates frame rate (25 frames per second).  The -f option is output 
format (mov = quicktime).  The -b option is bit rate (Kbits/sec) and 
controls output quality.  The -y option means to overwrite the output 
file if it already exists.  For complete ffmpeg options see online docs:

    http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html

The Chimera copy of ffmpeg is in the distribution in chimera/bin (or on 
Mac in Chimera.app/Contents/Resources/bin).

    Tom




More information about the Chimera-users mailing list