Tag Archives: mencoder

Making of “Jai Ganesh – Yeh Jo Desh Hai Tera”.

As mentioned in my other blog, on the occasion of Ganesh Festival, me and my friend Sonam had taken nearly 4750+ photographs with the intention of making a small video. Keeping the efforts to take the photographs apart, we had spent more than a week to make a video from these photographs. We used both Linux and Windows softwares to make this video (Though I wish I should have used only Linux softwares :)). This blog outlines the method we followed.

1. Well, the first task for us to convert all photographs from original 4200×3400 to smaller resolution of 640×480, as it is pointless to have such high resolution for video. Manually selecting each files and converting to lower resolution using some photo editing softwares was painful (rather impossible), given that we had 4750+ photographs. So, we wrote a small shell script to convert all images to lower resolution, this script was run whole night and all photographs were converted in one go. This script uses ‘convert’ utility provided by ImageMagick. Below is the script,


#/bin/sh

for f in *.JPG; do
convert -resize 640x480 $f `basename $f`.jpg;
rm $f
done

2. The one special effect in the video are the clips which of made up of multiple-shot photographs. Nearly 300 photographs were taken to make a multi-shot clip of 30sec at the rate of 10fps. We used ‘mencoder’ provided by mplayer to encode all these photographs as a mpeg clip. Following command will generate an MPEG clip of 10fps using all photographs present in current directory.


mencoder "mf://*.jpg" -mf fps=10 -o 8.mpeg -ovc lavc -lavcopts vcodec=mjpeg

Don’t ask me what other options do in the above command. I really have no idea why they are needed also. It was just a copy paste from one of internet resource, and I am lazy, I didn’t had the patience to look what each options do šŸ™‚

3. Now its the time of making the actual video using multi-shot clips, other images and a music track. We tried various Linux softwares, like Cinelerra, KDEnlive, Kino, Lives etc. None of them proved good for our purpose, or probably we didn’t had the patience to learn them! We switched to Windows and used a software called ‘CyberLink PowerDirector Ultra 8.00’. This software has really cool UI interface which allow easy video editing, music track addition, transition effects etc. I must admit, there are few of things in which Windows out-performs Linux, hopefully this gap gets narrowed quickly.

4. Thats it. Our video is now ready MPEG format! One last step was to convert this video into FLV format, so that we can upload them in Youtube. Linux ffmpeg does it for us. It reduced the original size of 172MB into 32MB FLV file.

ffmpeg -i JaiGanesh.mpeg -b 600k -r 30 -ab 128k -ar 44100 -s 640x480 -ac 2 -y JaiGanesh.flv

Hope you enjoyed the video. Do drop you feedback. Jai Ganesh!. šŸ™‚