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.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd August 2009, 21:31   #1  |  Link
hoboX10
Registered User
 
hoboX10's Avatar
 
Join Date: Jul 2008
Location: Texas
Posts: 50
Lossless video codecs

I recently found this lossless video codec called MSU and it appears to be better than a lot of other lossless codecs. However, the last update was from September 2005.

I also found another lessless video codec called YULS but it's maximum video resolution is 1024 x 768.

Is there any custom builds, or better alternate lossless codecs I can use? Both are supposed to be better than CorePNG, FFV1, and Lagarith. Apparently, those two are the top 2 lossless codecs out, but MSU has problems running with VirtualDub and YULS has that resolution limit.

Also, what do you guys think of this: http://www.h265.net/
hoboX10 is offline   Reply With Quote
Old 23rd August 2009, 22:32   #2  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Have you taken a look at the lossless versions of MPEG-4 AVC (H.264)?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 23rd August 2009, 23:20   #3  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Two more codecs: Camstudio (uses GZIP compression) and LJPG.
Midzuki is offline   Reply With Quote
Old 23rd August 2009, 23:46   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Try FFV1, it provides even better compression than x264 lossless in my tests

Compression of HuffYUV and lossless JPEG are significant worse than FFV1. The MSU codec is unbelievable slow, but the compression doesn't justify that speed at all!

Here are some results for the "Soccer" sample clip:
Code:
FFV1 100%, x264 105%, Lagarith 107%, LJPG 142%, HuffYUV 160%, MSU 198%
(Still wonder why x264 compresses worse than FFV1, because both use CABAC, but x264 has inter-frame prediction while FFV1 doesn't)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 24th August 2009 at 03:35.
LoRd_MuldeR is offline   Reply With Quote
Old 24th August 2009, 00:15   #5  |  Link
MatLz
I often say "maybe"...
 
MatLz's Avatar
 
Join Date: Jul 2009
Location: France
Posts: 583
Huffyuv.
MatLz is offline   Reply With Quote
Old 24th August 2009, 11:46   #6  |  Link
MiroLx
Registered User
 
Join Date: Nov 2006
Posts: 51
You can also try MLC codec, at least it hasn't limit for resolution.
MiroLx is offline   Reply With Quote
Old 24th August 2009, 14:49   #7  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Quote:
Originally Posted by LoRd_MuldeR View Post
Try FFV1, it provides even better compression than x264 lossless in my tests
How about the "H.264 Lossless" encoder that comes with FFDshow?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 24th August 2009, 14:58   #8  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by SeeMoreDigital View Post
How about the "H.264 Lossless" encoder that comes with FFDshow?
That's the same thing...
Dark Shikari is offline   Reply With Quote
Old 24th August 2009, 15:04   #9  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Dark Shikari View Post
That's the same thing...
Can you explain why FFV1 compresses slightly better than x264 in "lossless" mode? At least with the samples I tested (real-life footage, uncompressed YUV source).

As far as I know, FFV1 uses the CABAC entropy coder taken from the H.264 standard, but in contrast to x264 it doesn't do any inter-frame prediction or motion compensation.

So shouldn't x264 compress better in theory?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 24th August 2009 at 15:09.
LoRd_MuldeR is offline   Reply With Quote
Old 24th August 2009, 15:11   #10  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by LoRd_MuldeR View Post
Can you explain why FFV1 compresses slightly better than x264 in "lossless" mode? At least with the samples I tested (real-life footage, uncompressed YUV source).

As far as I know, FFV1 uses the CABAC entropy coder taken from the H.264 standard, but in contrast to x264 it doesn't do any inter-frame prediction or motion compensation.

So shouldn't x264 compress better in theory?
No it shouldn't, because you're wrong.

FFV1 uses a completely different range coder than H.264, but that's not the reason; the reason FFV1 has better intra compression is because it uses median filtering and because its context model is utterly absurd (over one million contexts as compared to H.264's ~450). H.264's lossless coding is basically slapped on after-the-fact and is not very good compression-wise, at least not compared to what it could be.

On any source where inter compression is reasonably useful, x264 will beat FFV1.
Dark Shikari is offline   Reply With Quote
Old 24th August 2009, 15:46   #11  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Hmmm...

Using the same 50 second 720x576 MPEG-2 source, I generated lossless 720x576 encodes with x264 and FFV1. They came out at 100MB and 170MB respectively.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 24th August 2009, 15:52   #12  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by SeeMoreDigital View Post
Hmmm...

Using the same 50 second 720x576 MPEG-2 source, I generated lossless 720x576 encodes with x264 and FFV1. They came out at 100MB and 170MB respectively.
Probably because you were re-encoding from a pre-compressed (lossy) source clip?

Try one of these maybe:
* http://media.xiph.org/video/derf/y4m/soccer_4cif.y4m
* http://media.xiph.org/video/derf/y4m...arkrun_ter.y4m


Quote:
Originally Posted by Dark Shikari View Post
No it shouldn't, because you're wrong. FFV1 uses a completely different range coder than H.264
Well, I don't completely understand all the details, but the FFV1 technical docs clearly say:

Quote:
3.6.1 Arithmetic coding mode

Context Adaptive Binary Arithmetic Coding (CABAC)

The coder is borrowed from H.264 and the reader is referred to that for further information, it is also noted that the author doesn't know if the coder is patented, so care must be taken if FFV1 is used in countries where software patents are legal. But even if CABAC turns out to be patent free there is still some risk that other parts of FFV1 are covered by patents. By just looking at the very long list of patents which cover other relatively simple standards it is shown that the patent offices seem to pass nearly everything. In many cases the patents cover basic operations like subtraction or taking the median of 3 integers in a specific case like motion vectors.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 24th August 2009 at 16:11.
LoRd_MuldeR is offline   Reply With Quote
Old 24th August 2009, 16:07   #13  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Quote:
Originally Posted by Dark Shikari View Post
the reason FFV1 has better intra compression is because it uses median filtering and because its context model is utterly absurd (over one million contexts
173949 = (11*11*5*5*5+1)/2 symbol-contexts * 23 bit-contexts (assuming 8bit samples)

Quote:
as compared to H.264's ~450).
And a bunch of those are for interlaced. So the number that counts is about 310.

Quote:
Originally Posted by LoRd_MuldeR View Post
Well, I don't completely understand all the details, but the FFV1 technical docs clearly say:
That was true when it was written 5 years ago.

Last edited by akupenguin; 24th August 2009 at 16:31.
akupenguin is offline   Reply With Quote
Old 24th August 2009, 16:14   #14  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Quote:
Originally Posted by LoRd_MuldeR View Post
Probably because you were re-encoding from a pre-compressed (lossy) source clip?
Just performed another test. This time I converted the 720x576 MPEG-2 source to uncompressed RGB32 (1.47GB) and used this as the source.

Same result... x264 came out at 100MB and FFV1 came out at 170MB
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 24th August 2009, 16:17   #15  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by SeeMoreDigital View Post
Just performed another test. This time I converted the 720x576 MPEG-2 source to uncompressed RGB32 (1.47GB) and used this as the source.

Same result... x264 came out at 100MB and FFV1 came out at 170MB
Well, maybe the kind of information/detail that would be costly (bit-wise) for x264 are already gone for good in the lossy MPEG-2 source.

Try one of the lossless/uncompessed sources I pointed to in my previous post. Going from lossy (e.g. MPEG-2) to lossless is kind of useless anyway
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 24th August 2009, 19:18   #16  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by akupenguin View Post
173949 = (11*11*5*5*5+1)/2 symbol-contexts * 23 bit-contexts (assuming 8bit samples)
Ah, seems I had a bit of off-by-a-zero there. Still of course an absurd number.
Dark Shikari is offline   Reply With Quote
Old 29th August 2009, 03:34   #17  |  Link
hoboX10
Registered User
 
hoboX10's Avatar
 
Join Date: Jul 2008
Location: Texas
Posts: 50
Lol epic thread hijack. ^_^ Just kidding, I'm learning a little, here and there, in this conversation.

Anyway... I take it there's no custom/alternate Lossless codecs here that you wouldn't find quickly on google? ._.
hoboX10 is offline   Reply With Quote
Old 29th August 2009, 14:03   #18  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Well, there are the japanese Ut and AMV codecs.
nm is offline   Reply With Quote
Old 29th August 2009, 16:10   #19  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
Enjoyed reading this thread but when trying to encode a 1024 x 768 60fps clip from premiere to many lossless codecs I run into trouble.

Using ffv1 in avi, the exported clip plays the first 5 seconds and then crashes.
Using lossless jpeg in avi, the exported clip initially comes up as pure grey image, then shows a streaking effect and crashes.
Using H264 losslessin avi, the exported clip plays fine the whole way through, but its suspiciously small, and shows horrible video corruption the whole way through.

I am exporting a 60fps 1024 x 768 clip which exports fine completely uncompressed (not using ffdshow encoder).

My aim is to get my clip approx 30% smaller than the uncompressed lossless version so that my hdd can keep up with the clip, 4ghz core i7 should be enough I hope to decode this on the fly.

I am using ffdshow and mpc versions released a few days ago, 3060 and 1245. h264 lossless is the only one that I can actually see some output, although its badly garbled.

The charity event I will be playing the clip at is on the 19th of Sept, hoping someone can help me out before that.
mark0077 is offline   Reply With Quote
Old 29th August 2009, 16:14   #20  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by mark0077 View Post
Using H264 losslessin avi, the exported clip plays fine the whole way through, but its suspiciously small, and shows horrible video corruption the whole way through.
Have you checked that your decoder supports H.264 lossless properly? FFDshow has only supported it since roughly this past January.
Quote:
Originally Posted by mark0077 View Post
My aim is to get my clip approx 30% smaller than the uncompressed lossless version so that my hdd can keep up with the clip, 4ghz core i7 should be enough I hope to decode this on the fly.
x264 --tune fastdecode --qp 0 should compress well enough.
Dark Shikari is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.