Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FFV1 encoding for archival
#1
I did some fairly extensive comparisons a while back (that I don't think I necessarily posted anywhere in any kind of organised thread or anything like that) between several different mathematically lossless video encoders, when I was first trying to decide on the best one to use for archiving all my LaserDisc captures. At that time, I was comparing HuffYUV, Lagarith (a derivative of HuffYUV), UtVideo, and MagicYUV. At the risk of oversimplifying to the point of seeming dismissive, my results basically indicated that although UtVideo and MagicYUV were both excellent overall (both offering much better flexibility than Lagarith does), and both seemed to be faster (with MagicYUV being *incredibly* quick), Lagarith ultimately offered the most efficient compression. Since that was my primary concern (I didn't really need the extra flexibility or speed for 8-bit 4:2:2 YUV LD captures anyway) I settled on using Lagarith.

However, since then, I've been hearing good things about ffmpeg's FFV1 codec, which apparently is used extensively for archival by national libraries and the like. I've also been increasingly concerned with whether I should switch to 10-bit captures for at least some of my LaserDiscs (the ones where I am particularly bothered about preserving the video in the highest possible archival quality, which isn't necessarily all of them). 10-bit captures are orders of magnitude larger than the 8-bit ones, but I wondered if the supposedly extremely efficient compression of FFV1 might help to narrow that gap and make it viable to keep hundreds of 10-bit LD caps archived. So I figured I'd give it a bash.

Since I was aiming for the best possible compression, I opted to use its 2-pass mode... and immediately ran into a problem. When compressing a 10-bit video, the first pass (or a single-pass encode) worked fine, but as soon as it ran the second pass, I got something like this:

[Image: EE3722-CLD-S350-side1-mkv-snapshot-00-05-222.png]

Very pretty! Not exactly what I was after, though. (Reminds me of how bismuth crystallises.) One thing that's kinda cool is you can clearly see the 4 slices in the output (see how the image is split into 4 boxes).

I spent more than 24 hours farting about trying to debug my command line to see what I'd done wrong but as I ran out of things to change I became increasingly convinced it was just broken. Sure enough, I eventually found something that I didn't see the first time I tried to look online to see what the issue might be: somebody raised a bug report 5 years ago saying that 10-bit 2-pass encodes were broken, and it still hasn't been fixed.

RaljOneed Wrote:Summary of the bug:
When source video has more than 8 bits per component and ffv1 codec is used in 2 pass mode, resulting file is corrupted.
(https://trac.ffmpeg.org/ticket/5405)

So, for now, 10-bit needs to be 1-pass only.

But what about 8-bit captures, for the (probably vast majority) of LDs I don't particularly need a high quality version of the video from? Mostly it's the audio I'm after, anyway.

LAGARITH: 55.5 GB
FFV1, 1-pass, Golomb Rice coder (default for 8-bit): 50.8 GB
FFV1, 1-pass, range coder (default for 10-bit+): 52.1 GB
FFV1, 2-pass, Golomb Rice coder: 50.8 GB

Yeah, you read that right: the 2-pass encode was exactly the same size as the 1-pass encode. No, it isn't a tiny bit smaller. Both of them are exactly 54,547,736,802‬ bytes. The data is not identical though, they're just the same size. So all the 2-pass encode does is take longer; it doesn't compress this particular file any better.

I wonder if maybe the 2-pass mode might be more worthwhile for something like a 1080p/4K+ video, but it would appear that for standard definition LaserDisc captures it's completely pointless.
Reply
Thanks given by: PDB


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Help] Encoding audio with LFE2? LucasGodzilla 8 1,634 2023-06-04, 08:49 PM
Last Post: zoidberg
  Flagging 1080p25 as 1080i25 without re-encoding Dr. Cooper 3 1,520 2021-12-07, 01:14 PM
Last Post: FreaQ
  [Help] Encoding HDR to SDR awsmguy145 3 2,344 2020-09-28, 12:01 PM
Last Post: Chewtobacca
Thumbs Up Avisynth parallel encoding spoRv 27 18,905 2020-04-03, 06:10 AM
Last Post: spoRv
  x264 encoding from Adobe Premiere DoomBot 26 17,733 2019-03-25, 08:26 PM
Last Post: jaminmc
  [Help] Encoding issue with Xvid4psp v5.0.37.8 Beber 7 4,933 2018-12-12, 12:40 AM
Last Post: deleted user
  Bitrate and video encoding spoRv 0 2,764 2017-05-01, 11:19 AM
Last Post: spoRv
  Encoding : where to go from here...? Docsap 2 3,726 2017-02-26, 04:42 AM
Last Post: spoRv
  H.265 Encoding PDB 3 4,117 2016-10-18, 08:49 PM
Last Post: Feallan
Lightbulb Splitting the encoding in various phases... spoRv 0 2,825 2015-06-10, 12:41 AM
Last Post: spoRv

Forum Jump:


Users browsing this thread: 2 Guest(s)