PDA

View Full Version : Fastest visually lossless codec ? see the test results


sebastian___
14th March 2008, 12:23
I searched Google and also this forum and I didn't find an answer to this approach.

I'm looking for the fastest codec to edit in Premiere (for example) . Size doesn't matter so much, as in these days you can easily buy some giant HDD, but of course if the resulting files will be too big, the HDD transfer will be a bottleneck.

The video quality doesn't matter too much since after you finished the editing, you can export with a different codec.

Is it HUffyuv ? Lagarith ? Maybe mpeg 4 ? Mpeg 2 ? How about the old Intel Indeo 5.5 which has a pretty good quality and it's also fast.

Alparysoft Lossless Video Codec claims that has beside the lossless setting, also has a "visual lossless" settings which can compress even 15 times better. But it doesn't say if it's also faster.

At the moment I use Huffyuv 2.1.1 - 24 bit RGB compression, but as I said, you don't need absolute perfect lossless quality when you are editing, since you can export the final result with a different quality solution. But you need the fastest option, especially when you are dealing with HD , realtime color correcting effects..and so on.

Or the answer is simple, and the Lossless codecs are also the fastest ones even comparing them with the lossy codecs ?

Since I didn't find the exact answer to this I decided to make my own test. Skip down to the conclusion if you don't wanna read the whole thing :)
==============================


Project in Premiere Pro with the following characteristics :
38 sec and 15 frames long
Frame Size : 848 400
fps : 24
A typical project with a few tracks
scattered on the tracks : 2 avi videos, one Tga sequence (series of TGA frames/pictures forming a movie) , some psd single frames and animated with move and scale. I applied a Fast Blur effect on some of the clips.

because the project is so short, the results were not much different , so for a longer project you should multiply the results
-----------------
All the clips had either an effect on them or animated opacity, so they had to be rendered (with Render Work Area)
- No audio tracks

Render Work Area speed TEST (the preview temp files are created on a different HDD - in this way HDD speed transfer are less taken into account)

Huffyuv 2.1.1
settings ......... time ........ size of the temp files
___________ ________ ______________________

rgb best ........ 39 sec ...... 333 MB
rgb fastest .... 39 sec ...... 351 MB
yuy2 fastest .. 37 sec .... 187 MB
yuy2 best ...... 38 sec ...... 178 MB
--------------------------

Lagarith 1.3.14
(with "Use Multithreading" the resulting time were almost identical, but I experienced crashes so I leaved that unchecked)

settings ... time ....... size of the temp files
_________ ________ _________________

rgb ......... 42 sec ...... 196 MB
yuy2 ....... 39 sec ..... 112 MB
yv12 ....... 38 sec ...... 89 MB

reduced resolution .. 35 sec .. 25 MB (and the quality was acceptable for temp purposes)
--------------------------

no codec .. 1 min .46 sec .. 899 MB
--------------------------

Avi File Format and codec : Uncompressed UYVY 422 8bit (exiting codec included in Premiere Pro)
........ 41 sec .... 599 MB
--------------------------
instead of avi file format - uncompr 8-bit 4:2:2 YUV
........ 36 sec ... 606 MB
--------------------------
indeo video 5.11 .. 1 min .25 sec ... 35 MB
--------------------------
xvid - 1 pass quality - quality 1 - search 0 -
... 38 sec .. 38 MB - but crash later on playback

1 pass CBR - bitrate 10 000 - search 0
.... 38 sec ... 40 MB + crash
- also mild compression artefacts

--------------
Divx 5.2.1 - encode fastest - bitrate max 4000
encode mode 1 pass
Max Keyframe interval : 2 frames
...... 40 sec ... 15 MB
- mild compression artefacts
---------------------------
MJPEG codec
custom quality - max
..... 37 sec ... 50 MB

format : Lossless jpeg
.... 51 sec .... 899 MB
---------------------------

Morgan M-Jpeg v3
fast integer - no interleave - no bitrate control - 4:2:2
..... 38 sec .... 140 MB

----------------------------
Export TEST

Export the Work Area to the same HDD. The export is "from scratch" without using the preview temp files.
the results are similar to the Render Work Area test.

uncompressed avi ....... 1 min 48 sec ....899 MB

Huffyuv rgb fastest ..... 36 sec ...... 351 MB
Huffyuv rgb best ........ 35.5 sec ..... 333 MB
Huffyuv yuy2 fastest ... 36 sec ....... 186 MB

Lagarith rgb .............. 40 sec ....... 196 MB
Lagarith yuy2 ........... 36 sec ........ 111 MB
Lagarith rgb - multithreading .. 39 sec ... 196 MB
instead of avi - uncompr 8-bit 4:2:2 YUV .. 35 sec .. 601 MB
instead of avi - uncompr 10-bit 4:2:2 YUV .. 35.5 sec .. 816 MB
----------------------------------


DECODE TEST VirtualDub - direct stream copy , no audio.
Then run video analysis pass
- I used the files exported in the previous test
- this is a very imprecise test. I just read the numbers while VirtualDub is trying to playback the files as fast as possible.

uncompressed avi ......... ~ 70 fps ..... 13 sec

Huffyuv - rgb fastest .... ~ 180 ? ...... 5 sec
Huffyuv - rgb best ........ ~ 190 ? ...... 5 sec
Huffyuv - yuy2 fastest .. ~ 330 ........ 2.5 sec

Lagarith rgb .............. ~ 300 fps ..... 3 sec
Lagarith yuy2 ............ ~ 500 fps ..... 1.5 sec

instead of avi - uncompr 8-bit 4:2:2 YUV .. 105 fps ... 8 sec
--------------------------------


DECODE TEST in Premiere
Playback in premiere and encode in one of the fastest encode codec
- in instead of avi - uncompr 8-bit 4:2:2 YUV , clips repeated twice on the timeline
- first clip altered position (in screenspace) - instead of 200 I wrote 220
- the preview temp files were created on a different hdd
Further explanations : Here we test the playback speed (decoding speed) in Premiere. By using the different codec clips in timeline and rendering. Premiere first has to decode/read the clips , then render them on HDD.

uncompressed avi ........... 26 sec

Huffyuv - rgb fastest ....... 29 sec
Huffyuv - rgb best .......... 30 sec
Huffyuv - yuy2 fastest .... 23 sec

Lagarith rgb .................. 49 sec
Lagarith yuy2 ................ 41 sec

instead of avi - uncompr 8-bit 4:2:2 YUV ... 18 sec


Conclusion ? The best quality codecs (the lossless ones) seem to offer also the fastest working speed in editing. And on top of that you also get the benefit of working with the best visual quality.

I think that the playback speed is equally important when working in Premiere. Many times when you apply a "mild" effect, you don't need to render even if you get the red line. A faster playback / decode speed means less CPU is used for video decoding and more CPU for real time effects rendering.

It seems the encoding time were similar for Huffyuv and Lagarith but the decoding time were significantly faster for Huffyuv.
The "Huffyuv - yuy2 fastest" delivers almost identical quality with RGB 24 bit lossless while being faster. So for editing (and sometimes even for final rendering) I will use this mode.

Zarxrax
14th March 2008, 12:34
I would try Huffyuv, Lagarith, and an mjpeg codec.
MJPEG tends to be fastest, but it is not lossless. FFvfw has an mjpeg codec, but I'm not sure how it's speed compares to some of the commercial mjpeg codecs.

As far as lossless codecs go, huffyuv is fastest cpu-wise but creates large files. Lagarith makes smaller files but is more cpu intensive. Lagarith can take advantage of multi-core cpus though.

With high definition, hard disk throughput is a definite concern, so file size might be an important factor. Lagarith contains a reduced resolution mode which can be useful for editing, as long as you swap out your files when you are finished.

DON'T use any codec that uses delta frames (non-keyframes). This includes mpeg2 and 4.

Southstorm
14th March 2008, 12:34
My vote is for HuffYUV.

sebastian___
14th March 2008, 14:36
Zarxrax : So, you say that a MJPEG codec could be faster than HUFFYUV ?

DO you know a link with codec comparisons ? Andybody made such a comparison ? There is this one http://compression.ru/video/codec_comparison/lossless_codecs_2007_en.html

But here they compare only lossless codecs. While I'm interested in FASTEST codecs regardless of size. And also the video quality does not have to be perfect 1:1. A "close enough" is good for editing purposes (with temp files).

The reduced resolution mode of Lagarith is much faster than Huffyuv ?

Zarxrax
14th March 2008, 15:41
Some mjpeg codecs can be faster than huffyuv, yes. I used some commercial mjpeg codec years back and it was very fast. I don't remember which codec it was though.

I think Lagarith's reduced resolution mode would certainly be faster than Huffyuv, but I have not tested.

You can use virtualdub to run some tests on the speed of the codecs.
Decoding speed is what you need to measure, so encode a video clip to all of the codecs that you want to test. Then, maybe compress these each to a codec like xvid, or maybe to uncompressed, and compare the encoding speed of each. There is probably a more accurate way to measure though.

Inventive Software
14th March 2008, 16:52
Xvid with search options at 0, no B frames, and constant quality 1 or 2 is very fast, even with one core. You can specify it use just intra (I) frames, but it wouldn't be slow decoding with P-frames.

vsv
14th March 2008, 20:43
imho, Fastest visually lossless codec is Cineform wavelet :)
Not free but very good.

reepa
14th March 2008, 21:29
Since size doesn't matter, I recommend HuffYUV. It's very fast ("compression throughput of up to 38 megabytes per second on my 416 MHz Celeron" -Huffyuv website), it's mathematically lossless, and it still gets you some compression (I get ~1:2 compared to raw 4:2:2 on my analog TV caps).

If HuffYUV is "too fast", you could try Lagarith or ArithYUV (I don't know how compatible they are with other video editing apps besides Virtualdub).

Dark Shikari
14th March 2008, 21:41
Note that like most pixel-prediction-based lossless codecs, Huffyuv's decoding is quite a bit slower than its encoding.

sebastian___
15th March 2008, 01:20
It seems that if I wanna know for sure, I will have to make some test between all of the codecs mentioned here. Maybe the following days I will get back here with info.

lilhobo
16th March 2008, 11:11
where is the more recent "working" download for huffyuv??

Leak
16th March 2008, 11:32
where is the more recent "working" download for huffyuv??
IMHO the most advanced HuffYUV implementation (with YV12 support and all) is included in ffdshow (or rather in libavcodec), dunno if there even is a standalone version...

np: Röyksopp - Sombre Detune (The Understanding)

lilhobo
16th March 2008, 13:10
there were some standalone but the latest x.0.1 had some errors in it

where is the official ffdshow filter anyways?

Leak
16th March 2008, 13:37
where is the official ffdshow filter anyways?
This is about as official as it gets... (http://ffdshow-tryout.sourceforge.net/) :)

np: Pluramon - Fresh Aufhebung (The Monstrous Surplus)

sebastian___
12th April 2008, 10:26
Since I didn't find the exact answer to this I decided to make my own test. (I edited the first post)

Inventive Software
14th April 2008, 18:07
That doesn't really surprise me, though I thought the lossy codecs would be much faster decoding...

BiO-HaZaRd
28th May 2008, 21:00
i've tried the multithreading option on lagarith encoding somethings on virtualdub, but it only uses one of the cpus, anyone knows why?

kolak
29th May 2008, 22:36
If you use YUYV (or similar) than speed depends mostly on your disk speed. With very fast RAID it can be 15 times faster than realtime :) There is some CPU processing, but not a lot.


Andrew

AVIL
29th May 2008, 23:38
Hi, all

I've used YLC (YUY2 Lossless Codec version 0.25). It's faster than lagarith and more compressing (with my footage, video from camcorder in YUY2 format). Find it at:

ruriruri.zone.ne.jp/aviutl/

(page in japanese only)

Good luck

Blue_MiSfit
30th May 2008, 21:29
Yeah... it's too bad Cineform isn't in this test. It's not cheap, but it DOES let you capture 10 bit 4:2:2 1080p24 in real time to a single drive, and then play it back with no dropped frames ;)

~MiSfit

kolak
31st May 2008, 21:27
Yeah... it's too bad Cineform isn't in this test. It's not cheap, but it DOES let you capture 10 bit 4:2:2 1080p24 in real time to a single drive, and then play it back with no dropped frames ;)

~MiSfit

Better- it can capture 4K, 4:4:4, 12bit and play it back from RAID:)

Andrew