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
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 Tumblr.com. 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 http://rujic.net
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Reply to comment | Linux Journal
3 hours 11 min ago - Nice article, thanks for the
13 hours 51 min ago - I once had a better way I
19 hours 37 min ago - Not only you I too assumed
19 hours 54 min ago - another very interesting
21 hours 47 min ago - Reply to comment | Linux Journal
23 hours 41 min ago - Reply to comment | Linux Journal
1 day 6 hours ago - Reply to comment | Linux Journal
1 day 6 hours ago - Favorite (and easily brute-forced) pw's
1 day 8 hours ago - Have you tried Boxen? It's a
1 day 14 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
That was the excelent and the
That was the excelent and the best article ever.Your ideas are so clear.
Toilettage chiens
apodio?
Hi
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 http://www.apodio.org
check out.
cheers
This site is very nice to
This site is very nice to commenting here. Thanks a lot.
Regards,
wanted
ffdiaporama
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
http://youtu.be/nRoBVkzyd3w
http://youtu.be/tKSc1hvHgLY
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
Awesome tutorial brilliant explanation indeed (Y)
Indeed, those were pretty
Indeed, those were pretty nice examples...
Mark
car insurance
Stopmotion is not dead
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?
Where is blender (www.blender.org) 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
What are you going to do with the blender?
Nina
car insurance
KDEnlive
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?
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.
http://www.kdenlive.org/
openshot and pitivi are worth looking at
two weeks ago, never having used NLE of any kind or done any production work, i made this in about 24 hours:
http://www.youtube.com/watch?v=ki4PFRn9kBQ
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
Excellent article, good to see some Linux' oriented things you would normally do on Windows.
WHere's synfig?
You forget SYNFIG (cartoon anomation)