EDIT: Just been told there’s another way to do this using ffmpeg, I might add this in once I’ve had a play with it. Show ▼
This is just a quick post. It’s something I’ve always wanted to do, but never got round to it and minecraft was the best excuse to do it with. Video I made is embedded at the very end (or you can click here to watch it now: http://youtu.be/JdQxXj5czrU).
How I Made The “Frames”
Basically I took many screenshots in minecraft, roughly about 3-6 screenshots per section I wanted to show in the video, using the F2 key. I did this on my laptop using the “Play Offline” feature, and setting my server to allow anyone. So I showed up in game as “Player” and set him where I wanted the “camera”. I then logged into Minecraft on my workstation using my normal account. Then I began building, every so often taking 3-6 screenshots with the laptop.
How I Rendered The Images
Now obviously I’m going to assume before you started taking screenshots that you cleared out your previous minecraft screenshots folder (or webcam stills, whatever), and that your folder is full of images that you want to make into a video only. The screenshots folder is found at “/home/your_user/.minecraft/screenshots/” without quotes. Since these are terminal commands, you’ll need to “cd” to that folder when you want to render.
Step 1: Installing “mencoder”.
First you’ll need to install “mencoder” since this is what makes the initial video. This is found in most distros repos. I’m using Ubuntu 10.10, but should work for all. Do this with the following (you should be able to find it in the software centre too):
sudo apt-get install mencoder
Step 2: Creating a file with list of images.
Now we’re going to cd to the screenshots folder, and we’re going to make a file with a list of all the images in the correct order as stated by modified date/time. This is going to be used by mencoder so that it creates the stop-motion video. To make this file we’re going to do this:
ls -1tr > files.txt
You can name the file anything you want, in this example I’m using “files.txt”, however make sure you remember what file name you give it, and please note that’s a one (1) not a lower-case L. The -1 is so that each file is on its own line, t is to list by the modified time/date, and r is for reversing the order. Please check the man pages (command: man ls) if you want to use other options. I find this the best way to do it however.
Step 3: Render the video! \o/
Now that we have our file full of all the images we’re going to be using on each line (and in the correct order), we now need to finally render it into a video. Now I’m not going to go into details about the options I have picked, but it basically outputs into a raw video file (~200MB for a 1 minute long video) and is great for editing should you wish to do so. Anyways, on with the command line stuff!
mencoder -nosound -ovc copy -lavcopts vcodec=mpeg4 -mf fps=6 mf://@files.txt -o video.avi
The important thing to note by the way, is the -o option – this is to set the filename of the output. You can call this whatever you like, I just chose “video.avi”. Also note that vcodec is which codec we’re going to be using (in this case mpeg4), the -ovc copy is how I’m making this video output as raw video (basically a direct copy of the images), and one last thing I should mention is you’ll notice fps=6 – This basically defines what the framerate is, I set this to 6 because I was using ~6 images each time. However have a play with that number until you get the right results your after. Doing it this way takes less time, since it doesn’t have to process very much. Plus you get quality as good as the images your working with, which is perfect.
Step 4 (optional): Edit video, add sound.
You don’t have to do this, but well ~200MB is a bit much to upload to things like YouTube (plus it has no sound!). So I used PiTiVi Video Editing software that comes with ubuntu to import the video and song of my choice. And then rendered it how I liked it. I use MP4 Muxer with default options, because the size is decent at the end, and looks reasonable for the end quality (and works in YouTube).
That’s everything! We’ve just made a stop-motion video file! With that, I shall now present my first ever stop-motion video, using the medium of Minecraft! The song used is released under the Creative Commons licence (info in the video description), the pictures were designed by me (using popular ideas as a base), and the game used is Minecraft which is owned by Mojang. Enjoy!



