Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
25th November 2024, 23:42 | #21 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,972
|
Quote:
A 1080p(ish) image of my cat (taken with a very old phone so it doesn't have a huge amount of detail): PNG default compression 6 - 1,687,864 bytes PNG maximum compression 9 - 1,568,618 bytes JXL default speed 7 - 923,194 bytes JXL slowest speed 9 - 898,895 bytes Progessive JXL speed 7 - 2,210,651 bytes Progessive JXL speed 9 - 1,703,089 bytes JXL lossy 90% quality - 181,999 bytes JPEG 90% quality - 298,577 bytes JPEG 90% quality, no chroma sub-sampling - 322,603 bytes The default lossless speed is usable but faster speeds are very slow for what appears to be only a small increase in compression, at least in non-progressive mode. Last edited by hello_hello; 25th November 2024 at 23:52. |
|
25th November 2024, 23:57 | #22 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,599
|
Quote:
Just think of the browser case alone, and the millions/billons of incorrectly displayed PNG images on the net (!) . Think of all the software that uses ffmpeg for the backend, and they probably use the "auto" conversion routine. And it's not just a little bit off, sometimes it's +/- 10-12 valuesfor 8bit RGB (!) . Not only that, they probably use the "fast" swscale conversion, not the accurate swscale conversion algorithm, another few pixel values off (regardless of PNG tags). Even grey scale values can be off for the latter (!). I'd argue the swscale accurate conversion routine should be the default setting when using swscale. It's not 2001 anymore with single core computers. What's the point of using a "lossless" format if the displayed values are off, sometimes significantly waaay off , or a some avoidable rounding errors are introduced from a fast conversion. ? The truth is nobody care much about color accuracy. It if looks mostly ok, that's good enough for most people I'm sure that's what you say to all the ladies Or avoid ffmpeg for that scenario, or use workarounds . But of course... a cat No, seriously live action content can often compresses differently than anime or cartoons, so thanks for that quicky test But in terms of compatibility, jpeg-xl still has quite low compatibility for usage cases. For compatibility, unfortunately PNG is still up there for lossless. webp is better in terms of lossless RGB compression, decent for compatibility but still a distant second to PNG |
|
26th November 2024, 07:12 | #23 | Link |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 234
|
I think JPEG XL should be the gold standard for most use cases, lossy and lossless, and especially at the higher end of quality; we've finally got a successor to JPEG, GIF, and PNG, but astonishingly, it is scarcely supported anywhere. Doubtless, there are agendas not to do so: Chrome, for example, did but support was removed or disabled. Apple is supporting it, though.
When I tried cjxl, I was impressed with the results; it beat cjpegli, PNG, and losslessly repacked old JPEGs, gaining a bit of compression. The last feature would be useful in squeezing the size of the many mobile photos we have today, taking up GB after GB. Gianni Rosato, the SVT-AV1-PSY developer, did some comparisons: https://giannirosato.com/blog/post/jpegli/ https://giannirosato.com/blog/post/image-comparison/ |
26th November 2024, 07:56 | #24 | Link |
Registered User
Join Date: Aug 2024
Posts: 326
|
JXL is NOT scarcely supported in most areas, especially in free softwares, but it is scarcely supported in browsers just because some "guy" at Google randomly decided to ditch it and Mozilla also randomly decided to put it behind "beta" walls, that just eliminated 80% of the potential user, thus probably eliminated 99% of the potential use case. (no one wants their pictures only visible to 20% of the users right?)
(I'm calm, I'm very calm) Although it kinda sounds like "big social media companies offloads their bandwidth cost to people who uses their products (computational cost when decoding)", unlike AV1 which has hardware decoding (although YouTube uses software decoding when HW decoding is not available instead of fallback to VP9), but big medias are gonna "save" the bandwidth anyways, if it's not cost you computational power, then it's quality of the content the cost. Last edited by Z2697; 26th November 2024 at 07:59. |
26th November 2024, 07:57 | #25 | Link |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 234
|
Concerning FFmpeg's -colorspace switches, it seems that setting them before the input merely marks the stream and doesn't do any conversion. Setting them after the input causes swscale to be called several times.
Before: Code:
ffmpeg -loglevel debug -colorspace bt709 -color_trc bt709 -color_primaries bt709 -color_range tv -i Meridian.mp4 -frames:v 1 -f null - Code:
[vost#0:0/wrapped_avframe @ 0000023d4cd81000] Starting thread... [vf#0:0 @ 0000023d4cd7c600] Starting thread... [vist#0:0/h264 @ 0000023d4d5b6040] [dec:h264 @ 0000023d4cd7c780] Starting thread... [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0000023d4cd77000] Starting thread... Press [q] to stop, [?] for help [h264 @ 0000023d4d431c00] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0000023d4d431c00] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0000023d4d431c00] Format yuv420p chosen by get_format(). [h264 @ 0000023d4d431c00] Reinit context to 3840x2160, pix_fmt: yuv420p [h264 @ 0000023d4d431c00] no picture [h264 @ 0000023d4d249700] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 0000023d4d249700] no picture [h264 @ 0000023d4d302480] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 0000023d4d302b40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 0000023d4d5aa3c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 0000023d4d431c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 0000023d4d249700] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [graph -1 input from stream 0:0 @ 0000023d4cd80700] w:3840 h:2160 pixfmt:yuv420p tb:1/60000 fr:60000/1001 sar:1/1 csp:bt709 range:tv [AVFilterGraph @ 0000023d4d5b33c0] query_formats: 3 queried, 6 merged, 0 already done, 0 delayed Output #0, null, to 'pipe:': After: Code:
ffmpeg -loglevel debug -i Meridian.mp4 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -color_range tv -frames:v 1 -f null - Code:
[vost#0:0/wrapped_avframe @ 000002654ca40fc0] Starting thread... [vf#0:0 @ 000002654ca3c580] Starting thread... [vist#0:0/h264 @ 000002654d246040] [dec:h264 @ 000002654ca3c740] Starting thread... [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000002654ca37000] Starting thread... Press [q] to stop, [?] for help [h264 @ 000002654d0c1bc0] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 000002654d0c1bc0] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 000002654d0c1bc0] Format yuv420p chosen by get_format(). [h264 @ 000002654d0c1bc0] Reinit context to 3840x2160, pix_fmt: yuv420p [h264 @ 000002654d0c1bc0] no picture [h264 @ 000002654ced9700] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 000002654ced9700] no picture [h264 @ 000002654cadeac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 000002654cf92ac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 000002654d3b8b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [h264 @ 000002654d0c1bc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 000002654ced9700] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [graph -1 input from stream 0:0 @ 000002654ca200c0] w:3840 h:2160 pixfmt:yuv420p tb:1/60000 fr:60000/1001 sar:1/1 csp:unknown range:unknown [format @ 00000265519fa400] Setting 'color_spaces' to value 'bt709' [h264 @ 000002654cadeac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [format @ 00000265519fa400] Setting 'color_ranges' to value 'tv' [auto_scale_0 @ 000002654ca40740] w:iw h:ih flags:'' interl:0 [format @ 00000265519fa400] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format' [h264 @ 000002654cf92ac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [AVFilterGraph @ 000002654d244e80] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed [auto_scale_0 @ 000002654ca40740] w:3840 h:2160 fmt:yuv420p csp:unknown range:unknown sar:1/1 -> w:3840 h:2160 fmt:yuv420p csp:bt709 range:tv sar:1/1 flags:0x00000004 [auto_scale_0 @ 000002654ca40740] [framesync @ 0000026551a684d0] Selected 1/60000 time base [auto_scale_0 @ 000002654ca40740] [framesync @ 0000026551a684d0] Sync level 1 [h264 @ 000002654d3b8b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [graph -1 input from stream 0:0 @ 000002654ca200c0] video frame properties congruent with link at pts_time: 0 [h264 @ 000002654d0c1bc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 000002654ced9700] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 [swscaler @ 0000026551bb2280] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert [h264 @ 000002654cadeac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0 Output #0, null, to 'pipe:': Last edited by GeoffreyA; 26th November 2024 at 08:03. |
26th November 2024, 08:13 | #26 | Link | |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 234
|
Quote:
|
|
26th November 2024, 10:01 | #27 | Link | |
Registered User
Join Date: Aug 2024
Posts: 326
|
Quote:
WebP and AVIF are free format as well, I don't think they are the reason behind the removal of JXL. (Or maybe, in a conspiracy view, they aren't really free after all, Google has some secrect income from them?) |
|
26th November 2024, 10:48 | #28 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,293
|
Quote:
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
26th November 2024, 11:37 | #30 | Link | |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 234
|
Quote:
|
|
26th November 2024, 15:33 | #31 | Link | |
Registered User
Join Date: Apr 2024
Posts: 303
|
Quote:
|
|
26th November 2024, 16:38 | #33 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,599
|
Yes ffmpeg apng is affected .
Quote:
Quote:
Workarounds are to pipe ffmpeg to ffmpeg , or aviysnth script clearing the props like propclearall() - so in that case it would "look" to ffmpeg like an unflagged file, then you could use zcale to control the YUV=>RGB conversion in ffmpeg. You could also do the YUV=>RGB conversion directly in the avs script , and/or use it to write out a png sequence. |
||
26th November 2024, 16:50 | #34 | Link | |
Registered User
Join Date: Aug 2024
Posts: 326
|
Quote:
Code:
zscale=pin=2:p=2:tin=2:t=2 |
|
26th November 2024, 17:46 | #36 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,293
|
Does anybody have any Jpeg XL samples I can store on my 'Test Files HDD'?
I tried downloading some from the web but they download as PNG
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
26th November 2024, 18:18 | #37 | Link | |
Registered User
Join Date: Aug 2024
Posts: 326
|
Quote:
https://github.com/libjxl/libjxl/releases https://www.gyan.dev/ffmpeg/builds/ |
|
26th November 2024, 18:42 | #38 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,293
|
Quote:
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
26th November 2024, 18:45 | #39 | Link |
Registered User
Join Date: Aug 2024
Posts: 326
|
There's official test data as well
https://github.com/libjxl/testdata |
26th November 2024, 18:46 | #40 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,293
|
Thanks... but it's way above my skill set.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
Tags |
colorspace, ffmpeg, ffmpeg gui, image-quality |
Thread Tools | Search this Thread |
Display Modes | |
|
|