Hi all, sorry I dropped off radar for a month; writing a dissertation. I followed the advice you gave, as well as a bit of Googling to fill in some gaps. I came up with this draft tutorial. Please let me know what you think.
Stop-Motion Animation Tutorial
Synfig is a very sophisticated animation program which can incorporate raster and vector graphic data in multiple layers with fine control of both time and crossfade. However a basic stop-motion animation is much simpler, using only a few of the functions in Synfig. This tutorial focuses on creating a stop-motion animation from still frames with no crossfade transition. It may therefore be useful as an introductory tutorial to provide a quick introduction to a few controls, before you use Synfig for more elaborate editing.
Preparing the images
Images can be captured or generated in a variety of ways. One example would be a sequence of scanned hand-drawings; another would be screen-captures of a drawing created in a computer program, from GIMP, Photoshop, Inkscape, Illustrator, or a CAD program. A third source would be a series of digital camera photographs of a set in which figures are moved incrementally between photographs.
In all cases, the sequence of images may need to be reduced in size and color depth to reduce file-size. Whereas a scanner or camera may capture images at 2000x3000 pixels, a typical YouTube animation is perhaps 640x360 pixels (in my case, 533x400 pixels). Consider your final output size, requisite image quality, and the processing power of your computer. Working with smaller file may save you a lot of working time.
I am on Linux (Ubuntu), and I use shell commands to batch process the images. The commands some from the suite “imagemagick”. To install these shell utilities on an Ubuntu system, enter:
sudo apt-get install imagemagick
Then you can use batch processing commands such as:
mogrify -verbose -resize 533x400 -quality 60% *.jpg
(You can also use mogrify to batch-convert file formats, but that is not necessary here.)
However you obtain, process, and crop images, the end result should be a directory with a sequence of images in it. This directory will be used in the next step.
Create a frame-list file
Once you have your sequence of images processed and edited to taste, make a list of the images and save it in a text file with the suffix .lst (the first character is an “el”; the suffix stands for “list”). You can do this from the command line in a *nix system by navigating to the directory with the images in it, listing the images (ls *.jpg) and outputting the result (>) to a named file (such as “frame.lst”). The whole shell command is:
ls *.jpg > frame.lst
You may want to add a line at the beginning of the list file to specify the frame-rate of the animation. By default it is 24 FPS, but you may want faster or slower. In my case I want slower, so I added the line:
to the top of the file. This will set the frame rate at ten per second. A list file should look like this:
Import frame-list into Synfig
You will import the frame-list text file into Synfig the same way you would import any other image.
Start Synfig. To access the full menu controls, you need to left-click the square at the top left corner on the Canvas Window where the margin-rulers meet. Under Edit -> Properties… Set the canvas size to the same size as your images.
Next, set the duration to at least as long as your sequence. In my case, 158 frames / 4 FPS = 39.5s.
Then choose File -> Import… and the Import Dialog comes up. Navigate to the directory that has both the frame-list file and the images in it. Import the frame-list file.
Test the animation with View -> Play.
Choose File -> Render… and output to a .dv (digital video) file.
Unfortunately the current version of Synfig on the current version of Ubuntu (9.04) does not output small video files, such as the MPEG format. It claims it does, but no file is produced. In any case, the most universal compact video format is Flash video. To convert from .dv to .flv, use the shell command ffmpeg.
Convert bulky output using ffmpeg
Or, since I have already output a high-resolution (but very large) .dv file, I can convert it to .flv format using the shell command ffmpeg. Its syntax is:
ffmpeg -i [infile] -f [outfile format] -r [FPS] -s [(width)x(height)] [outfile].[filetype]
In this case,
ffmpeg -r 4 -i Dino-stopmotion4FPS.dv -f flv -r 4 -s 534x400 dino_stopmotion2.flv
This produces an .flv file which is 1.1 MB, compared to the original .dv file which is 138 MB!
NOTE 1: if I do not specify the size, the output is the same size as the .dv file output, but pixelization is a little more noticeable. I think I could tweak some options or parameters to increase visual smoothness, though that would increase file size.
NOTE 2: the option -r 4 may be unnecessary, because the FPS was already specified in the .dv file.
NOTE 3: the original file was 533x400, but ffmpeg requires a even-numeral pixel size. So I changed to 534x400; this worked, but it would be better to start with even-numbered pixels at the beginning.