georgmartius/vid.stab ? reverse-engineered prompt
Reverse engineered prompt
Build me a video stabilization library in C that plugs into ffmpeg and helps shaky handheld footage look smooth and steady.
I want it to detect motion between frames, estimate the camera movement, and then apply a second pass that compensates for the shake. It should support things like translation and rotation, smoothing over a chosen horizon, zooming in enough to hide black borders, and a couple of crop handling options like keeping blanks or reusing previous frame edges. Please include the two pass ffmpeg filters, one for detecting transforms and one for applying them, and make sure the same frames are seen in both passes so the results line up.
I’d also like a build setup with CMake, tests, and clear install instructions for using it with ffmpeg. If you need to check current ffmpeg build details or library docs online while implementing it, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit