Reputation: 1270
I create lots of 4K 60fps 3D animations, and every frame of these animations are exported as separate PNG files to my disk drive. These PNG files use their own lossless compression method, but the file sizes are still quite large (a 30 second animation can take anywhere between 4 and 18 GB). I'm interested in alternative lossless compression formats to reduce the file sizes even further.
The reason I'm interested in lossless compression is because I create a LARGE variety of animations, and lossy algorithms are not always consistent in terms of visual fidelity (what doesn't create visible artifacts for one animation might for another).
Do you have good recommendations for general purpose lossless video codecs that can achieve superior performance to storing the PNG frames individually?
So far, I have attempted to use h.265 lossless using ffmpeg:
ffmpeg -r 60 -i out%04d.png -c:v libx265 -preset ultrafast -x265-params lossless=1 OUTPUT.mp4
But the result was a 15.4GB file when the original PNG files themselves only took up 5.77 GB in total. I assume this was because, for this particular animation, interframe compression was far worse than intraframe compression, but I don't really know.
I understand that this is highly dependent on the content I'm attempting to compress, but I'm just hoping that I can find something that's better than storing the frames individually.
Upvotes: 2
Views: 2052
Reputation: 93261
For lossless archival of RGB inputs, I suggest you try x264's RGB encoder.
ffmpeg -framerate 60 -i out%04d.png -c:v libx264rgb -qp 0 OUTPUT.mp4
Upvotes: 1