# vid.stab for the web (johnmcm.com) The WebAssembly module behind johnmcm.com's Video Stabilizer (/stabilize-video): [vid.stab](https://github.com/georgmartius/vid.stab) by Georg Martius and contributors, at commit `e2445c4081658318223762a696eb1c645c2d7168` (14 Aug 2026), behind the few C functions in `src/glue.c`. ## Licence vid.stab is under the GNU Lesser General Public License, version 2.1 or later (`COPYING.LESSER`, copied beside the built module in `vendor/local/vidstab@1/`). It was GPL up to and including v1.1.2 and was relicensed afterwards with its copyright holders' permission (RELICENSE.md in its repository); the commit above is after the relicensing, and every source file in it carries `SPDX-License-Identifier: LGPL-2.1-or-later`. `src/glue.c` is under the same licence. vid.stab is built unmodified; this folder (the Dockerfile and the glue) is everything needed to rebuild the module and relink it against a changed vid.stab. FFmpeg is not involved: FFmpeg's configure script lists libvidstab among the libraries that need `--enable-gpl`, a packaging choice from when vid.stab was GPL. Compiling vid.stab on its own avoids that. ## What it does The page decodes the video in the browser, shrinks each frame to about 480 pixels and makes it grey, and passes it to `stab_detect`, which runs vid.stab's motion detection and keeps the local motions in memory. At the end `stab_transforms` turns them into a smooth camera path (vid.stab's L1 optimal path by default) and returns one transform per frame - shift, rotation and zoom - which the page applies to the full-size frames with a canvas. Only the similarity model is used: lens distortion estimation, wobble correction and the rotational (fov) model are off, since a 2D canvas applies shift, rotation and zoom only. ## Building `Dockerfile` builds it with the Emscripten image pinned by digest: CMake with `-DUSE_OMP=OFF -DSSE2_FOUND=FALSE -DVIDSTAB_LPSOLVER=builtin` (no threads, plain C kernels, and vid.stab's own LP solver rather than GLPK, which is GPL). Run `build.ps1` with Docker Desktop running; the module goes to `frontend/vendor/local/vidstab@1/`.