Using ffmpeg I can mux multiple JPEG into a M-JPEG container without any loss since it is a just a plain bitstream copy:
ffmpeg -framerate 30 -i input%03d.jpg -codec copy output.mjpeg
Recently linux distributions started to offer JPEG-XL command line tools. I can now recode (lossless recompression) of JPEG into JXL:
% file input.jpg
input.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1016x708, components 3
% cjxl input.jpg output.jxl
% djxl output.jxl output.jpg
% md5sum input.jpg output.jpg
bea9e9c74e3580f6196ba9ac21509652 input.jpg
bea9e9c74e3580f6196ba9ac21509652 output.jpg
However I fail to understand how to create a JXL animation (more than one JPEG) ?
Eg:
% ffmpeg -framerate 30 -i input%03d.jpg -codec copy output.jxl
[...]
[image2 @ 0x55c22e680040] The specified filename 'output.jxl' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0x55c22e680040] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[image2 @ 0x55c22e680040] Cannot write more than one file with the same name. Are you missing the -update option or a sequence pattern?
av_interleaved_write_frame(): Invalid argument
frame= 2 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.06 bitrate=N/A speed= 223x
video:224kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
Or:
% cjxl input*.jpg output.jxl
Unknown argument: input002.jpg
Use 'cjxl -h' for more information