Produce a thumbnail from an AVI for MPG?
Produce a thumbnail from an AVI for MPG?
Is it possible to (quickly) produce a thumbnail image from an AVI or MPG file?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Produce a thumbnail from an AVI for MPG?
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Produce a thumbnail from an AVI for MPG?
So imagemagick can't do anything like this? ie: Grab even just the first frame from a video?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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Produce a thumbnail from an AVI for MPG?
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Produce a thumbnail from an AVI for MPG?
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Produce a thumbnail from an AVI for MPG?
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!
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!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Produce a thumbnail from an AVI for MPG?
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?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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Produce a thumbnail from an AVI for MPG?
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/