Monday, September 12, 2011

Thumbnails creations overview: Imagemagick for pictures form videos

First of all, I need to create thumbnails of various types of document.
Pdf, video, doc, xls...... ecc.....
Pdf:
Ensure to have imagemagick already installed....
In case of not, you give:
 
apt-get install imagemagick

For thumbnail of pdf document you give:
convert -thumbnail 200x200 document.pdf document_preview.png
where 200x200 is the height for width you want to give to the  document_preview.png
In case of more than one pages for pdf document, you can give directly the page you want to obtain the preview image:
convert -thumbnail 200x200 document.pdf[0] document_preview.png

Video(avi):
Install ffmpeg
apt-get install ffmpeg
install ffmpeg.
So give the follow command:
ffmpeg -itsoffset -4 -i xxx.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 95x155 yyy.jpg

No comments:

Post a Comment