Not long ago I covered on how to unflip videos using various Windows video players. That was however only a temporary measure as the players merely flip horizontally the decoded video. A permanent solution requires the video to be encoded (converted) whilst applying a video filter that unmirrors the image.
Most run of the mill free video converters out there however don’t usually support such a setting save for 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
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 in your computer.
Step 2: Install VirtualDub FFMpeg Input Plugin
VDub 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 FFMpeg Input plugin from the SourceForge.
2. Run the setup file to install the plugin. When prompted to choose the folder where to install, select the folder where you extracted VirtualDub.
Step 3: 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.
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. On the video preview you’ll now notice that the video has been flipped.
|Right: Original Video, Left: Unmirrored Preview|
The easiest way to know this is to seek to a section in the video where there is some visible text like captions, credits or a watermark. The text should now be readable.
6. Next if you don’t mind saving the file to AVI just go to File and select Save as AVI… or press F7. You can then convert the AVI to whichever other format you want using a video converter.
Step 4: 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.
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)
4. Switch to the Encoders tab with the following list of profiles.
Double click to open each of the profiles and in the Program box select the path to where FFMpeg is installed e.g. in C:Program Filesffmpegbinffmpeg.exe
Click OK and that’s it.
5. 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.
6. 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.
- You can encode to the lossless MOV format then use a normal video converter to save it to any other format using your preferred codecs and encoding settings for video and audio.