Sometimes when encoding using an avisynth script with a lot of slow processing involved, it is actually faster to encode to an intermediate file for the slow part, and then finish up with a dual-pass encode with no extra processing involved. As such its good to use a lossless, or near lossless codec for the intermediate file. I've done a bit of comparison between some that I found available. I thought I'd post the results here. Hopefully they are easily understood. Please remember though, your mileage may vary.

As a summary, I've conluded that if only speed is of the essence, and disk space is no problem, then the Helix codec would be best. If disk space is limited though, a good tradeoff is Lagarith which is still very fast, but offers the best lossless compression.

On the other hand, if speed is of little concern, but disk space is very tight, then MSU is definitely the best compression, although its so slow that Lagarith would still be the next best and quite worth the extra disk space.

For what its worth, here are my results: (sorry for the poor formatting, so I've included a screenshot also - someone could always make a nice chart to post on a web page if they wanted)


Test of 1439 frames in XviD at 640x352


FourCC Name Size Time Input FPS Decode FPS
in Mb (Secs) (Secs)

================================================== =========================================


lags Lagarith 116.00 60.0 yv12 23.98 56.3 25.56

hyuv Huffyuv 194.68 37.2 YUY2 38.68 60.0 23.98
(Best, Best settings)

rtll Arithyuv 137.98 46.4 yuy2 31.01 60.0 23.98

i420 Helix i420 463.78 36.9 YV12 39.00 60.0 23.98

yv12 Helix YV12 463.78 34.9 yv12 41.23 56.2 25.60

xvid Xvid 18.92 60.0 yv12 23.98 35.6 40.42
(Single Pass Quantizer=1)

fckk FastCodec 184.90 60.0 yuy2 23.98 60.0 23.98

lzoc LZO Codec 206.37 60.0 yv12 23.98 60.0 23.98
(LZO Compression)

lzoc LZO Codec 142.04 360.0 yv12 04.00 180.0 07.99
(Gzip Compression - 15% Default compression)

png1 Core PNG (Fastest) 204.66 60.0 yv12 23.98 50.6 28.44


msud MSU 73.13 240.0 yv12 06.00 120.0 11.99
(Visually Lossless, Optimized for Best Speed)




Encoded speeds are when read from xvid and fast recompressed codec using avisynth yv12 color conversion.

Decoded Speed is when read and fast recompressed into Helix yv12 using avisynth yv12 color conversion.

Neither type of lzoc could be decoded as an AVISource, so DirectShowSource.dll was used instead.


AviSynth Script was 2 lines long as Follows:

AVISource ("source.avi01", false)
ConvertToYV12 () # or YUY2 when necessary