How to convert JPG to AVI in linux

Updated July 20, 2017

If you have a folder of JPGs that you want to convert into a video AVI slide show, you can use the FFmpeg tool. FFmpeg is a multipurpose multimedia converter that is bundled with many Linux distributions. You can easily install it if isn't already installed. With FFmpeg you can convert a directory of JPGs into an AVI. To convert the directory of JPGs, they must all have the same prefix, for example, "image 1," "image 2," and so on.

Open your Linux terminal. This process differs depending on which version of Linux you have. Consult your documentation if you are unsure.

Type "ffmpeg" and press "Enter" to test if you have the application. If you receive an error, then type "sudo apt-get build-up ffmpeg" and press "Enter." This will set up the software.

Type the following into the terminal:

ffmpeg -f image 2 -i /path/to/image/directory/prefix%d.jpg /path/to/destination.avi

Replace "/path/to/image/directory" accordingly, and replace "prefix" with the image prefix. For example, if images are called "holiday 1," "holiday2" and "holiday 3," then it should read "holiday%d.jpg." Replace "/path/to/destination.avi" appropriately depending on your preference.

Press "Enter" to create your video from the JPGs.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Joshua Laud started writing professionally in 2008. During his three years at University he worked freelance for various music publications including "Clash Magazine" and "total:spec," and online Data Transmission and Music is Art. Laud also specializes in technology writing. He has a Bachelor of Arts in English literature from the University of London.