How to Make a GIF From a Video Using VLC and GIMP

Create Gif Vlc Gimp Featured

No matter how you pronounce GIF, you can’t deny that GIFs are a major force in Internet humor. They’re exceptionally useful on the Web, as they allow you to use a lightweight form of animation that can bring some life to your content without the performance cost that comes with videos. This tutorial demonstrates how to make a GIF from a video using two open source programs: VLC and GIMP.

Good to know: check out this list of mobile apps that can help you create and edit GIFs.

Preliminary Steps

Before you can do anything, you’re going to need to install both VLC and GIMP. They’re both free and easily accessible for Windows, macOS, and Linux.

Windows and macOS

You can readily download VLC and GIMP for Windows and macOS directly from their respective developers. Download both and install them. You also need FFMPEG, another open-source program, to break up your video into frames. This is a command-line audio and video converter.

On Windows, add the utility to the Windows PATH (C:\ffmeg\bin.) Also, make sure you move the install FFMPEG folder to your C:\ drive.

On Mac, you’ll also have to add the FFMPEG directory to the path file via a terminal window using the following command. Replace [FFMPEG directory] with the path to the FFMPEG directory.

export PATH=$PATH:[FFMPEG directory]

As a bonus, these are actually free software, not freeware, so you won’t get bloatware nonsense in the installers.

Linux

On Linux, you can install VLC, FFMPEG, and GIMP through your package manager, if you don’t already have them. Download the programs from their corresponding developer pages.

Ubuntu/Debian

sudo apt install vlc gimp ffmpeg

Fedora

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install vlc gimp ffmpeg

Arch Linux

sudo pacman -S vlc gimp ffmpeg

Tip: you can use your Android device to remove sound from videos.

1. Create a Clip with VLC

To create a GIF from a video using the programs you’ve just downloaded, you will need a video, which you should cut up in several frames to make your GIF. VLC has a couple of ways to cut a video, but this one is the most straightforward.

VLC has built-in recording capabilities for you to create your clip from an existing video. The first step is to enable the recording controls.

On the main menu across the top of VLC, click on View. Check the box next to Advanced Controls. The controls will appear at the bottom of the VLC window above the normal VLC controls.

Enabling Advanced Controls in VLC.

Open the video that you want to extract your clip from. Use the slider to search through the video for the part you want to convert into a GIF, and locate the start point of your clip. Place the slider right where you want it to begin recording.

Once you’re where you want the clip to begin, click the red circle button at the bottom to start recording. Allow the video to play to where you want your clip to end. Then, press the record button again to stop it.

Extracting a part of a clip using VLC.

Your clip will be located in either C:/Users/Username/Videos or ~/Videos for Windows and Linux, respectively. Sometimes Linux will also place it in your /home directory. The video will begin with vlc-record, followed by the date. You can rename the clip whatever you would like.

FYI: read on for more tips on how to use VLC as a video editor.

2. Separate the Frames with FFMPEG

GIMP doesn’t work directly with video files, so you’re going to need to convert your clip into frames. That’s where FFMPEG comes in. This tool can convert all sorts of multimedia, but it’ll break your clip into individual frames.

Before proceeding, we suggest moving the video you created in the previous step to the FFMPEG folder on the C:\. Create a new subfolder called frames.

Open a terminal window in that directory. In Windows and most Linux desktop environments, right-click in the window to get a menu that allows you to open a terminal window. On Mac, use Spotlight search to open a terminal window.

In that window, type the following command to use FFMPEG to break up your clip. Make sure you replace name-of-clip.mp4 with the actual name of your video, as well as its specific format. In this example, we renamed our clip video-sample, and it’s in AVI format.

ffmpeg -i name-of-clip.mp4 -r 15 frames/image-%3d.png
Executing command in PowerShell.

It may take a few minutes, but FFMPEG will break your file down to its frames at a rate of 15 frames per second, and place the resulting images in the frames folder that you created.

Frames folder view in "C:\" drive.

3. Turn the Clip into a GIF with GIMP

You’re finally ready to open GIMP, and start putting together your GIF. This part is very simple, but you can add to it as much as you want.

Open GIMP. Click on File -> Open as Layers.

Browse to the folder where you directed the frames to output from FFMPEG. Select all of the frame images. You can use Ctrl + mouse click or Shift + mouse click to select more at the same time. When you have them all, confirm with the Open button.

FYI: check out our cheatsheet for more GIMP keyboard shortcuts.

GIMP will create a new project and place each of your frame images as its own layer. These layers will be used to recreate the video as an animation when you export it to a GIF.

Also, make sure that your layers are in the correct order. If they aren’t, use the tiny arrows at the bottom of the layer space to move them around.

Edit Your Frames

This section is entirely optional. If you just want to make a GIF of the clip, with no alterations, you don’t need to do anything here. This part just covers, briefly, what to do when you do want to add something like text to your image.

Think of your layers as pages in a flipbook. Anything you add to one will appear in that frame of the GIF. To add text or something similar across multiple frames, you need to duplicate that text and merge it into each frame.

You can do this by right-clicking on the text layer, and selecting the Duplicate Layer option. Once the new text layer appears, right-click it, and select Merge down. You will need to do this for each of your frames.

Clicking on "Duplicate Layer" option in text layer context menu.

The same is true if you’d like to add animation or anything else. Remember that GIMP will treat each layer as a frame in the animation, so everything that you add needs to be merged into an existing layer.

Tip: learn how to draw arrows in GIMP.

Previewing Your GIF

Once you’ve added all the additional elements to your GIF, you can preview your creation by clicking Filters -> Animation -> Playblack. Press the Play button to see your GIF in action.

Opting for the playback option for GIF in GIMP program.

If you like what you see, click on Filters -> Animation -> Optimize your GIF. This is one of the last steps before saving your GIF.

Optimizing GIF in GIMP.

Save the GIF

Before you can export your GIF, you’re going to need to convert it from RGB to Indexed. It works better for GIFs, and it’ll allow you to reduce your file size. Go to Image -> Mode, and switch from RGB to Indexed. Set a maximum color palette to 127.

Converting image to indexed colors in GIMP.

Finally, you’re ready to export your GIF. Go to File -> Export As, and name your creation at the top. Don’t forget to add the .GIF extension at the end. In the next window, check the box next to As animation to automatically select the Loop forever option.

Saving new GIF using GIMP.

Congrats! You have a working GIF created straight from your video file. You can, of course, repeat this process with nearly any video file, and make all sorts of GIFs from anywhere.

Tip: did you know that you can sign a document with GIMP? Here’s how.

If you would rather avoid installing new programs on your PC or prefer creating the GIF using your mobile device, read on to learn about alternative methods to create a GIF.

Image credit: Flaticon, Flaticon, Wikimedia Commons All screenshots by Alexandra Arici.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Alexandra Arici
Alexandra Arici - Staff Writer

Alexandra is passionate about mobile tech and can be often found fiddling with a smartphone from some obscure company. She kick-started her career in tech journalism in 2013, after working a few years as a middle-school teacher. Constantly driven by curiosity, Alexandra likes to know how things work and to share that knowledge with everyone.