Archive for the ‘YUV’ Category

VirtualDub’s [Fast Recompress] Option Maintains YUV Color-Space

Monday, July 8th, 2013

Be not afraid to use VirtualDub to save AviSynth script results to a file, provided VirtualDub is in its [Fast Recompress] mode.

I had read that for the benefit of its image-altering filters, VirtualDub operates in RGB color-space, as opposed to YUV color-space, a lightly-compressed alternative that can represent a subset of RGB-space, and is typically used for video storage and transmission.  Given this, when running VirtualDub to take the output of one file, pass it through some “Filters” (effects) and generate another, the implicit color-space transformations would be YUV->RGB->YUV, thereby losing some quality (e.g. quantization banding on smooth gradients such as skies).

In contrast, AviSynth generally maintains YUV-space, unless your script tells it otherwise.  It’s designed so that opening an [.avs] script is broadly equivalent to opening a file.

This initially caused me concern at the thought of using VirtualDub to “run” (open and stream) an AviSynth script file (or rather, AViSynth’s result from that script) and save to a result file (as an [.avi] file).  Was there a way of avoiding the intermediate RGB color-space?  The answer is YES.

When VirtualDub is in its [Fast Recompress] mode, it gains not only “Fast” speed but also avoids quality-loss by maintaining the YUV color-space of the AviSynth video-stream..