VirtualDub is a free and open source video editing/processing utility for Windows that has stood the test of time thanks to its versatility.
One of the lesser known functions of VirtualDub is that it can quickly make animated GIFs from videos and even convert GIFs back to videos. This coupled with its editing functions not only gives you more fine-grained control, but also opens the door to some creative possibilities through the use of filters.
A known limitation of VDub however is that it only supports videos in the AVI format. Fortunately, we can get around this limitation by using a plugin. This way you can create your GIFs from a variety of video formats including MP4, MKV and WebM without having to worry about converting them to AVI first.
On the other hand, if you fancy the idea of using a video player to quickly make your GIFs, I’ve got good news for you. You can make GIFs using PotPlayer or GOM Player from whatever you’re watching with them, be it a movie or a TV series.
Step 1: Install VirtualDub and FFMpeg Input Plugin
- First download and install the latest version of VirtualDub for Windows. If you’re using a Linux distribution, you may be able to run VDub using Wine.
- Next we need to the Virtualdub FFmpeg Input Plugin. This plugin will allow you to open different types of video formats in VirtualDub including the most common of all: MP4.Download the plugin from SourceForge and install.
- During installation you’ll be prompted to choose the folder where VirtualDub is installed. Select the folder where you extracted VirtualDub (it doesn’t have to be inside Program Files).
Step 2: Create the GIF from Entire Video
- Launch the program by running VirtualDub.exe.
- Press Ctrl+O or go to
File > Open video file...and select the video you wish to make the GIF from. You can also open a video by dragging and dropping the video inside VirtualDub’s window.
- If you’re making the GIF from the entire video just go to
File > Export > Animated GIF..., otherwise, check Step 3 below on how to cut the video first.
- You’ll next be prompted to select the output folder and the GIF’s loop behavior. You can choose amongst:
- Play Once – will loop only once
- Infinite Loop – will loop endlessly until file is closed
- Loop Count – allows you to define the number of loops e.g. 3
5. Click OK once you’re done, then give VirtualDub some few seconds to generate the GIF.
Step 3: Create a GIF from a Segment of the Video
If you need to make the GIF from a specific section of the video do the following:
- 1. Once you’ve loaded the video, drag the seek bar using your mouse to where you want the GIF to start. Click the Mark in button to indicate that position as the beginning
- Next, seek to where you want the GIF to end then click the Mark out button.
- Now just go to
File > Export > Animated GIF...and select the output folder and the GIF’s loop settings.
- You can also seek using the left/right arrow keys.
- To jump to key frames, hold down the
SHIFTkey then use the left/right arrow keys
Resizing the GIF’s Output Dimensions
By default, VirtualDub will use the resolution of the input video for the exported GIF. So if you input video has a resolution of 1280×720 or higher so will be your GIF!
That’s clearly not practical, as it will result in a large GIF for only a few seconds of playtime. To avoid this, we can resize the video using VirtualDub before exporting to GIF.
Here’s how to do that:
- After loading the video press Ctrl+F or on go to
Video > Filters.
- Click the Add… button then select the Resize filter from the list and select OK.
- In the Resize filter window, enter the new dimensions for the GIF inside the Absolute pixels boxes and click OK. You can also define the new size as a percentage of the current size by using the Relative (%) option. For instance, inputting 50% will resize a 1280×720 video to 640×360.
4. Click OK to save the resize filter settings, then export your Animated GIF as explained in the previous section.
How do I make a square GIF?
Most videos generally have longer widths than heights, so if you need to make a square GIF you’ll have to letterbox the video during the resizing.
This will allow you to put the GIF inside a square box which will preserve the video’s image without distortion. e.g. to resize a 1280×720 video to a 400×400 GIF you may do the following:
- In the Absolute pixels set the width to 400.
- Under Framing options, enable the Letterbox/crop to size option and set its dimensions to 400×400.
- You can then optionally choose to use a different color from Black for the letterbox by clicking the Pick color… button.
- Click OK then export your Animated GIF as previously.
More Filters You Can Use
VirtualDub has many more internal and external filters that you can further use to customize your GIF to your liking.
Since I can’t cover all of them here, try using the Resize filter as a guide to test some other simple filters like:
- rotate – rotates video around 90° or 180°
- rotate2 – rotates video using user defined angles
- logo – adds an image overlay on the video
- grayscale – converts video to grayscale
- threshold – converts video to black & white
- invert – inverts video’s colors
- HSV Adjust – tweaks the videos colors, saturation and brightness
There are also plenty of tutorials online should you wish to use some external filters or carry out more advanced tasks.