Pass 1 runs ffmpeg 6.1 vidstabdetect (vid.stab 1.1, local motion fields), pass 2...
https://ton.halowerk.com/v1/video-stabilizeOverview
Pass 1 runs ffmpeg 6.1 vidstabdetect (vid.stab 1.1, local motion fields), pass 2 vidstabtransform with the chosen smoothing window (frames), border handling (static optimal zoom, adaptive zoom, black or kept borders) or tripod mode, followed by a light unsharp mask as the vid.stab authors recommend, then H.264 (libx264, CRF by quality) with AAC audio.