To create video thumbnails, if you search on google, you might get plenty of free softwares. Howover, to use them in a program may be cumbersome job because of GUI issues. For the command line tools, I figured out ffmpeg is the best option available. But there is one problem with it. It has two licenses GPL and LGPL. with GPL, you can not have a software for commercial purpose. However, with LGPL, you can develop a commercial software but in this license, you have to compile ffmpeg yourself and some of the featuers are reduced. Another opton is to use gstreamer-ffmpeg as gstreamer comes with LGPL license. However, it is not clear how things will work.
On ubuntu, it is easy to install a LGPL ffmpeg and a simple command can create thumbnail for you.
Installation of ffmpeg with LGPL license.
cd dev_area
git clone git://git.videolan.org/ffmpeg
cd ffmpeg
./configure --disable-gpl
make
make install
when you do the ./configure --disable-gpl, you should see at the end 'LGPL license'. Once installed, you can start creating thumbnails of your video.
Creating thumbnails of a video
for example, the following shell script create thumbnails from a given video file at different times.
for i in 4 8 12 16 20 24; do
ffmpeg -itsoffset -$i -i /localscratch/dev_area/test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test$i.jpg
done
Other options
VLC can also be used to create video thumbnails. But I could not make it work on ubuntu machine. However, if you are interested to explore it further, please have a look at the following URL. I am planning to use its snapshot options to see if they work.
mplayer can also do this, but not tested.
No comments:
Post a Comment