简体   繁体   中英

Video thumbnail generation imagemagick?

I have been searching for an alternative to ffmpeg (I'm on a host that doesn't allow ffmpeg or mencode due to server power or something) and I was looking into GD or Imagemagick (both of which are installed) is there a way to generate a video thumbnail from either of these two libraries or another one?

I also have the option of using ruby on rails or python or CGI/perl to do the generation. But I'm not skilled in either of those languages so I would need a tutorial or script already wrote.

Anyone help?

Imagemagicks Convert can do video tumbnails.

convert -quiet moviefile.mov[10] movieframe.gif

where the number between the [] is the framenumber of the movie that is converted

In fact, ImageMagick just uses ffmeg under the hood. If ffmpeg is not installed, you'll have no luck using ImageMagick

As tijej said you must need ffmpeg in order to use ImageMagick. If you are OK with that you can also use FFmpeg::Thumbnail module.

Sample:

my $baz = FFmpeg::Thumbnail->new( { video => '/my/video/file.flv' } );
$baz->output_width( 640 );
$baz->output_height( 480 );
$baz->offset( 21 );
$baz->create_thumbnail( undef, '/my/first/thumbnail.png');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM