Stop Motion Animation/Slideshow in Linux without Special Software
LinuxQuestions.org Member Success StoriesJust spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Stop Motion Animation/Slideshow in Linux without Special Software
I have written a tutorial on how to create stop motion animations or photo slideshows using only standard linux commands and video encoding software which comes with almost all Linux distributions. But given that there are many softwares written for Linux for this purpose, you may be wondering "why bother"? So firstly, let me give some motivation for this little project. If you are impatient and just want to cut to the chase, you can go straight to the article at
This project started when I wanted to create a short stop motion animation video or photo slideshow using some photos I had taken. There was not a great amount of motion in my photos and I did not want to create a very smooth series of animated motions, involving a very large number of individual frames. However, unlike a standard slideshow, I did want the individual images to be displayed for varying lengths of time to create a sense of movement at varying speeds in the animation. I also wanted to encode the resulting video in various formats for different purposes, ranging from displaying on a home computer or web page to a HD video for displaying on a large screen.
Since the animation I wanted to create was not very complicated and involved only a relatively small number of images, I started by looking at software for creating slideshows which allow for varying lengths of time each image is displayed. The first promising software I came across was Imagination, which is billed as a "lightweight and simple DVD slide show maker for Linux", which sounded just what I needed. Unfortunately, when I downloaded the source code and tried to compile it, I discovered it required an excessively new version of Gtk+2, which was newer than the version available on what was then the latest version of my Linux distribution, CentOS, so simply doing a 'yum update gtk+' just resulted in a message telling me I already had the most recent version installed. Being the lazy person that I am, I gave up at this point rather than trying to download the required version of Gtk+2 and installing it manually.
I next came across a stop motion animation software for Linux, Stopmotion. Although I succeeded in making a very short rudimentary test stop motion video, I found the software did not work as well as I had hoped. To cut a long story short, the version I built on my Linux distribution had some strange behaviours and lacked certain key functionalities, for reasons which I was again too lazy to investigate further in order to fix the problem. A more general criticism is that it only allows creation of frames by dropping individual images into a timeline (which I believe is typical of most stop motion softwares) - there is no way to automatically generate a large number of frames from the same image. This would be fine if there is a lot of motion and each individual image appears for only a fraction of a second. For my video (and for most slideshows in general), most images appear for over 1 second, and at 25fps, that means at least 25 frames per image. In fact, this is true to a large extent of most stop motion tutorials I've come across. They mostly assume that you are creating a stop motion animation in the "standard" way, where objects in a scene are moved in small incremental amounts and then photographed, and each shot corresponds to a single frame which is to be displayed for the same amount of time. However, if the images you shot are to be displayed for different lengths of time, or if the images were not shot in the same order as you want them to appear in the video (which is probably the case if you are creating a slideshow from a collection of images), then you need to come up with a way of generating the frames in the correct lexicographical order.
I noticed when trying to change the video encoding settings that Stopmotion was using either mencoder (which is part of the mplayer package) or ffmpeg to do the encoding, and it was simply allowing the user to edit the command line options to either mencoder or ffmpeg. At this point, I thought, if that was the case, I could just issue the mencoder/ffmpeg command directly from the Linux command line. This was how I ended up working out how to do the whole thing from the Linux command line, with the help of 3 short shell scripts that I've written, and without using any specialized software, other than mencoder or ffmpeg, which are included as standard with most Linux distributions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.