234 points · by 867-5309 · 4y ago · 91 comments
FFmpeg relies on libjxl for decoding and encoding. Support added in
https://git.videolan.org/?p=ffmpeg.git;a=commit;h=458cc7e314...
https://git.videolan.org/?p=ffmpeg.git;a=commit;h=5f0b4e9c70...
The Windows static builds have binaries with this support. The linux and MacOS builds don't, as yet.
If it works, it works. Haven't encountered any major issues with writing them in my years.
Off the top of my head, take this make example:
%.o: %.c %.h
gcc -o $@ $<
mkdir $*
cp $@ $*
and spell it out a bit more: $MATCH$.o <- $MATCH$.c $MATCH$.h
gcc -o $OUT$ $FIRST_DEPEND$
mkdir $MATCH$
cp $OUT$ $MATCH$
Obviously this needs a lot more thought than that, but I think newbies would find the 2nd format much more friendly than the first.For new projects, people may prefer to use something like Zig as the build system. But a build system is not what will make the project faster or magically add new features and fix bugs. What makes that happen is developers being comfortable with the source code, including its build system.
I look forward to the day when JPEG XL is widely supported by web browsers.
The compression ratio will not be as good as full jpeg-xl (having skipped the lossy stages), but you still get something in the range of 20% smaller file sizes without any additional quality loss whatsoever.
This is something WEBP/AVIF/HEIC does not offer. When using those codecs, you will either have to accept additional lossy compression artifacts on top of the artifacts of the original jpeg codec, or convert in lossless mode with worse compression ratio.
Is there some variant of libjpeg-turbo that works for XL?
There are some attempts at such comparisons, e.g. https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_im... (cloudinary might be biased, as they are a major driver behind jpeg-xl)
My overall impression is that it's roughly on par or a little behind with AVIF, somewhat ahead of HEIC and very ahead of WEBP (and jpeg of course) in quality-per-byte.
As for encode and decode speed, it's a bit slower than WEBP but beats AVIF and HEIC by a margin (unless these codecs are back by hardware encoders). However, all three codecs are relatively new and there may be a lot of future speed optimizations possible. Especially jpeg-xl, which isn't "backed" by general AV1 (AVIF), vpx (WEBP) or HEVC (HEIC) research, may have a particularly large yet to be tapped potential for (hardware-specific) optimizations. As far as I know, jpeg-xl is also "simpler" than those other codecs (which basically used the iframes of their complex sibling video codecs as a base), so it might be more feasible to have more competing implementations.
But time will tell, and it will of course also largely depend on the adoption and thus network effects of these formats who much "love" each format receives from open source and proprietary software vendors.
Which reminds me, what the heck happened to old-school progressive JPEGs? I remember seeing them a lot in the early days of images on the internet, but it seems like you don't see them around anymore. Why is that?
> On average, decoding a progressive JPEG image is equivalent to decoding the baseline one 3 times.
This feature wasn't added for a reason[0].
[0]: https://developers.google.com/speed/webp/faq#does_webp_suppo...
Perhaps this means it can be shoehorned in anyways?
dont see hollywood moving away from it pretty soon.
problem is jpeg2k just is too heavy to compute.
As I use mpv both as a video player and as an image viewer, this is great news for me.
https://github.com/whyboris/Video-Hub-App/pull/702
My software extracts screenshots from videos and shows them in a nice browsable searchable gallery.
I recently tried to build a command to automatically add a silent audio track on inputs, while also adding pause and concatenate 300 small videos, all of this in a single command, but I still have a lot of trouble understanding how stream selector work.