Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

How to convert multiple JPG pictures into a video slide.

  1. When I returned from Rome, I had many pictures. I wanted to see them on TV in an AVI container.

  2. I found many examples in the web, showing how to do it. It also worked great on the computer, using mplayer on debian linnux (lenny). It did not work well on TV.

  3. In this page I shortly describe the easy way and explain what I did to remove distortion and reduce the rate of picture change as well as how to add sound to it.

  4. Most examples suggest something like this:
    ffmpeg -f image2 -i foo-%03d.jpeg foo.avi

  5. This requires all pictures to be numbered like: rome_000.jpg rome_001.jpg, ...

  6. A single linux command can handled this:
    x=1; for i in $(find ../ -name "*.jpg"); do counter=$(printf %03d $x); ln -s "$i" rome_"$counter".jpg; x=$(($x+1)); done

  7. As said before, it worked great on PC, but did not on the TV.

  8. To cope with that I needed to check for the right ffmpeg parameters as well as rate.

  9. The correct parameters are shown below:
    ffmpeg -y -loop_input -f image2 -i "$1"%05d.jpg -i "$2" -r 24000/1001 -qmin 2 -vframes 1440 -s hd720 -aspect 16:9 -bufsize 1835k -maxrate 9800K -minrate 9000K -b 9000K "$3".avi

  10. The first parameter, $1, is the jpg name prefix, the second is the backround MP3 music and the last one is the output file name.

  11. Last but not least is the script to create the numbered soft links to the assorted JPG pictures.

  12. The script gets an input list file, which holds the files in the movie. One way to generate it is by:
    find ../ -name "*.jpg" | sort > a.txt.

  13. The script is invoked by the following command:
    perl ~/bin/movie_make.pl a.txt

  14. The script can be downloaded from:
    perl script

 



Home

Send mail with Kmail & DCOP

Download Area






Search This Site




new pages on this site