Skip to content

How to Flip a Video Permanently using VirtualDub

We’ve seen how to unflip videos using various video players on Windows, however that was only a temporary solution as the players merely unmirror the playing video. A permanent solution requires the video to be edited with a video effect that unmirrors the image.

Most video converters out there however don’t usually support such an effect, save for some clipping, cropping and some simple video effects to adjust brightness and contrast.

As a result, you may be forced to use a commercial alternative or full-blown video editor suites such as Sony Vegas for this simple task. This is however unnecessary as you can use the free open source VirtualDub (VDub) with its filters to do this in a couple of minutes.

Let me show you how.

Step 1: Install VirtualDub and FFmpeg Input Plugin

VirtualDub doesn’t support some modern video file formats such as MP4, MOV and WebM. The only common format it supports out of the box is AVI, however you may also run into problems with this format if it’s using some unsupported codecs such H.264/AVC, VP8/VP9 etc.

To get past this limitation, we need to install a plugin such as the FFmpeg Input Plugin which allow you to open most if not all common video formats out there. To do that:

  1. Download the latest version of VirtualDub from the homepage. If you’re on Linux, you may be able to run VDub in your distribution using Wine.
  2. To install it just extract the package to a folder somewhere on your computer.
  3. Next, download the latest FFMpeg Input plugin from SourceForge.
  4. Run the setup file to install the plugin. When prompted to choose the folder where to install, select the folder where you extracted VirtualDub.

With VirtualDub setup with FFMpeg we can now take a look on how to use it to unmirror almost any video out there.

Step 2: Unflip Video with Flip Horizontally Filter

  1. Run the program by running VirtualDub.exe.
  2. Press Ctrl+O or go to File > Open video file... and select the flipped video. You can also open the video by dragging and dropping it inside VirtualDub’s window.
  3. In the toolbar go to Video > Filters or press Ctrl+F.
  4. Click the Add… button, select the flip horizontally filter and then click OK to add it.
  5. You’ll now notice that the video on the preview side has been flipped. The easiest way to confirm this is to seek to a section in the video where there is some visible text like hard captions, credits or a watermark. The text should now be readable.
    An image showing the main window of VirtualDub with a video flipped horizontally.
  6. Next, if you want to save the file to AVI just go to File and select Save as AVI… or press F7. However, if you want to save the video in different format, you can use FFmpeg as explained in the next step.

Step 2: Save Video to MP4 or Other Formats

While VirtualDub only supports saving to AVI it does provide a means for using external encoders since version 1.10+. The appropriate external decoders if set up correctly can be used to export the edited video to MP4, MKV, MOV and other formats.

A good guide on how to set up some external encoders to save to various formats can be read here. For the purpose of this tutorial, however, I’ll cover only exporting to MP4 or MOV using FFmpeg as explained in that guide.

To do that:

  1. First, download and install FFmpeg for the version of Windows you’re running.
  2. Next, download this VirtualDub profile or copy the code from Pastebin and save it to a file named ffmpeg-1.vdprof.
  3. In VirtualDub go to Options > External encoders... then click the Import… button and select the ffmpeg-1.vdprof file. Doing that will import three different profiles:
    • mov ff x264+pcm: to encode to MOV with x264 video and PCM audio (i.e. WAV if you need lossless audio)
    • mp4 ff mpeg4 q1+ac3: to encode to MP4 with MPEG-4 video and AC3 audio
    • mov ff mjpeg+pcm: to encode to MOV with MJPEG video (lossless) and PCM audio (lossless)
      An image showing external encoders imported to VirtualDub.
  4. Switch to the Encoders tab with the following list of profiles.
    An image showing a list of external encoder options in VirtualDub.
  5. Double click to open each of the profiles and in the Program box select the path where FFmpeg is installed, e.g. in C:\Program Files\FFmpeg\bin\ffmpeg.exe. Click OK to save the setting.
    An image showing the path to FFmpeg for an external encoder profile.
  6. Now to save your video, go to File > Export > Using external encoder... and select one of the profiles you’ve just set up and click OK.
  7. Choose where to save the encoded file and give it a name then click the Save button to start the encoding. Give VirtualDub some time to do the encoding. Your video will be flipped horizontally and saved in MP4 or MOV.

Note:
If you’re working with a lossless video and need to retain the lossless quality, then use the mov ff mjpeg+pcm profile to save the video in a lossless MOV. You can then convert the lossless MOV using your preferred codecs and encoding settings for video and audio.

Share:

Leave a Reply

Feel free to share your comments or questions with me. I may not be able to respond immediately so please check later once I've approved your comment.

Your email address will not be published.

Kelvin Kathia

Kelvin Kathia is a writer based in Kenya that's passionate about sharing solutions to everyday tech problems. He's the founder and editor of Journey Bytes, a tech blog and web design agency. Feel free to leave him comments or questions regarding this post, or by leaving him a message on the contact page. If you found his content helpful, a donation is much appreciated.