View on GitHub

Apache-get-video-thumbnail

Download this project as a .zip file Download this project as a tar.gz file

Apache Video Thumb Extractor is a module for Apache2 to extract an image from a video in a specific second, you also can resizing/cropping it to a given size and extract a storyboard(multiple video frames on sprite) from video.

Requirements

This module depends from some libraries (headers and shared objects) which has to be installed before it: To install FFmpeg from source with the specified versions follow the steps bellow:

git clone git://git.videolan.org/ffmpeg
cd ffmpeg
git checkout n0.8.7 -b tag_n0.8.7
./configure --prefix=/usr --disable-ffserver --disable-ffplay --enable-shared
make
make install

Requirements

All of these libraries was commonly distributed with "FFmpeg":http://ffmpeg.org or in "LIBAV"

LIBRARY VERSION
avformat >= 53.4.0
avcodec >= 53.7.0
avutil >= 51.9.1
swscale >= 2.0.0
libjpeg *

How to compile

You can run the tests, and see video.jpg and storyboard.jpg saved file from demo video

make test

To compile and install this module on your apache run the command bellow, this action will create a video_thumbnail.so file and put this your Apache module folder. Please check defines.mk file to set your path for installation. Use this till I create a easy way to install like using autotools *

make install

Apache configuration

To enable this module after installation edit httpd.conf file and in module section add
LoadModule videothumb_module [module_path]/mod_videothumb.so [module_path] => Apache Directory modules in your architecture *

How to use

After enable this module you can access using these urls This module can receive four parameters:

Extract an unique video frame:

http://your_host.org/thumbnails/bigbunny.ogg?second=30
http://your_host.org/thumbnails/bigbunny.ogg?second=30&width=640
http://your_host.org/thumbnails/bigbunny.ogg?second=30&width=640&height=360

Extract a storyboard frames(with(out) pagination):

http://your_host.org/thumbnails/bigbunny.ogg?height=100&split=30
http://your_host.org/thumbnails/bigbunny.ogg?height=100&split=30&columns=3
http://your_host.org/thumbnails/bigbunny.ogg?height=100&split=30&columns=3&currentPage=1&pageSize=9