| META TOPICPARENT | name="CemIT" |
Contents
Making Movies from Image Stills under Linux
Required Software
- ImageMagick -- for easy format conversion, cropping, etc.
- mjpegtools -- for encoding the movie
- xine -- for viewing the movie
Installation:
Use
- Files should be named as file001.tif, file002.tif,...fileXXX.tif
- Almost any image format is fine, ImageMagick converts many to jpg
- First, need to convert format to jpg and x-y size to a multiple of 16
foreach?> convert $F -crop -6+12 +repage $F:r.jpg
- This command changes filetype and extension to .jpg at the same time.
- To rotate, use convert input.tif -rotate 90 output.jpg (positive values rotate to right)
- To resize, use convert input.tif -resize 50% output.jpg
- Now, convert the file series to a video stream, and convert this stream to a movie format.
- for avi (better quality, less compression)
> jpeg2yuv -f 12 -I p -L 0 -j zap%03d.jpg | yuv2lav -f a -o desmo_12fps.avi
-
- jpeg2yuv options:
- -f 12 - 12 frames/sec (movie is 24, TV is 30)
- -I p - no interlacing
- -L 0 no interleaving
- -j zap%03d.jpg filename for iput files: zap000.jpg to zap999.jpg
- -q N quality (24-100, default is 80)
- yuv2lav options:
- -f a -- avi format
- -o desmo_12fps.avi - output filename
- ERRORS:
> jpeg2yuv -f 12 -I p -L 0 -j zap%03d.jpg | yuv2lav -f a -b 512 -o desmo_12fps.avi
-
- for mpeg (more compressed, but lower quality)
>jpeg2yuv -f 24 -I p -L 0 -j zap%03d.jpg | mpeg2enc -f 2 -F 2 -R 0 -a 1 -q 4 -r 32 -b 3000 -V 500 -H -o movie.mpg
-
- mpeg2enc options
- must be 24 or 30 fps
- -f 2 User VCD format. Allows non-standard frame size, buffer size, bit rate
- -F 2 24 fps frame rate (-F 4 is 30 fps)
- -R 0 no B-frames (possibly better quality)
- -a 1 1:1 aspect ratio
- -q 4 Quantization (1-31) -- the lower the number, the higher quality (8 is SVCD default; 3 or less causes problems)
- -r 32 motion search radius (16 is default, higher is supposed to be better)
- -b 3000 maximum bitrate = 3000bps. Because -q was selected, it is a variable bitrate mode.
- for better quality, increase to 9000, 12000 or higher
- -V 500 video buffer = 500 KB (std SVCD rate is 230). 500 is better if player can handle it.
- -H keep high frequency information
- -o movie.mpg output file
- Chimera:
- output in png format
- 720X480 (dvd) size or 480x480 (SVCD) size
- good sample , for dvd-quality mpeg
> png2yuv -f 25 -I p -L 0 -n -1 -j chimovie_9ESf-%05d.png | mpeg2enc -f9 -o chimera_movie.mpg
> xine movie.avi
> xine movie.mpg
-
- in xine, right click and select "loop" from Playback submenu for looping
- movies will play on Macs (Quicktime) and Windows (Windows MediaPlayer)
To make movies under Windows
-
- use RAD tools http://www.radgametools.com/bnkdown.htm
- can use Indeo v4.5 compression (and specify the degree of compression (85% is default)
- can also use Cinepak Codec by Radius or Microsoft Video I for compression
- these avi files can be presented using powerpoint whereas YUV cannot
Using Chimera to make movies
-
- AVI files have not so far worked with powerpoint
- MPEG1 movies are compatible with powerpoint, though of lower quality
|