How to convert JPG to AVI in linux

Written by joshua laud | 13/05/2017
How to convert JPG to AVI in linux
(Comstock Images/Comstock/Getty Images)

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.


By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.