Best compression (near) lossless format?


(Tobiasz Karoń) #1

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.


(Pat David) #2

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).


(http://4232.cf) #3
optipng -o 7 *

http://optipng.sourceforge.net/

I prefer the sequence of imagenes to the video


(Morgan Hardwood) #4

H.265 is pretty amazing:

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


(Tobiasz Karoń) #5

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?


#6

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


(Pat David) #7

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.


#8

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:


#9

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…


(Omar Brown) #10

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


(Frédéric Devernay) #11

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).


(Frédéric Devernay) #12

See also https://mango.blender.org/production/open-source-4k-dcp-creation-lessons-learned/