Page 1 of 1
Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-21T00:55:31-07:00
by NeilF
Is it possible to (quickly) produce a thumbnail image from an AVI or MPG file?
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-21T21:38:56-07:00
by anthony
Generally the programs that generate the thumbnail use a specialized video program to grab a frame 1 minute into the animation or 1/3 through the animation (I prefer the latter). Once they have a frame they thumbnail and then add 'film strips and holes' along the edges.
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-22T00:21:43-07:00
by NeilF
anthony wrote:Generally the programs that generate the thumbnail use a specialized video program to grab a frame 1 minute into the animation or 1/3 through the animation (I prefer the latter). Once they have a frame they thumbnail and then add 'film strips and holes' along the edges.
So imagemagick can't do anything like this? ie: Grab even just the first frame from a video?
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-22T16:20:54-07:00
by anthony
It can, but does so by calling another 'delegate' program to decode the video.
Imagemagick is often used by video processing programs, but for processing individual images, not for actual video processing in.
For some information on video handling with IM see.. IM examples, Common Image file formats
MPEG, M2V and AVI
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-22T16:47:09-07:00
by fmw42
Anthony, I think the issue is one of speed! The question I think really is, will IM with the appropriate delegate have to open/read all the frames from the video, just to get to and convert even the first frame or will it have random access to any frame without opening/reading all the other frames of the video.
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-22T18:14:24-07:00
by anthony
As it is using a delegate it will problem do that, but I can be certain without looking into it further
In any case for video IM is probably not the right tool. For processing the frame once you have it IM is the right tool!
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-23T01:25:48-07:00
by NeilF
anthony wrote:It can, but does so by calling another 'delegate' program to decode the video.
Imagemagick is often used by video processing programs, but for processing individual images, not for actual video processing in.
For some information on video handling with IM see.. IM examples, Common Image file formats
MPEG, M2V and AVI
Thanks for that! So the link you gave, seems to suggest not to use image magic to grab a thumbnail for a video? Instead you'd use (for example) "mplayer" or "mencode" to grab a thumbnail (from somewhere near the start of the video) which you'd then pick up and further manipulate (if necessary) with ImageMagick?
From your example, I'd issue a command something like this to grab a single frame 5 seconds into a video:-
mplayer file.avi -vf scale=320x240 -ss 00:05 -ao null -vo png:z=3 -frames 1
Re: Produce a thumbnail from an AVI for MPG?
Posted: 2010-08-23T19:41:17-07:00
by anthony
That is the recommendation.
however 5 seconds in a typical video is usually blank, or highly variable title area.
I recommend getting a thumbnail 1/3 of the way through any video to get a thumbnail that has a better chance of getting something reasonable to use a thumbnail.