View Full Version : Lossless YUV12 intermediate coding for Avisynth


Dominiko
22nd June 2009, 11:28
I do like someone to write guide for this.
Particulary I tryed Lagarith, but somehow colours got washed. I used VDubMod (Video -> Fast Recompress) and Lagarith codec forced to use YUV12 for encode and for decoder not forced to RGB output. I used AviSource for importing in avs Script(it is only video clip). I will not use this codec anymore either because some disturbing notes on its decoder, I found here.
I think about using huffman in FFdshow, but how to set decoder to output in YUV12 and import this in Avisynth correctly? I can't find where colorspace convertion is taking place.

Boolsheet
22nd June 2009, 15:38
You have to be careful not to touch the color space if you edit your intermediate files. It seems everyone has their own interpretation of the RGB to YUV conversion and converting forth and back with different pieces of code will of course change the look of the colors.
I know VirtualDubMod has some useful features but there's an important 'Color Depth' option missing. In the newset version of the original VirtualDub ( http://www.virtualdub.org ) you can force YV12 in the 'Video' -> 'Color Depth' menu. This ensures that the input and output stays in this color space. There could be a filter that requires a RGB image that converts it, I don't know how to detect that.

Lagarith shares (or copied ;) ) a large chunk of the code with Huffyuv, this could result in the same 'color washing' you see with Lagarith. ffdshow might have a different implementation but I can't tell you how to set it up, never used it.