Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 532316

Summary: Please add support for vid.stab in ffmpeg
Product: Gentoo Linux Reporter: DrSlony <bugs>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description DrSlony 2014-12-11 20:22:28 UTC
Hi

ffmpeg is able to use two video filters called vidstabdetect and vidstabtransform to deshake video. They are the best automatic video deshaking option there is native to Linux. Please add a vidstab USE flag for ffmpeg to trigger --enable-libvidstab during ffmpeg's ./configure invocation. I will open a new issue for getting a vid.stab ebuild.

The following instructions are for any interested to easily try this out by hand, confined to an easily-deletable ~/programs folder.
How to compile ffmpeg with libvidstab support (vid.stab) and deshake video:
mkdir ~/programs && cd ~/programs
git clone https://github.com/georgmartius/vid.stab.git code-vidstab
git clone git://source.ffmpeg.org/ffmpeg.git code-ffmpeg
mkdir ~/programs/vidstab
cd ~/programs/code-vidstab
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/programs/vidstab
make -j8 install
mkdir ~/programs/ffmpeg && cd ~/programs/ffmpeg
PKG_CONFIG_PATH=$HOME/programs/vidstab/lib/pkgconfig $HOME/programs/code-ffmpeg/configure --prefix=$HOME/programs/ffmpeg --enable-nonfree --enable-frei0r --enable-gpl --enable-libx264 --enable-libvidstab
make -j8 install
cd /path/to/video
LD_LIBRARY_PATH=$HOME/programs/vidstab/lib/ $HOME/programs/ffmpeg/ffmpeg -i IN.mp4 -an -vcodec libx264 -preset superfast -crf 18 -vf "vidstabdetect=show=1" out.mp4
LD_LIBRARY_PATH=$HOME/programs/vidstab/lib/ $HOME/programs/ffmpeg/ffmpeg -i IN.mp4 -an -vcodec libx264 -preset slower -crf 23 -vf "vidstabtransform=smoothing=15:zoom=5" -y out.mp4
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-12 10:13:10 UTC

*** This bug has been marked as a duplicate of bug 517890 ***