• No results found

Stopmotion is simple and to the point, with a nice drag-and-drop interface

In document COOL PROJECTS (Page 86-90)

point, with a nice drag-and-drop interface. It’s not designed for heavy post-production or for drawing and adding effects to frames. Rather, the point is to give users an easy way to arrange images sequentially and export them into a video file.

The video import and export options are limited only by your imagination (and your knowledge of the command line). If you know how to use FFmpeg and/or MEncoder to convert image sequences to video, you can pass your desired command-line arguments to Stopmotion, which is essentially a GUI for those programs. Stopmotion also gives you several choices of video capture commands for grabbing video from your Webcam or another attached device.

One cool feature I didn’t know about until I read the user’s handbook was the option to add sound. You can set a sound clip to start at any given frame by double-clicking on it. The audio I added to my sequence didn’t play in the exported AVI, but maybe you’ll have better luck.

If you want to perform more-advanced editing on your individual frames, Stopmotion has a button to open a selected frame in GIMP.

You also can export your data into Cinelerra for video editing.

script that does exactly what its name suggests—converts a sequence of *.jpg files into an AVI movie. If your images are not in the JPEG format, you first can convert them using the convert command from ImageMagick:

convert image.png image.jpg

If you need to convert a batch of images in a folder, ImageMagick grants you about a gazillion different methods. One of these is to cd to that directory and do:

convert *.png image.jpg

The new filenames will be numbered automatically.

Once you have your folder of

sequenced JPEG files, you can employ jpegtoavi. A basic usage template from the man page is:

jpegtoavi -f fps width height img1 [img2 ... imgN]

Although jpegtoavi is nice for simple tasks, minimal documentation exists. I was surprised to find that none of the main Web sites hosting downloads of the software provided any type of wiki or instructions beyond what already was in the man page and README.

You can do more-advanced encoding with FFmpeg and MEncoder, both of which are heavily documented on-line and in their man pages. These programs both rely on libavcodec and have many overlapping uses, but the command formats are different. For this article, I cover only FFmpeg.

This will convert a folder of GIF files sequenced as “image-001”,

“image-002” and so forth into an MP4 movie file with a framerate of 10 frames per second and a reasonably high bitrate of 1800:

ffmpeg -r 10 -b 1800 -i image-%03d.gif movie.mp4

Make sure your files are named properly, because encoding will stop early if the program encounters a gap in the number sequence.

Abstraction

For most of us, the notion of

animation brings to mind deliberate, structured sequences. In this section, I introduce some less-traditional ways of creating mind-blowing, computer-generated effects without having to know languages like Processing or Pure Data (both of these are very powerful, but not everyone who wants to animate knows how to code).

In my own work with video, screen recording tools have been indispensable. Sometimes I use them to capture animations I make in Pencil, because the movie export feature is broken in the version I use.

Other times, I just want to capture some cool imagery on my screen without worrying about proprietary copyrights, so I take screen recordings

Figure 5. Using recordMyDesktop to Capture Electric Sheep

high-bandwidth network connections, the GIF art form is not so limited in resolution and number of frames as it was in the 1990s when tiny GIF animations originally rose to popularity in Geocities and Angelfire home pages. Modern GIF animations often display entire scenes from movies.

So, are you ready to pimp out some mad GIF skills?

With ImageMagick, it’s easy to fashion an animated GIF from a sequence of non-GIF images:

cd /path/to/image/folder ; convert *.jpg animation.gif

The mother of all command-line GIF manipulation programs though is Gifsicle.

Your images must already be in the GIF format to use it.

To create a GIF that animates just once, do:

gifsicle image1.gif image2.gif image3.gif > animation.gif

In most cases, you’ll want your animated GIF to loop endlessly. You also may want to specify parameters, such as framerate. Try this for a dithered animation that loops at 10 frames per second:

gifsicle --loopcount=0 --delay 10 --dither image1.gif ➥image2.gif image3.gif > animation.gif

You also can use Gifsicle in reverse mode—that is, to extract the individual frames from an animated GIF. Just use the --explode argument:

gifsicle --explode animation.gif

Now, go out (and by “out”, I mean to your nearest terminal) and explore all the neat tricks you can do with Gifsicle!

Here’s one more to wet your feet:

Take a ready-made animated GIF with a white background and make it transparent:

gifsicle --transparent '#FFFFFF' --disposal 2 ➥animation.gif > animation-transparent.gif

of free software.

My preferred screen recorder is the bare-bones, command-line version of recordMyDesktop. Your distribution’s repositories also

might provide the graphical front ends GTK-recordmydesktop and QT-recordmydesktop, but I find those to be buggy and prone to crashes when recording long scenes. You can Figure 6. XaoS with the Pseudo-3D Filter Applied

XaoS is a real-time, interactive fractal

In document COOL PROJECTS (Page 86-90)