Video Art: Experimental Animation and Video Techniques in Linux

Command Line

There are several ways to turn frames into motion via the command line.


jpegtoavi is a simple C 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.

Animated GIFs

If you're a citizen of the Internet, you've no doubt noticed the recent proliferation of animated GIFs on sites like Now that more people have access to 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


Rebecca "Ruji" Chapnik is a freelance creator of miscellanea, including but not limited to text and images. You can find her experiments at


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

That was the excelent and the

Pooja's picture

That was the excelent and the best article ever.Your ideas are so clear.
Toilettage chiens


apo's picture

nice article. Just for the info Puredyne is now a dead distribution. you should probably update your article.
there is other ones still updating their distro such as
check out.

This site is very nice to

anr's picture

This site is very nice to commenting here. Thanks a lot.


blackbelt_jones's picture

I'd always had problems with stopmotion, but about a year ago, I started using videoporama to render animations, with help from KDE live. Videoporama is a program for creating slide shows. I changed the setting to create a slideshow with one image per second, with no transitions (i.e., no fades, no wipes, etc.) More recently, Videoporama has been superseded by ffDiaporama.

So I load all my frames into ffdiaporama, and I get a video of all my frames playing at one frame per second. I can sync that up using the "speed" effect in kdenlive

Two examples

In the second video, the animated part of the video is at the beginning and the end. I'd take a 30 second clip, and use mplayer to generate about 900 frames:

mplayer -vo jpeg video.mpg

I use gimp to alter the individual frames, and put them together with ffdiaporama, then I used kdenlive's speed effect to sync up the the output to the the original clip, which I use as the source of the audio for the final version.

with my old pentium 4, it takes more than one rendering session. The first time I speed it up 1000 percent, the second time roughly 300 per cent. It syncs up very nicely.

It works just fine, but it's pretty time consuming. I'm looking forward to trying some of the tools I discovered here.

Awesome tutorial brilliant

Facebook Application Development's picture

Awesome tutorial brilliant explanation indeed (Y)

Indeed, those were pretty

Markymark's picture

Indeed, those were pretty nice examples...

car insurance

Stopmotion is not dead

Velmont / Odin H. O.'s picture

The last year, raffa of Cinelerra community fame, has started up Stopmotion again with the new name linuxstopmotion. She has two developers and they have fixed irritating bugs and are looking to make the software really nice and fast to use with dslr cameras.

Also, everyone and their dog starts making video editors... Its a very very hard problem. If anyone wants to make one they should join PiTiVi or Lumiera IMHO. :)

Where is Blender?

Mfoxdogg's picture

Where is blender ( in this list? Blender can do all those (except drawing) and is in one package, that's twice today i have seen articles like this but omit Blender

What are you going to do with

NinaN's picture

What are you going to do with the blender?

car insurance


jedi junior's picture

All my school friends that come over use KDEnlive without any problems even though they use mac-win at home.
Have been using it for 3-4 years now and it is the best video editor I have used on Linux.
What Im looking for is for something in Linux to do After Effects stuff...

Im planning to get serious about Blender this year. Its a really powerful tool but the learning curve is as steep as the first time I used Adobe Premiere.

No mention of Kdenlive?

Anonymous's picture

I can't believe that you failed to mention Kdenlive. It is a powerful but easy to use non linear video editor. Openshot is a good choice too but I find Kdenlive as easy to use but much more powerful. Both are actively updated. Kdenlive reminds me of Sony Vegas in many ways.

openshot and pitivi are worth looking at

nick black's picture

two weeks ago, never having used NLE of any kind or done any production work, i made this in about 24 hours:

it's nothing awesome, but it was more than i thought i'd accomplish in that time. it was mostly openshot, which crashed when you looked at it hard, but given enough instances would produce real output.

Excellent article, good to

Anonymous's picture

Excellent article, good to see some Linux' oriented things you would normally do on Windows.

WHere's synfig?

Anonymous's picture

You forget SYNFIG (cartoon anomation)