Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
2nd December 2004, 03:10 | #1 | Link |
Registered User
Join Date: Dec 2001
Posts: 1,219
|
Lagarith lossless codec
I'm announcing this for my friend since he's never joined this forum. He has made a very nice lossless codec called Lagarith. It supports a number of colorspaces (RGB24, RGB32, RGBA, YUY2, and YV12). It runs at about half the speed of huffyuv, so it can work well for capturing video on most systems. The compression ratio is slightly better than corepng (I didnt enable delta frames in corepng in my test).
It is an interframe codec (all keyframes) so it works very well for editing. It does have a null frames option though, which you can enable to make it encode null frames if there is no difference from one frame to the next. It's also open source. A reduced resolution mode is currently being implemented, which will be a extremely nice feature for video editors. I personally use this as my standard lossless codec now, replacing huffyuv and vble. From all the lossless codecs that I have tried, it offers the best mix of compression, speed, and stability, in my opinion. For more information and to download it, go here: http://lags.leetcode.net/codec.html |
2nd December 2004, 06:39 | #3 | Link | |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Cool, a new codec is always good news.
Nitpick posted here because I don't see any method of feedback on the site: Quote:
|
|
2nd December 2004, 08:29 | #5 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Since the compression method sounds similar to ffv1, lets see how they compare.
My benchmarks on a random chapter of a random DVD I had on hand (Ghost in the Shell 2; mostly CG, cropped but not filtered) YUY2 (because that's what all these codecs have in common), 704x384, 2000 frames There were no duplicate frames in this clip, so that feature of lagarith wasn't tested. But note that MEncoder has a similar duplicate frame remover that can be applied to any codec, so ffv1, ffvhuff, and ljpeg would benefit the same amount. This is just one source; YMMV. Code:
Codec Bitrate Enc fps Dec fps raw: 103705 huffyuv 2.1.1: 31524 93.41 71.61 ljpeg: 28965 44.85 45.63 huffyuv ccesp: 28170 96.48 72.54 ffvhuff: 24308 86.81 70.42 lagarith: 23242 41.08 29.88 ffv1(cavlc): 19756 27.99 26.31 msu: 17676 0.83 10.63 ffv1(range coder): 17221 23.23 25.77 Last edited by akupenguin; 1st May 2008 at 11:52. Reason: typo |
2nd December 2004, 23:09 | #7 | Link |
Satsuki'S Softs Maker
Join Date: Feb 2003
Posts: 192
|
A multi thread implmentation will be cool, i can beta test it (dual athlon mp on tyan thunder k7).
Also a "compression level" will be realy cool (don't know if it's easily implementable) so every computer could use it for capture ^^. ++ |
3rd December 2004, 08:22 | #8 | Link |
Seņor Member
Join Date: May 2002
Location: Austin, Texas
Posts: 915
|
AFAIK, FFV1 only works in YV12, so if you're feeding it anything except that you are not encoding lossless. An AVISynth script could compare the original to decoded FFV1 to make sure.
Also, CorePNG with Auto-Delta frames at the maximum compression level would likely beat all of these for size, but unless you have an Athlon 30,000+, you aren't going to be capturing with it in real time. |
4th December 2004, 04:06 | #10 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Lagarith doesn't seem to be affected by the "null frames" option when encoding YUV. Is it supposed to be working? (Yes, I'm sure the frames are perfectly identical.) I also can't get it to encode RGB (vdub crashes when I begin encoding).
edit: SirLagsalot just fixed RGB. Another chapter of another random DVD ("Ghiblies 2", 672x432, 2500 frames, cropped but not filtered). Yes, I made sure all of these are really lossless. YV12: Code:
Codec Bitrate Enc fps Dec fps raw 83529 corepng(6i) 23903 7.31 47.49 ffvhuff 22264 156.46 86.09 lagarith 20975 44.79 32.89 corepng(9p) 18007 0.68 51.09 ffv1 15368 28.62 29.80 snow 13838 7.46 15.43 With duplicate frame removal: ffvhuff 18440 163.06 104.61 lagarith 17346 50.89 39.72 snow 13685 8.50 16.76 ffv1 12737 33.93 36.09 RGB: Code:
Codec Bitrate Enc fps Dec fps raw 167048 hyffyuv ccesp 54583 48.79 59.29 corepng(6i) 52360 3.82 35.49 corepng(6p) 41752 2.29 28.24 corepng(9p) 40122 0.55 29.04 lagarith 39539 19.42 17.56 ffv1 29937 13.86 14.76 With duplicate frame removal: huffyuv ccesp 45388 58.86 71.53 lagarith 32771 23.93 20.80 ffv1 24891 16.68 18.00 Last edited by akupenguin; 4th December 2004 at 07:47. |
4th December 2004, 16:28 | #11 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 4,926
|
2605 1:44 Pal 25 Fps 720x576 (Real) (cleaned DVD)
Code:
flawed look below for correct results
__________________
all my compares are riddles so please try to decipher them yourselves :) It is about Time Join the Revolution NOW before it is to Late ! http://forum.doom9.org/showthread.php?t=168004 Last edited by CruNcher; 5th December 2004 at 12:13. |
4th December 2004, 18:14 | #12 | Link |
Registered User
Join Date: Dec 2001
Posts: 1,219
|
After seeing the good results of ffv1, i decided to try a comparison myself, and see if I could actually get the codec working this time. I've never been able to get either ff huffyuv or ffv1 working the couple times that I tried them in the past.
Code:
Video is YV12, animated source, 1:40 in length. Codec/settings Encode Speed Size vble 0:48 395MB lagarith 1:15 330MB ffv1 vcl Context 0 kf dist 1 1:47 281MB ffv1 ac Context 0 kf dist 1 2:40 268MB ff huffyuv (resulting files are corrupt) My results basically show a pretty linear relation between the amount of compression verses the encoding speed. Lagarith seems to be a good intermediate range codec: good compression, and good speed. Last edited by Zarxrax; 4th December 2004 at 18:20. |
4th December 2004, 19:21 | #13 | Link | |
Seņor Member
Join Date: May 2002
Location: Austin, Texas
Posts: 915
|
Quote:
|
|
4th December 2004, 21:01 | #14 | Link | |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Quote:
For best results, use vcodec=ffvhuff:vstrict=-1:pred=2:context=1 And you've tried ffv1 with context=1 and keyint=10 or 20 and decided that the compression gain is not worth the speed or the addition of P-frames? (FFV1 isn't actually temporally predicted, it just uses P-frames to avoid resetting CABAC contexts.) |
|
4th December 2004, 22:00 | #15 | Link | ||
Registered User
Join Date: Dec 2001
Posts: 1,219
|
Quote:
Quote:
|
||
5th December 2004, 02:09 | #16 | Link | |||
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Looks like ffvhuff hasn't been included in ffdshow yet.
Quote:
Quote:
Quote:
Last edited by akupenguin; 31st May 2008 at 00:52. Reason: typo |
|||
5th December 2004, 09:23 | #17 | Link |
Registered User
Join Date: Dec 2001
Posts: 987
|
I've managed to get intra-only FFV1 to encode and decode at the same rates and faster compared to Laga, with decent compression gain. I hate to be such a dick, but I've never really seen the point of lagarith... the algorithms are pretty mundane, and it doesn't really fill any niche.
I'll post my test results tomorrow or Monday when I'm home. |
5th December 2004, 12:14 | #18 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 4,926
|
Sorry but the results i posted before were borked here are the correct ones
2605 1:44 Pal 25 Fps 720x576 (Real) (cleaned DVD) Code:
size enc dec ffv1 (AC) 293 MB 2:46 2:28/19 Fps ffv1 (VLC) 316 MB 2:06 2:00/22 Fps lagarith 356 MB 1:58 2:05/22 Fps vble-gr3 368 MB 2:57 1:33/28 Fps vble-gr2 369 MB 7:01 1:48/24 Fps milk 371 MB 3:16 3:05/15 Fps vble2-gr2-lite 375 MB 2:57 2:00/22 Fps loco 401 MB 1:55 2:11/21 Fps vble 416 MB 1:20 3:16/13 Fps huffyuv12 median 468 MB 1:22 2:22/20 Fps ffdshow huffyuv12 median 689 MB 1:50 2:50/18 Fps Code:
size enc dec ffv1 (AC) 297 MB 3:40 2:51/30 Fps ffv1 (VLC) 325 MB 2:46 2:20/33 Fps milk 370 MB 4:00 3:17/23 Fps lagarith 390 MB 2:28 2:20/33 Fps vble-gr2 390 MB 9:20 2:10/36 Fps vble-gr3 393 MB 3:47 1:50/38 Fps vble2-gr2-lite 407 MB 3:56 2:26/33 Fps loco 427 MB 2:33 2:32/32 Fps vble 520 MB 1:50 3:47/20 Fps huffyuv12 median 556 MB 1:48 3:14/24 Fps ffdshow huffyuv12 median 872 MB 1:50 2:40/28 Fps
__________________
all my compares are riddles so please try to decipher them yourselves :) It is about Time Join the Revolution NOW before it is to Late ! http://forum.doom9.org/showthread.php?t=168004 Last edited by CruNcher; 5th December 2004 at 17:09. |
5th December 2004, 13:15 | #19 | Link | ||
....
Join Date: May 2002
Location: Australia
Posts: 2,797
|
Quote:
Quote:
|
||
5th December 2004, 18:39 | #20 | Link |
Registered User
Join Date: Dec 2001
Posts: 987
|
Well, if you like it, use it. I still don't see any practical use, FFV1 pretty much covers all bases. I guess I'm just too supportive of FFV1 :P Laga and me go back a ways though. The story of my distaste for it is too long and political to go into without being OT, so I'll step off here.
|
Tags |
lagarith |
|
|