VirtualDub & x265 VFW CODEC – How To Fix Error x265vfw [error]: x265_param_default_preset failed
Recently, we decided to try new x265 HEVC (High-Efficiency Video Codec) VFW Edition for VirtualDub2 (successor of original VirtualDub 1.10x and VirtualDub FilterMod) and encountered this strange error:
x265vfw [error]: x265_param_default_preset failed
Cannot start video compression:
An unknown error occurred (may be corrupt data).
(error code -100)
The reason why we should use x265 VFW HEVC instead of a good old and proven x264 VFW AVC solution is that it can achieve smaller file size with equal visual perception of compressed material quality. Another reason is that even in lossless compression mode it achieves considerably smaller file size at the output, depending on the source material (it’s not always the case, though, according to our experience, sometimes x264 achieves slightly smaller file size output with lossless single-pass mode). Of course, it is more CPU intensive codec and file playback will not run smoothly on older computers and devices!
Anyway, back to our problem. No matter what we tried, it just couldn’t start video compression process. It was frustrating, because tweaking and testing every option available in the codec’s setting panel (including various color space conversions and mix-and-matching) didn’t seem to work and make it go away!
When it comes to pixel formats (color space), it can be tricky, because what you feed into codec must be something that codec will understand and process properly. For example: RGB24 -> RGB24, YUV 4:2:0 -> No Change or you can select options such as Convert To YUV 4:2:0 or Keep input colorspace, and so on. In the codec selection panel in:
VirtualDub2 > Video > Compression… > x265vfw
look at the button labelled Pixel Format next to the Configure button, where you can use internal conversion that will be supplied to the codec itself. Then, inside codec you must be sure to select appropriate color space handling, as well.
However, in the end, after a lot of trial and error, that was not the issue at all!
Apparently, the problem was with activated Fast Decode and Zero Latency options:
We are not sure why, our input video file was Uncompressed RGB24 AVI file in Full HD 1920×1080 resolution, and these options always worked properly (and still do) with older x264vfw codec. Updating to the latest x265vfw version available at the time of writing this article (build Feb 2019) didn’t help either.
Anyway, once those options were un-checked, compression procedure was properly initiated and output x265 video file was finally generated.
Update: Related to this issue, which also affected older x264 VFW codec, was that sometimes, particularly when working with UHD 4k resolution video clips, using VirtualDub.exe 32-bit edition was the culprit. Switching to VirtualDub64.exe 64-bit version we could use x264/x265 codecs without any limitation (all features above left disabled as well).