how to make .avi from .jpegs and add mp3 sound

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Level 3
Level 3
Posts: 140
Joined: Sun Jan 06, 2008 1:37 pm

how to make .avi from .jpegs and add mp3 sound

Postby mercier » Wed Nov 12, 2008 2:29 pm

images to avi:

1. make all .jpeg files same resolution in the same folder
2. open folder in terminal
3. run:

Code: Select all

mencoder mf://\*.jpg -mf w=704:h=520:fps=1:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi

where "w" and "h" represent the width and heights of your photos, and "fps" means frames per second. fps=1 means 1 frame (photo) per second. if you want them to move slower, 0,5 would mean 1 frame/ 2 seconds, and so on.

you'll get "output.avi" file with your photos.

add mp3 to avi:

4. copy mp3 file to the same folder
5. run:

Code: Select all

mencoder output.avi -oac copy -ovc copy -audiofile YOURPATHAUDIOFILE.mp3 -o final.avi

and thats it :D

you can play with the number of photos and fps value to make the file as long as the mp3 file.

i spent the best part of the last two days trying to master different programs like avidemux, kino, kdenlive, LiVES, images2mpeg etc. but this is what is so great about linux. some simple commands i found on the net.

hope this will help you. credit goes to the authors.


Re: how to make .avi from .jpegs and add mp3 sound

Postby tavta » Wed Dec 17, 2008 4:25 pm

Thanks, man! Exactly what I was looking for.

Return to “Tutorials”