JacobDev1 / xl-converter

Easy-to-use image converter for modern formats. Supports multithreading, drag 'n drop, and downscaling.
https://codepoems.eu/xl-converter
Other
167 stars 5 forks source link

Issues converting gifs to jxl #2

Closed nikgtasa closed 1 year ago

nikgtasa commented 1 year ago

So i have about 145 gifs that i wanted converted and their filesize reduced. Put them all in the program, gave it lossless intelligent conversion and left it for several hours. Came back to progress (and program) stuck at 92%. Restarting it with skipping converted files option makes it skip all of them. Some gifs themselves are slowed down too much as well. Don't think it's size related. Program doesn't have a viewable log so Win10 22H2, i7-8700k, 24gig ram is all the relevant info i can think of.

JacobDev1 commented 1 year ago

Hello!

Thanks for using my program.

I've successfully reproduced the issue. For now, don't use intelligent effort with GIFs.

This will be fixed in the next update.

As for slow GIFs. The timings are technically correct, but image viewers seem to add a significant delay.

XL Converter relies on the official CJXL encoder, If you'd like to verify it.

nikgtasa commented 1 year ago

I haven't thought of using other viewers actually. I've been using cjxl before and had gotten slowed down gifs too. I'll try and check it with a different viewer once the update rolls out.

JacobDev1 commented 1 year ago

For the record, converting GIFs only works with Effort 7.

Anything bigger returns

./lib/jxl/image.h:57: JXL_CHECK: xsize <= orig_xsize_
Illegal instruction (core dumped)

It's related to multi-threading.

JacobDev1 commented 1 year ago

I have capped the Effort at 7 for GIFs / APNGs. For images, CJXL still works great.

This issue is very peculiar.

My guess is that the CJXL encoder clashes with QThreadPool. This is something I cannot fix.

The only solution I see is replacing CJXL with FFmpeg / ImageMagick, which I will be exploring in the future.

I'd like to point out that animated media support is not a priority. Images is where the focus is.