Page 1 of 1
Re: Video frames to one image
Posted: 2009-01-19T03:49:03-07:00
by Xist
ffmpeg
Re: Video frames to one image
Posted: 2009-01-20T18:35:30-07:00
by anthony
You would extract (somehow) every N'th frame and then merge them together using the appropriate compositing method.
For the examples given the moving element is always darker than the background, so a -
compose Darken will do the trick...
convert video.mpg'[100,200,300,400]' \
-compose Darken -flatten merged_image.jpg
However you might get noise problems, as the darkest 'noise' pixels get preserved as well.
Other techniques involve isolating the 'changed' parts from a known 'background' image, to generate overlay masks. A two image example of this is given in IM Examples, Photo Handling, Double Exposers.
http://www.imagemagick.org/Usage/photos/#double
If you can provide use with an example video (preferably with just the desired frames, and a starting background image) then I can do a few experiments for you.
And please report what you discover back here for others, and posibly to let me add the final technique to the IM Examples, Video, page.
Re: Video frames to one image
Posted: 2009-01-24T12:06:11-07:00
by dognose
I'm interested in this idea as well.
Here is a pic I'm using to try play with.
Re: Video frames to one image
Posted: 2009-01-24T12:50:06-07:00
by dognose
[url=
http://imageshack.us]Can you compose multiple images in one command?
If I use convert in.gif[0,1,2,3] -compose darken -flatten out.gif I get a black image.
Presumably the background color is being set to black by the GIF image file, so naturally black is darker than all the other frames.
Try this
Code: Select all
convert in.gif[0,1,2,3] -background white -compose darken -flatten out.gif
As the first frame is darker than white it will replace the initial white background frame.
Re: Video frames to one image
Posted: 2009-03-02T22:37:30-07:00
by yudhist39
D:\wamp\www\ffmpeg\test_media>convert robot.avi robot.jpg
convert: Improper image header `robot.avi' @ avi.c/ReadAVIImage/1234.
convert: missing an image filename `robot.jpg' @ convert.c/ConvertImageCommand/2
710.
can anybody tell me, what's wrong with that error?
FYI, i'm using ImageMagick 6.4.7 Q16
Re: Video frames to one image
Posted: 2009-03-04T16:13:06-07:00
by anthony
AVI is more of a meta file format with litterially hundreds of file formats (codecs) all known as AVI. IM can not know them all directly, though it does try.