Image Slide Show Video?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Image Slide Show Video?

Post by agriz »

Is it possible to create image slideshow video with some effects?
Output that slideshow to .flv?
rich2005
Posts: 32
Joined: 2012-04-09T11:07:36-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by rich2005 »

IM can convert animations to mpeg video (uses ffmpeg) but for a slideshow + transitions + various output incl flv (why flv?) try
http://download.videohelp.com/tin2tin/features.html
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

mpeg is also, Is it possible with imagemagick without using other external software?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image Slide Show Video?

Post by fmw42 »

For unix or windows with cygwin, I have two scripts that do transition animations between two images. See transitions and fxtransitions at my web site link at the bottom of the post.

I am not a Windows user, and I am not sure that IM supports Flash format flv. See http://www.imagemagick.org/script/formats.php#supported
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

I have already seen your scripts. They are shell scripts probably for advanced users :)
I didn't know anything about shell :)
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

Without using any transitions how do i do the slideshow in IM?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image Slide Show Video?

Post by fmw42 »

agriz wrote:Without using any transitions how do i do the slideshow in IM?
You just do

convert -delay XX image1 image2 ... imageN -loop 0 animation.gif

You probably can only save the animation to gif. If you want to convert to other video formats and keep the animation properties such as looping, you may need to subsequently follow the above with the use of the video delegate such as FFMPEG or some other application to do the conversion.

see the response at viewtopic.php?f=1&t=21496

and
http://www.imagemagick.org/Usage/anim_basics/
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

Thanks for the info.
Everything is working good.

You mentioned ffmpeg. Can it do slideshow with transitions?
rich2005
Posts: 32
Joined: 2012-04-09T11:07:36-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by rich2005 »

@agriz
I had a quick search and it looks like you are using Fedora.

What can you do with ffmpeg (for windows users, a 'slightly limited' version comes with IM).

First thing is transitions, forget these. It is possible using a video frame-server called Avisynth. A windows application, does run with WINE but very complicated.

Without transitions not too difficult. Collect your images and convert them all to the same size and png or jpg format. This is probably the only IM specific bit in the process. Best if you work in a project folder.

The basic ffmpeg command line is

ffmpeg -loop_input -i <name>.png -r 25 -t 10 -qscale 5 <name>.avi

you can look up the all the ffmpeg parameters but -r is the frame rate, -t is the duration in seconds.

do this for each slide, and if you keep the naming simple you might end up with 01.avi, 02.avi, 03.avi ...

Now join them together with
cat 01.avi 02.avi 03.avi > final.avi

This invariably breaks the video header so to fix and get to a final video use ffmpeg again
ffmpeg -i final.avi final.flv (or anothername.avi or mpg )

I still think you are trying to re-invent the wheel. You could try a video editor such as Openshot.
There is a version for Fedora http://www.openshot.org/download/ Not as convenient as a dedicated slideshow maker but very flexible. Outputs to all sorts including flv.
screenshot. http://i.imgur.com/82S4L.jpg
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

rich2005 wrote:@agriz
I had a quick search and it looks like you are using Fedora.
Wow! How do you know this?
Thanks for the other information.
I will have a look on Openshot!
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

fmw42 wrote:For unix or windows with cygwin, I have two scripts that do transition animations between two images. See transitions and fxtransitions at my web site link at the bottom of the post.

I am not a Windows user, and I am not sure that IM supports Flash format flv. See http://www.imagemagick.org/script/formats.php#supported
http://www.fmwconcepts.com/imagemagick/transitions/
here, you have lot of transitions. I am really having difficulty in understanding the script.
Can you share your script for just one traditions with two/three images only?

If i understand that simple shell script, then i believe i can understand the whole part!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image Slide Show Video?

Post by fmw42 »

I have to go out for a while now, but I will get back later today.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Image Slide Show Video?

Post by agriz »

Additionally, Why can't we use morph for this? I have seen morph producing some animation between two images. Is it bad to use?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image Slide Show Video?

Post by fmw42 »

agriz wrote:Additionally, Why can't we use morph for this? I have seen morph producing some animation between two images. Is it bad to use?
No, it just does not do any complex transition effects, only a uniform fade transition.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image Slide Show Video?

Post by fmw42 »

Can you share your script for just one traditions with two/three images only?
The script is rather simple and explained at the bottom of the transitions page.

What is does is:
User creates a grayscale mask image that will define the kind of transition. The mask should vary from black to white in some manner.
The script then does a composite of the input images with the mask whose brightness is controlled by the frame number.
To start the first image is copied to a temporay gif file. That allows the animation to show the first image only.
As the brightness is increased for each subsequent frame, the two images are blended via the composite with the modified mask.
When the last frame is reached, the brightness of the mask has be made to be totally white. Thus only the second image shows.


i=1
frames=$((frames-1))
while [ $i -le $frames ]; do
aa=`convert xc: -format "%[fx:100*$i/$frames]" info:`
convert $infile1 tmp0.gif
convert $infile1 $infile2 \( $maskfile -evaluate add $aa% \) -composite miff:- |\
convert -delay $delay tmp0.gif - tmp0.gif
i=$((i+1))
done
convert tmp0.gif -loop 0 $outfile
Post Reply