v0.1.2 Flicker test bash script
This bash script uses the lossless animated Webp to create a loop to compare Webp and JXL to each other and a source PNG.
The Webp/JXL filenames are overlaid to display hidden info (ie filesize/CVVDP score/encoding parameters).
sRGB signaling is enforced for all images and finally temporary PNG intermediate files are deleted.
Dependencies: FFmpeg, libwebp, and libjxl
The Webp/JXL filenames are overlaid to display hidden info (ie filesize/CVVDP score/encoding parameters).
sRGB signaling is enforced for all images and finally temporary PNG intermediate files are deleted.
#!/usr/bin/env bash
for f in in.png; do
ffmpeg -hide_banner -loglevel error -color_primaries bt709 -color_trc iec61966-2-1 -i "$f" \
-vf "format=rgb24,drawtext=text='$(basename "$f")':fontcolor=white:fontsize=12:box=1:[email protected]:boxborderw=8:x=20:y=20" \
-pix_fmt rgb24 png.png
done
for f in *.webp; do
dwebp -quiet "$f" -o decwebp.png
ffmpeg -hide_banner -loglevel error -color_primaries bt709 -color_trc iec61966-2-1 -i decwebp.png \
-vf "drawtext=text='$(basename "$f")':fontcolor=white:fontsize=12:box=1:[email protected]:boxborderw=8:x=(w-text_w)/2:y=20" \
-pix_fmt rgb24 webp.png
done
for f in *.jxl; do
djxl "$f" decjxl.png --quiet
ffmpeg -hide_banner -loglevel error -color_primaries bt709 -color_trc iec61966-2-1 -i decjxl.png \
-vf "format=rgb24,drawtext=text='$(basename "$f")':fontcolor=white:fontsize=12:box=1:[email protected]:boxborderw=8:x=w-text_w-20:y=20" \
-pix_fmt rgb24 jxl.png
done
img2webp -lossless -m 6 -loop 0 -d 1000 png.png webp.png jxl.png -o Webp-vs-JXL_flicker.webp
rm -f png.png decwebp.png webp.png decjxl.png jxl.png

