Makeing Movies
Making Movies - DRAFT
If you want to make movies out of your OpenGL animation, here are some instructions on how to do it.
Bascially, you have to call a routine every frame that will read the OpenGL color buffer and write out the information into a numbered file (frame001.ppm, frame002.ppm, ...).
The code linked to below write out .ppm files which is uncompressed RGB pixel information (very space inefficient).
There is a shell script that will convert these files to .jpg format and delete the .ppm files.
Then you need to find some utility that will assemble the .jpg files into a movie format file.
-
Ceate PPM frames
Output PPM files from program.
See outputFrame.c, outputFrame.h
-
Convert to jpg (or other format)
Use shell script ppm2jpg.sh under Unix or Mac OS
To make it executable, if it's not already: chmod a+x convertCleanScript
to run it: ./ppm2jpg
Use the ./ so it doesn't go some other path to try to find it
This script will delete the ppm files.
If you want to keep the ppm files, edit the script appropriately.
-
Import & Assemble using some appropriate utility.
- For the Mac
- using Final Cut:
- Read in:
in Final Cut (FC), make bin, highlight jpeg files, drag into bin
use View->Arrange->By Name, to list files in numeric order
highlight all in bin and drag to video window; a menu will appear;
drag and drop into 'Insert' panel
- Render:
select MarkIn and MarkOut in timeline
then Sequence->Render In and Out -> Video
- Export:
in FC, Export->Quicktime Conversion;
select Options, then select H.264;
choose project directory to put movie
- use 'convert' from ImageMagick package
see here
- use 'mencoder'.
see here
- On-line notes for Windows: AVI (I haven't tried this)