I’ve been using align_image_stack
sporadically over the years, it outputs TIFF files but IIRC without metadata, so I copy over the metadata from the input files into the output files using ExifTool.
align_image_stack man page: align_image_stack man page - hugin-base - General Commands
Usage:
align_image_stack --gpu -a ais_ -m -d -i -C -e 1.tif 2.tif 3.tif
-m = optimize field of view, useful for macro stacks.
-d = optimize radial distortion.
-i = optimize image center shift.
-C = auto-crop result.
-e = input image are fisheye.
To copy metadata: G'MIC request: keep exif info - #4 by Morgan_Hardwood