deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.2k stars 86 forks source link

JPEG XL support #730

Open avidseeker opened 10 months ago

avidseeker commented 10 months ago

Is your feature request related to a problem? Please describe. Can't view .jxl files

Describe the solution you'd like

It would be great if JPEG XL support was added to the image viewer. A jxl viewer for Android is already released.

deckerst commented 10 months ago

Duplicate:

TPS commented 5 months ago

@deckerst #56 has disappeared, along w/ associated discussion. Could you restate why it's been denied?

deckerst commented 5 months ago

Weird. I can't check now but maybe it's a temporary issue on GitHub side. At least i didn't delete it. Maybe the original issue creator did?

deckerst commented 5 months ago

I've asked GitHub Support to check why that issue is missing and how to recover it.

deckerst commented 5 months ago

Support replied:

Upon checking the link you have provided, it looks like there may be an issue with the user that originally opened the issue. Unfortunately, I am not able to restore that issue for you. However, I've managed to capture the conversations for you:


on Aug 25, 2021
Hi, i'm looking for support of libjxl. do you think it should wait until standard is finalized so after 2021 ends and the libjxl reaches v 1.0? Current version is 0.6.0 and is a nightly but there is also 0.5.0 that works well. Do you find is such a niche feature? How aves read images, do it uses ffmpeg?
Also are you looking to implement AVIF for images or av1 codec for videos or other aomedia codecs when they are stable?

jonsneyers commented on Aug 25, 2021 The standard is finalized already - the codestream in January 2021, the file format in April 2021.

For images, Aves uses mostly the native device capabilities (e.g. it will decode HEIF images if your Android device can). Beyond this native support, I added TIFF support because my partner was using it for her work.

For videos, Aves uses FFmpeg, with this custom configuration. I sometimes update this configuration to support formats I find among my old videos (like AVI) or open formats (like OGG).

I intend to add AV1 support, but I don't know when I'll get to it. Let's say before the year is up.

AVIF support should naturally come to Aves for people with Android 12. For Android 11 and lower, I'm not sure, but maybe I can use FFmpeg AV1 support to decode AVIF images... It's something I need to try.

As for JPEG XL, I had no special plan, for or against it. My goal is not to support all formats, but to support 1) mainstream formats, old and new, and 2) other formats that I personally need.

I'll leave this issue open so that others can voice their interest in this.

deckerst added the codec label on Aug 25, 2021

deckerst added the P4 label on Sep 1, 2021

Quackdoc commented on Sep 8, 2021 JXL support would be phenomenal. Here can be viewed comparisons against other codecs. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/index.html

Both chrome and firefox are working on implementing JXL, and have support in their respective nightlies. IMO it would be a great addition to have. especially as I have already seen a good amount of interest in it from various websites.

deckerst added the type:feature label on Sep 9, 2021

Donkey-Doug commented on Oct 2, 2021 In my opinion you should just wait until google natively adds the codec to android.

jonsneyers commented on Oct 3, 2021 In my opinion you should just wait until google natively adds the codec to android.

I disagree with that strategy. Image codecs are evolving faster than the long tail of old Android versions. For example, if you rely on native Android support, you are only just now getting WebP support on 98% of the Android devices - and WebP is 11 years old and was added very quickly to Android. Animated WebP still won't work though, if you rely on native Android support (and lossless or alpha will still have bugs in some older Android versions) AVIF support will be added to Android 12 (but it will be a slow, old decoder), JXL support is not even planned yet to be added at the Android system level. That means it will probably take at least until 2030, probably longer until the strategy of "just wait until Google natively adds it to Android" will result in AVIF and JXL working fine on most Android devices.

Quackdoc commented on Oct 3, 2021 I second Jon's opinion. Webp can obviously be forgiven. As it is quite a low priority picture format. But JXL is an incredibly useful and efficient codec. to put in perspective. from various formats. I managed to make my image collections take almost 1/2 the space when using visually lossless transcode to jxl. (over 30gb excluding gifs). at a low effort.

another reason is simply people need to strech out their phones. for a lot of people thanks to electronics prices, is not a viable option to upgrade, and lots of phones are "EOL" (excluding custom ROMs. But I don't believe that should be something to take into consideration for the vast majority of users). and JXL can, and for some people such as myself will be what helps their phones make that extra mile.

I believe AVIF should get the same treatment as it is unrivaled in terms of animation size. (especially considering avif animations can literally be av1 videos.)

Donkey-Doug commented on Dec 2, 2021 I don't think every dev should manually add codecs. Seems unreasonable.

Quackdoc commented on Apr 25, 2022 hello, I was wondering if you had any further thoughts towards using ffmpeg for added picture codec support. JXL has is now in ffmpeg master branch. and I still have yet to find any gallery app foss or not that has support for JXL.

BlueSwordM commented on Apr 26, 2022 Yes yes yes.

Please add in JPEG-XL support since it now has native support of it inside of ffmpeg. Adding dav1d for AV1 stuff would also be nice, but JPEG-XL would be my priority as well.

@LuisB79 LuisB79 commented on Sep 19, 2022 Has android support seen some progress?

@OkyDooky OkyDooky commented on Nov 29, 2022 • In case anyone hasn't heard, Google is dropping JXL support from Chromium. Many have voiced their displeasure at this news in the official issue ticket after initially praising Google for initially supporting it. Many of those are developers or representatives from major companies, as pictured below. This decision seems to come from a team manager who also is a developer of the WebP format. Some speculate that this is a faction in Google deliberately engaging in anti-competitive practices. Regardless, the format is not dead and many developers (mainly of independent projects) have gone ahead with adding support. The official reference encoder can be found here: https://github.com/libjxl/libjxl Also, I found FFmpeg in their list of apps that support the format, which may help implementation in Aves, though I don't know if it would help beyond the transcoding process (which Aves doesn't do, as far as I'm aware of). JXL_industry_support [image attached]

@Quackdoc Quackdoc commented on Dec 1, 2022 jpegxl app that can open jxl images, not good as a picture viewer, but a working android example https://github.com/oupson/jxlviewer

@deckerst deckerst mentioned this issue on Dec 2, 2022 Support for modern image formats. #426 Closed @OkyDooky OkyDooky mentioned this issue on Dec 3, 2022 [Feature Request] Support JPEG XL (JXL) SimpleMobileTools/Simple-Gallery#2669 Open @deckerst deckerst mentioned this issue on Feb 17, 2023 Support of Jpeg XL format #530 Closed @gianni-rosato gianni-rosato commented on Feb 17, 2023 Are there any plans for this?

@deckerst Owner deckerst commented on Feb 18, 2023 It's labeled "P6", meaning "issue unlikely to be addressed".

And in general there's no plan for features in Aves.

@gianni-rosato gianni-rosato commented on Feb 25, 2023 That's disappointing to hear. An image viewer that cannot display all of my images is useless to me unfortunately. Seeing as JXL is likely going to be very popular for professional workflows, I will start looking elsewhere.

@OkyDooky OkyDooky commented on Feb 26, 2023 That's disappointing to hear. An image viewer that cannot display all of my images is useless to me unfortunately. Seeing as JXL is likely going to be very popular for professional workflows, I will start looking elsewhere.

If you look above, you'll find a usable viewer. It is not a gallery app, but it will allow you to view any .jxl files you have. The only caveat is you need to open them from a file manager. Aves could add support by either leveraging the library from the viewer app or using FFmpeg's existing support, I assume. If anyone else knows of any image viewer apps for Android that currently support .jxl, go ahead and post them.

@gianni-rosato gianni-rosato commented on Feb 26, 2023 I already use jxlviewer, but it's lack of support for HDR images & lack of functionality as a gallery are setbacks for me currently. It is a nice utility though, and gets the job done most of the time.

@OkyDooky OkyDooky commented on Feb 26, 2023 It's still pretty early days, so I'm learning to be patient. Jpegli is a nice thing to tame my appetite, though. And it may help generate interest for the format it was derived from. I would really like for all my gallery apps for Android to support JPEG XL, already (like Aves and Simple Gallery Pro), but the developers seem to not be so keen to add support. The guy from SGP conceded to adding it once there's enough things already using it, though. I think I can kind of understand, because this could open up the doors for all kinds of issue tickets to be opened up, either asking for a particular subfeature of the format to be added or fixing yet another bug introduced by the newness of the format and/or codec.

@TPS TPS commented on Feb 26, 2023 Aves could add support by either leveraging the library from the viewer app or using FFmpeg's existing support, I assume.

@deckerst If you're not interested in either of these steps, would it be possible to just link to the JxLViewer app when JxL images are detected? That'd really help users, w/o committing yourself to fully supporting JxL in Aves.

@TPS TPS commented on Feb 26, 2023 Jpegli is a nice thing to tame my appetite, though. And it may help generate interest for the format it was derived from.

If anyone else knows of any image viewer apps for Android that currently support .jxl, go ahead and post them.

@OkyDooky Is this mentioned jpegli such an app or a typo? I can't seem to find such software.

@OkyDooky OkyDooky commented on Feb 26, 2023 @deckerst If you're not interested in either of these steps, would it be possible to just link to the JxLViewer app when JxL images are detected? That'd really help users, w/o committing yourself to fully supporting JxL in Aves.

He could simply utilize the "Open With..." feature, like opening videos in VLC or mpv or whatever and let people choose the viewer app. But, it gets back to the main issue of detecting and listing JXL files in the first place. Maybe he could simply have Aves scan for .jxl files and allow their entries to be displayed along with the other media files, but it would only list the file name and have a placeholder thumbnail that just has the file extension (e.g. "JXL") and nothing else on it. I'm figuring it also would have no metadata support until the format gains proper support.

@OkyDooky OkyDooky commented on Feb 26, 2023 @OkyDooky Is this mentioned jpegli such an app or a typo? I can't seem to find such software.

Neither. It is an encoder for regular JPEGs that takes advantage of some of the innovations from the JXL reference encoder to create noticeably improved JPEG files. It's even retroactively giving it features the format doesn't technically support, like HDR. The encoder mozjpeg has been the leader in quality and stability for quite a long time, but jpegli shows some big visual improvements over it! You can see some examples in this twitter thread by the main author (Nitter version, for privacy). This basically happened because JPEG XL has the feature of being able to losslessly transcode legacy JPEGs into JXL files and usually see some drop in file size. When they were developing that part of the reference encoder, they found ways of making regular JPEGs even better than before, so they extracted that part into its own encoder and have been developing it alongside the main JXL one. (I lurk in the JPEG XL Matrix room and sometimes comment)

@deckerst Owner deckerst commented on Feb 26, 2023 @deckerst If you're not interested in either of these steps, would it be possible to just link to the JxLViewer app when JxL images are detected? That'd really help users, w/o committing yourself to fully supporting JxL in Aves.

No thank you. I do not want to redirect or rely on specific apps.

Besides, if the user is interested in niche formats like this one, they will already have opinions on what apps to use with them.

@TPS TPS commented on Feb 26, 2023 • Is this mentioned jpegli such an app or a typo? I can't seem to find such software.

Neither. It is an encoder for regular JPEGs that takes advantage of some of the innovations from the JXL reference encoder to create noticeably improved JPEG files. It's even retroactively giving it features the format doesn't technically support, like HDR.

@OkyDooky Where does 1 access this wondrous software? I only see links to the results, not anything useful to a user.

@OkyDooky OkyDooky commented on Feb 26, 2023 Besides, if the user is interested in niche formats like this one, they will already have opinions on what apps to use with them.

That's what I was thinking when I suggested the more agnostic approach of the "Open With..." option. At this point, adoption might not be the best thing to attempt for the sake of a few others. In the (hopefully near) future, on the other hand, it will likely be a good idea to do so, and probably a lot easier to, as well.

Where does 1 access this wondrous software?

Idk, man! I just know it's a thing and it produces pretty cool results, so far. It's probably on Github, maybe under the JXL project umbrella (but I'm not sure). But, it's also probably a command line tool, right now. It sounds very work-in-progress, too. They have a Matrix room and a Discord server that are bridged together (all messages show up in both), so you could join either one and ask there. They seem mostly friendly. ;P

@LuisB79 LuisB79 commented on Mar 2, 2023 sad to see a great app not embrace the future, i guess someone will make a replacement.

@TPS TPS commented on Mar 2, 2023 • It's BSD 3-clause licensed. Anyone who's sufficiently motivated can fork & do as they like.

@antermin antermin commented on Mar 4, 2023 I have tried the Pix APK by @novomesk (the link is available in the JPEG XL Discord #adoption channel) and it can display JXL files.

He described how he added JXL (and AVIF) support to Pix in this comment.

@deckerst deckerst mentioned this issue on Apr 24, 2023 Add jxl image format support #605 Closed @OkyDooky OkyDooky commented on Apr 30, 2023 I was asking in the bridged Matrix-Discord room/channel about features that JXL might or might not support and one of them is an "Album" feature. Essentially, it's the idea of holding multiple images in one file to conveniently share with others (like a .zip that could be previewed and accessed directly in a gallery app without unpacking anything). According to @jonsneyers, the capability to do this should appear in the 2nd edition of the format spec. This is definitely a "down the road" feature, but it should be trivial(-ish) to add to Aves, since it already has most of the features necessary to handle this. The thumbnail could display a fanned or "paged" array of some of the contained images (or there could be a small icon inside), while the view mode could display the images like it does with Motion Photos (showing the JPG as one "sub photo" and the MP4 as another).

I could open a separate issue for this, sometime in the future. But, I see this as being a great feature for convenience, since it can be hard to wrangle and share multiple images at a time. It could help in general in organizing, but it would be great to be able to send an image set or collection as a single file that could just be viewed in a gallery app without any extra steps.

@OkyDooky OkyDooky commented on May 4, 2023 @antermin It seems that Pix was developed using Qt, while Aves is developed using Flutter. The addition of JXL support was by leveraging existing Qt plugins for it. So, I don't think that will help Aves, in this case. ☹️ I did a quick search just now to see what the situation is with Flutter and JXL and it...doesn't look too promising, at the moment. Link Link Link (This might give a lead) If someone familiar with Flutter could make a good proposal there to include support for it via a developer plugin (and they implement it), then that should make it fairly easy for deckerst to add (at least basic) support to Aves.

@deckerst deckerst mentioned this issue on Aug 26, 2023 JPEG XL support #730 Closed @OkyDooky OkyDooky commented on Nov 25, 2023 While this doesn't change the technical roadblocks to implementing JXL in Aves, adoption of the format has recently increased yet again. I successfully managed to advocate for support for be added in the privacy browser Cromite (successor to Bromite): uazo/cromite#351

@k2arim99 k2arim99 commented on Dec 11, 2023 Just voicing my support, aves is the best gallery app for big libraries so it's natural some users will want to use jxl for efficiency

@Quackdoc Quackdoc commented on Dec 11, 2023 for anyone who want's to try and get JXL supported, the media_kit stuff could be added as an image fallback (if something quick and dirty is needed, JXL could be added to video) media_kit can be built with libjxl support using this patch though it may need updated since I haven't worked on it for a long time now.

then you would need to as said before, set up mediakit as a fallback path. I haven't done any work with media_kit for a long time now, but last time I checked, it worked perfectly fine as an image library too.

@mgorny mgorny commented on Dec 26, 2023 JPEG XL support would be a great thing for people with large photo libraries who want to save space without losing any data.

Ahmad-Amsyar commented 4 months ago

There is a JPEG XL Android library by awxkee that may be helpful for this app.

Another known Android app that has used this library is Image Toolbox by T8RIN.

At the time of this writing, the library currently uses JPEG XL 0.9.2. Based on the latest Cloudinary blog post, JPEG XL 0.9 has surpassed WebP and AVIF in lossless encoding.

Ahmad-Amsyar commented 4 months ago

The JPEG XL Android library by awxkee has now been updated to libjxl version 0.10.1, which means that JPEG XL library has surpassed AVIF and WebP for both lossless and lossy encoding.

Even the decode speed is much faster than both AVIF and WebP.