I am trying to generate video from images.
The following code generates the video, 1 frames per 3 seconds.
exec("ffmpeg -f image2 -r 1/3 -loop_input -shortest -y -i tmp/image%3d.jpg -i tmp/ag1.mp3 -target ntsc-dvd -s 1280x720 tmp/video.mwv");
I want to apply ken burns effect to it, I have searched a lot but couldn't find any solution.
Can anybody help me out ? If can provide any code snippet, will be really appreciated.
I don't think this can be done with ffmpeg alone. I have done this in the past with a tool called diascope. I never hear much about it, but it produces some of the best picture slideshows I have seen since you can use effects like Ken Burns. It does use ffmpeg in its final step to actually encode the video.
Take a look at the examples, it should be pretty straightforward.
It can be done with a combination of Imagemagick and ffmpeg. Use image magic to make a series of cropped images and ffmpeg to turn the series of images into a movie. Cropping the images with ImageMagick should be done along one or more vectors to create the "frames" that create the motion. All images will have to have the same outer dimensions of course (easy to do with ImageMagick), but you can create all kinds of frame by frame motion using the cropping and zooming tools in ImageMagick.
Ken-Burns can be applied with Mencoder. See Encoding with MEncoder. The PhotoFilmstrip program is like a GUI for Mencoder. It is Python-based and hence available for Windows (even as portable version) and Linux. For Linux there's also image2mpeg, but I haven't tried it yet.
Under Windows the free Microsoft MovieMaker can apply Ken-Burns too. Although it creates only WMV files MovieMakers GUI IMHO is way better than PhotoFilmStrips'. The silver bullet, however, is to apply MEncoder in a batch or shell script. As a start search for "mencoder syntax".
FFMPEG has https://ffmpeg.org/ffmpeg-filters.html#zoompan
Currently it does have some issues with shaky video motion.