Mobile app version of vmapp.org
Login or Join
Dunderdale272

: Thumbnails for videos in multiple formats? I have some intranet training videos made over the years in a bunch of formats (AVI, WMV, MOV, RealPlayer) and would like to provide something like

@Dunderdale272

Posted in: #Images #Thumbnail #Video

I have some intranet training videos made over the years in a bunch of formats (AVI, WMV, MOV, RealPlayer) and would like to provide something like a preview function - maybe a thumbnail animated GIF with a few representative screens, or maybe a thumbnail sheet I can show the user with an image every few seconds of video. Is there an easy image tool I can use that can create such things?

Platform agnostic would be great, but it's a one off (for now, haha), so Windows, Mac, or Linux would be fine. Thanks.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

4 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

I think Flowplayer (It's very good documented and with many examples) or something similar is a better solution as a snippet which you maybe have to edit or maintain.

Once FlowPlayer is configured right, it can serve thumbs without loading the full video. It's a little bit tricky to configure this, but once it's work you have solid, multiplattform solution. (And with a click on the thumb the video plays ;-))

If you choose flowplayer, you should also take a look at video4all (uses html5 with flowplayer as fallback) and the flowplayer-plugins.

10% popularity Vote Up Vote Down


 

@Ravi8258870

I have already answered how to do this on Stack Overflow here using ffmpeg and PHP.

Sorry about the code-centric answer but doing this in a batch process is most easily done by writing some actual code.

/**
* ExtractThumb, extracts a thumbnail from a video
*
* This function loads a video and extracts an image from a frame 4
* seconds into the clip
* @param $in string the input path to the video being processed
* @param $out string the path where the output image is saved
*/
function ExtractThumb($in, $out)
{
$thumb_stdout;
$errors;
$retval = 0;

// Delete the file if it already exists
if (file_exists($out)) { unlink($out); }

// Use ffmpeg to generate a thumbnail from the movie
$cmd = "ffmpeg -itsoffset -4 -i $in -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 $out 2>&1";
exec($cmd, $thumb_stdout, $retval);

// Queue up the error for processing
if ($retval != 0) { $errors[] = "FFMPEG thumbnail generation failed"; }

if (!empty($thumb_stdout))
{
foreach ($thumb_stdout as $line)
{
echo $line . "n";
}
}

if (!empty($errors))
{
foreach ($errors as $error)
{
echo $error . "n";
}
}
}


Doesn't get much more cross-platform than that.

Here's a breakdown of the flags:


-itsoffset flag is the time in the video that the snapshot is taken
-vcodec is the output type (change to png for png, etc...)
-vframes is set to one because you're extracting only one frame (IE an image)
you may also need to add -deinterlace


That's about it. Doesn't get much easier than that. If you're doing multiple screenshots for a movie just change the -itsoffset flag. Other than that, it's a complete package unless you chose to add better error information or suppress outputs.

10% popularity Vote Up Vote Down


 

@Caterina187

Can't miss the holy grail of video systems, FFMPEG. It does just about everything you might need to in online video--take in multiple formats and convert to another, thumbnail, etc. A heavily modified industrial variation of FFMPEG is what allows YouTube to work the way it does.

Here's a quick command line tut for thumbnailing: blog.prashanthellina.com/2008/03/29/creating-video-thumbnails-using-ffmpeg/
There's many other tuts out there for all its other features.

10% popularity Vote Up Vote Down


 

@RJPawlick198

I just thought that this should be easily done in python and a Google search for "python video thumbnail" results in this site:
notbrainsurgery.livejournal.com/29773.html
You might try the sourcode provided there...

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme