-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heif-enc output is 4x bigger than equivalent macOS Finder output #1266
Comments
The quality settings are not comparable. 85 in libheif is not 85 in macOS. You need to find a compression setting that gives comparable output quality. That depends a lot on the encoder plugin used. |
Thanks for the response. I believe I've been using If you have any sensible defaults you can share for this that would be greatly appreciated, otherwise I will do some tinkering. Having the default file size generated by this tool be much smaller would be a great win. |
Attempting to figure out my exact encoder being used:
|
libde265 is the decoder. You are probably using the x265 encoder. |
Some interesting findings for anyone new to this world like me:
So I am using
simply setting it to use a |
That would be because the default x265 quality is 50. (Which maps to crf 25 in x265 itself.) Which may or may not be similar to Apple's quality 85 or 80 or whatever gets it to the same size, you'd have to actually view the file to figure that out. The default x265 preset is already "slow". All you did was accidentally change the q. (Side note: Apple will always be faster than libheif, at least for heic itself, since it's using hardware encoding on the Mx chip to do it instead of software.) |
Thanks, you're right about that 🤦, although the x265 docs appear to be wrong:
edit: oh you mean the libheif default for x265's preset |
That's x265's default, libheif sets its own defaults. OK, I admit it was confusing the way I put it, I should have said x265 plugin. |
There may be some additional confusion here around controlling "how much CPU effort" an encoder should use. Many/most of libheif's encoders provide an integral When encoding images via libheif, libvips currently exposes control over |
Hello,
This is related to an issue I opened in another project (lovell/sharp#4182) but seemed more relevant here since I'm able to reproduce this with
heif-enc
.Basically, I'm trying to convert PNG images to HEIC and am finding the output to be much bigger than expected. For example, testing this command:
heif-enc -q 85 -C average input.png -o output.heic
produces a 736KB HEIC. However, if I take the same input image in Apple's Finder tool with 85 quality and export to HEIC, the result is much smaller at 168KB. This is a pretty drastic difference in compression size.I've zipped and included all the images I'm testing with.
Archive.zip
The text was updated successfully, but these errors were encountered: