Search code examples
androidffmpegandroid-ffmpegvideo-stabilization

Stabilizing video using FFMpeg in Android


I am trying to stabilize a video using FFMpeg in Android. I am currently using the FFmpeg-Android-Java library but I have also tried MobileFFmpeg as suggested by this question and also FFmpegKit.

I can get the deshaking filter to work but it made my video more shaky so I'm trying to get vidstabdetect and vidstabtransform to work but all the libraries I've tried give me "No such filter: 'vidstabdetect'"

Any ideas how I go about getting vidstabdetect and vidstabtransform to work?


Solution

  • According to the FFmpeg vidstabdetect filter documentation your ffmpeg has to be compiled with --enable-libvidstab to use the vidstabdetect and vidstabtransform filters.

    The min-gpl, https-gpl, and full-gpl packages of FFmpegKit (and same for the older, related MobileFFmpeg) support what they refer to as "vid.stab".