While everyone online has enjoyed a GIF, very few know how easy it is to make one. You can easily take a video, cut out a clip, and convert it to a GIF with the help of two free open-source programs – VLC and GIMP.

Install GIMP and VLC

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

Windows

You can readily download VLC and GIMP for Windows directly from their developers. Grab VLC from videolan.org, and pick up GIMP at gimp.org. You’re also going to need FFMPEG, another open-source program, to break up your video into frames. You can get that one from its developers, too. Download all three and install them. These installers are extremely simple and straightforward. As an added 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. Ubuntu/Debian Fedora Arch Linux

Create a Clip with VLC

You definitely don’t want to make a GIF out of a full-length video. Before you can actually get to work making the GIF, you’re going to need to cut down your video file to just the size you need for the GIF. VLC has a couple of ways to cut a video down, but this one is the most direct.

Enable Advanced Controls

VLC has built-in recording capabilities that you can harness to create your clip from an existing video. The first step here is to enable the recording controls. On the main menu across the top of VLC, click on “View.” A drop-down will open to reveal the available options. Check the box next to “Advanced Controls.” The controls will appear at the bottom of the VLC window above the normal VLC controls.

Find Your Start Point

Open the video that you want to extract your clip from. Use the slider to seek through the video, and locate the start point of your clip. Place the slider right were you want it to begin recording.

Record Your Clip

Once you’re where you want to begin, click the big red circle button in the new advanced controls to begin recording. Allow the video to play to where you want your clip to end. Then, press the “Record” button again to stop it. Your clip will be located in either “C:\Users\Username\Videos” or “~/Videos” for Windows and Linux respectively. Sometimes Linux will place it in your “/home” directory, too. The video will begin with “vlc-record” followed by the date.

Separate the Frames

GIMP doesn’t work directly with video files, so you’re going to need to convert your clip into its frames. That’s where FFMPEG comes in. FFMPEG can convert all sorts of multimedia, but in this case it’ll break your clip into individual frames. Open your file browser, and browse to the location where your video file is. Create a new folder called “frames” in that directory. Now, open a terminal window in that directory. In Windows and most Linux desktop environments, you can right-click in the window to get a menu that allows you to open a terminal window there.

In that window type the following command to use FFMPEG to break up your clip.

It might 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.

Turn the Clip into a GIF with GIMP

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

Import Your Frames

Open GIMP. Click on “File,” then “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 + Click or Shift + Click to select more at the same time. (Check our cheatsheet for more GIMP keyboard shortcuts.) When you have them all, confirm with the “Open” button. 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 to a GIF.

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 really need to do anything here. This section 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 that you add to one will appear in that frame of the GIF. In order to add text or something similar across multiple frames, you need to duplicate that text and merge it into each frame. 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.

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 give you an opportunity to reduce your file size. Go to “Image,” then “Mode” and switch from RGB to Indexed. Set a maximum color palette to 127. Next, make sure that your layers are in the correct order. If they aren’t, you can reverse the order by going to “Layer,” then “Stack,” and reversing the order. Optimize the image even more by going to “Filters” and selecting “Animation.” Then, optimize for GIF.

Finally, you’re ready to export your GIF. You can find the “Export As” option under “File” in the menu. Name it what you like. 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.