Body: <p>I produce 3D animations and I keep an archive of the final rendered animation (lossless 16 bpc RGB tif sequences) in case I need to re-upload it somewhere else in the future. It is much faster to just transcode the archival file again than re-rendering it.</p>
  <p>However, I have a lot of them, and I need to keep the file sizes down while maximizing quality.</p>
  <p>Of all the codecs I tested, VVC (libvvenc) and HEVC (libx265) seem the most promising. In terms of the encoding parameters, I narrowed it down between these:</p>
  <p>VVC:</p>
  <p><code>ffmpeg -i &quot;16bpc_rgb_input_%04d.tif&quot; -y -c:v libvvenc -preset slow -tier high -qpa 0 -period 1 -vvenc-params bitrate=700M out.266</code></p>
  <p>HEVC:</p>
  <p><code>ffmpeg -i &quot;16bpc_rgb_input_%04d.tif&quot; -y -c:v libx265 -preset slower -crf 9 -pix_fmt yuv444p12le out.mp4</code></p>
  <p>Both of these produce files that are a very similar file size and are about the size I'd like to keep them at.</p>
  <p>My intuition would tell me the HEVC should be better quality because of the pixel format used; <code>yuv444p12le</code> should preserve much more information than the <code>yuv420p10le</code> used in VVC (this is the only pixel format it supports right now), yet despite this, some of the metrics tell a different story:</p>
  <p><a href="https://i.sstatic.net/XNC9GRcg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XNC9GRcg.png" alt="enter image description here" /></a></p>
  <p>(The PSNR metric in this table is a straight average over all frames, and the final average is an average over all input videos. The PSNR was computed using the 16bpc RGB .tif sequence as the reference.)</p>
  <p>Basically, the PSNR metric was generally still substantially lower for HEVC than VVC across an average of 6 input videos I tested, despite the fact that the source was 16bpc and HEVC was using a better pixel format (12 bit versus 10, and 444 versus 420).</p>
  <p>I can get a slightly better PSNR if I use <code>-crf 1</code> with HEVC rather than <code>-crf 9</code>; the issue is that this explodes the file size way beyond what is acceptable.</p>
  <p>I realize that one metric (PSNR) isn't everything, and I can't visually see a difference when extracting frames from both and comparing side by size. Ultimately, though, I still have to make a decision, and <strong>I don't have a sense for what's more important to prioritize; is it the pixel format or should it be the PSNR? Why?</strong> I'm just wanting a general understanding.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-21T04:14:11.920Z
Comments.Text: PSNR in the 50s is high enough that it doesn't matter.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-21T23:48:35.663Z
Comments.Text: @Gyan, if this is the case, I assume you would prioritize the better pixel format?
Comments.UserDisplayName: EllipticalInitial
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-22T04:35:52.707Z
Comments.Text: Yeah, I would keep full chroma (444)
Comments.UserDisplayName: Gyan
Tags: <ffmpeg><video-quality><codec><file-formats><transcoding>
Title: Advice choosing an archival format; prioritize pixel format or PSNR?
UserDisplayName: EllipticalInitial
ThreadText: # Advice choosing an archival format; prioritize pixel format or PSNR?
  
  (Asked by: username_0 on 2024-10-20)
  
  I produce 3D animations and I keep an archive of the final rendered animation (lossless 16 bpc RGB tif sequences) in case I need to re-upload it somewhere else in the future. It is much faster to just transcode the archival file again than re-rendering it.
  
  However, I have a lot of them, and I need to keep the file sizes down while maximizing quality.
  
  Of all the codecs I tested, VVC (libvvenc) and HEVC (libx265) seem the most promising. In terms of the encoding parameters, I narrowed it down between these:
  
  VVC:
  
  `ffmpeg -i "16bpc_rgb_input_%04d.tif" -y -c:v libvvenc -preset slow -tier high -qpa 0 -period 1 -vvenc-params bitrate=700M out.266`
  
  HEVC:
  
  `ffmpeg -i "16bpc_rgb_input_%04d.tif" -y -c:v libx265 -preset slower -crf 9 -pix_fmt yuv444p12le out.mp4`
  
  Both of these produce files that are a very similar file size and are about the size I'd like to keep them at.
  
  My intuition would tell me the HEVC should be better quality because of the pixel format used; `yuv444p12le` should preserve much more information than the `yuv420p10le` used in VVC (this is the only pixel format it supports right now), yet despite this, some of the metrics tell a different story:
  
  [![enter image description here](https://i.sstatic.net/XNC9GRcg.png)](https://i.sstatic.net/XNC9GRcg.png)
  
  (The PSNR metric in this table is a straight average over all frames, and the final average is an average over all input videos. The PSNR was computed using the 16bpc RGB .tif sequence as the reference.)
  
  Basically, the PSNR metric was generally still substantially lower for HEVC than VVC across an average of 6 input videos I tested, despite the fact that the source was 16bpc and HEVC was using a better pixel format (12 bit versus 10, and 444 versus 420).
  
  I can get a slightly better PSNR if I use `-crf 1` with HEVC rather than `-crf 9`; the issue is that this explodes the file size way beyond what is acceptable.
  
  I realize that one metric (PSNR) isn't everything, and I can't visually see a difference when extracting frames from both and comparing side by size. Ultimately, though, I still have to make a decision, and **I don't have a sense for what's more important to prioritize; is it the pixel format or should it be the PSNR? Why?** I'm just wanting a general understanding.
  
  **Tags:** ffmpeg, video-quality, codec, file-formats, transcoding
  
  > **Comments:**
  > **username_1**: PSNR in the 50s is high enough that it doesn't matter.  
  > **username_0**: @username_1, if this is the case, I assume you would prioritize the better pixel format?  
  > **username_1**: Yeah, I would keep full chroma (444)  
  
  ---
  
  ## 0 answers
  
  