Best compression (near) lossless format?

I have 100 000 frames in PNG 32-bit float, I want to save that in highest possible quality (lossless or close to lossless). I do not need the full color depth, 8-bit will suffice. What is key here is the best compression ratio. I’d like to use a inter-frame codec so it can take advantage over the fact that most of the frames are very similar.

I wanted to try CineForm, but I couldn’t fin anything about in in Natron. FFV1 produces files just as big as the source PNG sequence (around 250 GB) - so it’s not an improvement (it’s intra-frame, so I’m not surprised).

If possible I’d prefer to stick to open-source codecs and containers.

1 Like

Highest quality/lossless and compression tend to be mutually exclusive… :slight_smile:

What’s the footage for? Archiving or intermediates? I used to use huffyuv at one point for intermediates, but switched to ffv1 for many things (disk space is cheap, comparatively).

optipng -o 7 *

http://optipng.sourceforge.net/

I prefer the sequence of imagenes to the video

H.265 is pretty amazing:

How-to using FFmpeg:
https://trac.ffmpeg.org/wiki/Encode/H.265

1 Like

Thanks for the replies!

I was considering using HEVC, but unfortunately - I can’t find a codec in Natron. Maybe I should use ffmpeg directly?

lossless h.264 is pretty good, compression-wise. take care not downsampling chroma accidentally.

It is, though I’ve seen anecdotal tests that there is some slight smearing of detail when compared to similar h.264 bitrates.

More importantly - what is the footage for? Is it final output footage you want to keep high quality on? Or intermediates? I guess I assumed that asking for (near) lossless meant it was still in the pipeline somewhere, vs. final export.

I guess the point is that you could fit more quality within a given file size. That said, my dated hardware is not HEVC capable. :cry:

I recently found out about the FLIF file format:

Pretty impressive stuff, hopefully it will get more popular with time because it has really nice properties:

  • efficient lossless compression (comparable or better than H264/JPG2000)
  • lossy compression also available, but happens in pre-processing
  • responsive/progressive (thumbnails? not necessary anymore!)
  • supports animation

Really promising stuff, although I don’t expect JPG or PNG to be replaced any time soon…

1 Like

Natron 2.3.10 can render to the hev 1 codec that is h.265.

2 Likes

The best near-lossless format for VFX may well be OpenEXR with DWA compression, available since OpenEXR 2.2.
DWAB probably works more efficiently in Natron. If you intend to read back your footage in Nuke, use DWAA.
I wish someone could benchmark the different options for digital intermediates (PNG, OpenEXR, OpenEXR DWAA, OpenEXR DWAB, Prores, DNxHR, HEVC with gop size=1) in terms of quality, writing speed, and reading speed. Even a subjective/approximate test would be good.
I forgot JPEG2000 in the list, which is used in DCI, because the Natron write node does not offer the right options (there’s a little bit of work to get the right options in the writer).

1 Like

See also Open Source 4K DCP creation – lessons learned | Tears of Steel