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 11th July 2021, 02:36   #1  |  Link
PCU
Registered User
 
Join Date: Oct 2017
Posts: 327
Best lossless codec for archiving

What's the best lossless codec for archiving?
PCU is offline   Reply With Quote
Old 11th July 2021, 04:34   #2  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Probably FFV1...
Kurtnoise is offline   Reply With Quote
Old 11th July 2021, 11:55   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,902
Tough choice.
I'm gonna go for x265 --lossless just because it's generally more supported by NLE etc than the alternatives like HuffYUV, Lagarith and UTVideo and it performs well...
FranceBB is offline   Reply With Quote
Old 11th July 2021, 12:28   #4  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
h265 is slow. Also- is playback really that good for anything above 4:2:0 10bit? For archiving you want at least 4:2:2.
FFV1 is used by many institutions as archiving format.

Last edited by kolak; 11th July 2021 at 12:31.
kolak is offline   Reply With Quote
Old 11th July 2021, 12:32   #5  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
For me...

Saving to x264 lossless in mkv has always produced reliable results when generating encodes with VirtualDub2.
__________________
| 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 11th July 2021, 14:55   #6  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 704
What kind of movies are we talking about? If new HDR then you can use 10bit HDR. Which codec? That's the problem. Cineform is out. MJPEG2000 is out. The JPEG XS was not seen by anyone. X265 at high bitrate is best in 4K.
Old movies only in RGB. Don't record on Bluray.
Will the AV1, VVC, EVC codecs satisfy the recipient in 20 years? No, then it will be 16K, and we will be able to throw 2K films in the trash.
Jamaika is offline   Reply With Quote
Old 12th July 2021, 16:57   #7  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by Jamaika View Post
What kind of movies are we talking about? If new HDR then you can use 10bit HDR. Which codec? That's the problem. Cineform is out. MJPEG2000 is out. The JPEG XS was not seen by anyone. X265 at high bitrate is best in 4K.
Yep, x265 has the best combination of compression efficiency, content type flexibility, and long-term decodability.

Quote:
Old movies only in RGB. Don't record on Bluray.
Will the AV1, VVC, EVC codecs satisfy the recipient in 20 years? No, then it will be 16K, and we will be able to throw 2K films in the trash.
I doubt even 8K will be standard in 20 years for consumer viewing. The industry has yet to identify moving image content that customers can discriminate 4K from 8K even in optimal viewing conditions. And as theatrical movies have long been the primary driver of content tech innovation, the lack of any plan (or business model) for 8K projectors will blunt that.

My 2041 vision has HDR 4K with dynamic metadata as the default, probably in H.268.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2021, 17:32   #8  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
UTVideo and MagicYUV are good, i'm using them all the time but for intermediate production files. They are fast, but for archiving, there is probably slower codecs with better compression, like x264 or x265 lossless.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 12th July 2021, 18:26   #9  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by jpsdr View Post
UTVideo and MagicYUV are good, i'm using them all the time but for intermediate production files. They are fast, but for archiving, there is probably slower codecs with better compression, like x264 or x265 lossless.
x265 lossless can be sped up a lot by doing IDR-only (--keyint 1) and using a faster --preset. You can really crank up -F in that case, as each frame is encoded independently. And better yet, you'll get HW decode on modern GPUs, which can give you performance back.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2021, 18:28   #10  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
How much are you going to gain on typical film source (with all grain/noise etc.) using h265 lossless compared to other "fast" codecs?
I never found real world lossless scenario which would give more than 2-2.5x compression (regardless fo the codec).

How difficult would be to do hybrid mode which hits chosen ratio (eg. 3:1), but when it can switches to lossless mode? HDCAM-SR worked this way no?

Last edited by kolak; 12th July 2021 at 19:15.
kolak is offline   Reply With Quote
Old 12th July 2021, 20:16   #11  |  Link
Thundik81
Registered User
 
Join Date: Jul 2004
Posts: 22
In most cases, just keep original format!
Thundik81 is offline   Reply With Quote
Old 12th July 2021, 20:33   #12  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
I agree, but at some point it's a difference between spending 1MLN$ or 500K$ for archive and then lossless has its argument
kolak is offline   Reply With Quote
Old 12th July 2021, 21:09   #13  |  Link
PCU
Registered User
 
Join Date: Oct 2017
Posts: 327
x264/265 is not 100% lossless.
PCU is offline   Reply With Quote
Old 12th July 2021, 21:12   #14  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by kolak View Post
How much are you going to gain on typical film source (with all grain/noise etc.) using h265 lossless compared to other "fast" codecs?
I never found real world lossless scenario which would give more than 2-2.5x compression (regardless fo the codec).

How difficult would be to do hybrid mode which hits chosen ratio (eg. 3:1), but when it can switches to lossless mode? HDCAM-SR worked this way no?
It wouldn't be difficult at all, and allows for VBV compliance for profile @ level. Just use --cu-lossless, and coding units that can be efficiently encoded as lossless get encoded as lossless. Lots of fun info about lossless mode here: https://x265.readthedocs.io/en/master/lossless.html.

And yes, about 2.5:1 for content with grain or other random noise is about what you can expect. Totally clean content in Long GOP can go way, way lower. That's less than you'll get with ProRes and other intermediate codecs. Actual mathematically lossless is rarely needed, and should only be used when it really is. Like delivering VFX with alpha for compositing.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2021, 21:12   #15  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by PCU View Post
x264/265 is not 100% lossless.
They are in their lossless modes.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2021, 22:19   #16  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Quote:
Originally Posted by benwaggoner View Post
It wouldn't be difficult at all, and allows for VBV compliance for profile @ level. Just use --cu-lossless, and coding units that can be efficiently encoded as lossless get encoded as lossless. Lots of fun info about lossless mode here: https://x265.readthedocs.io/en/master/lossless.html.

And yes, about 2.5:1 for content with grain or other random noise is about what you can expect. Totally clean content in Long GOP can go way, way lower. That's less than you'll get with ProRes and other intermediate codecs. Actual mathematically lossless is rarely needed, and should only be used when it really is. Like delivering VFX with alpha for compositing.
3:1 is all what you really need.
kolak is offline   Reply With Quote
Old 13th July 2021, 00:00   #17  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Quote:
Originally Posted by benwaggoner View Post
x265 lossless can be sped up a lot by doing IDR-only (--keyint 1) and using a faster --preset. You can really crank up -F in that case, as each frame is encoded independently. And better yet, you'll get HW decode on modern GPUs, which can give you performance back.
In Simple X264 I try to code with X265 lossless and I can only pass in custom parameters --keyint 1 --lossless. I can't pass a preset, what am I doing wrong?

Edit: I am using x265 version 3.2, is that why?
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 13th July 2021 at 00:03.
GMJCZP is offline   Reply With Quote
Old 13th July 2021, 07:30   #18  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Posts: 347
Quote:
Originally Posted by benwaggoner View Post
x265 lossless can be sped up a lot by doing IDR-only (--keyint 1) and using a faster --preset. You can really crank up -F in that case, as each frame is encoded independently. And better yet, you'll get HW decode on modern GPUs, which can give you performance back.
HEVC higher levels @High Tier have a minimum compression ratio base requirement of 4 so good luck with that HW decode.
rwill is offline   Reply With Quote
Old 13th July 2021, 23:09   #19  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
My favorite lossless codec is MagicYUV. Very fast.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 13th July 2021, 23:53   #20  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by rwill View Post
HEVC higher levels @High Tier have a minimum compression ratio base requirement of 4 so good luck with that HW decode.
Yeah, it comes out as High Tier Level 8.something. So far, the HW decoders I've tried seem to work okay. Not having to deal with interframe prediction saves a whole lot of work.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner 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 10:37.


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