Difference: MovieMaking (19 vs. 20)

Revision 2017 Jan 2012 - Main.DavidStokes

 
META TOPICPARENT name="CemIT"
Contents

Making Movies from Image Stills under Linux

Required Software

  1. ImageMagick -- for easy format conversion, cropping, etc.
  2. mjpegtools -- for encoding the movie
  3. xine -- for viewing the movie

Installation:

  • ImageMagick comes with Fedora/Redhat, installed by default. Otherewise Trash.findDFdf rpm.
  • Others: setup yum to work with Dag Wieers repository. Instructions
         >yum install mjpegtools
         >yum install xine
        

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
    • use the "convert" program in ImageMagick
         > foreach F (*.tif)
         foreach?>  convert $F -crop +5-13 +repage $F:r.jpg
         foreach?>  end
          
      This crops five pixels from the left edge and twelve pixels from the bottom edge.
    • To crop five pixels from right edge and 12 from the top, use
               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:
      • may get the following error :
         
        **ERROR: [yuv2lav] Given jpeg buffer was too small!
        Buffer passed to JPEG library is too small
        **ERROR: [yuv2lav] Couldn't compress YUV to JPEG
        
      • add the option -b 512 to yuv2lav in order to increase the buffer size as follows:
          > 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

  • Viewing the movie:
     > 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
Changed:
<
<
    • 720X480 (dvd) size or 480x480 (SVCD) size
    • use command file to record movie commands
>
>
    • open "movie recorder" window in chimera
      • click on DVD to resize window
Added:
>
>
      • 720X480 (dvd) size or 480x480 (SVCD) size
      • specify output file
      • specify output format (MPEG1)
    • create command file to record movie commands
 
      • * copa-dC-movie.txt: example chimera command file
      • use savepos command to store key positions
      • then use reset command to move to those positions during the movie
Changed:
<
<
    • file->open "chimera commands" to run the command file
>
>
    • file->open "chimera commands" to run the command file (this will start movie)
 
      • also should be able to use source or read from command line
    • after running command file to record the images, will have to hit Make Movie to create movie

Rotate Movie (AVI) 90deg

  • The first thing you can try is the Windows Movie Maker in the accessories.
  • Import the video file into the storyboard and right click to choose the “video effects”.
  • Add “rotate 90″ to the effect, and then you can export the movie to a WMV file.
  • The good thing here is that you don’t need to download anything, since Windows Movie Maker comes with Windows XP.
  • Can also edit the time line an stitch together movies using this software

  • Set ALLOWTOPICVIEW =

-- BillRice - 28 Mar 2006

META FILEATTACHMENT attachment="copa-dC-movie.txt" attr="" comment="example chimera command file" date="1232312575" name="copa-dC-movie.txt" path="copa-dC-movie.txt" size="449" stream="copa-dC-movie.txt" user="Main.DavidStokes" version="0"
 
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding this intranet, Send feedback