Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  21] [ 0]  / answers: 1 / hits: 20988  / 1 Year ago, wed, november 16, 2022, 10:36:41

How can I deshake my video?



I try to use transcode:



transcode  -J stabilize --mplayer_probe -i "input.MTS"


But it causes a segfault.



Trying to use ffmpeg filters:



ffmpeg -i "input.MTS" -vf vidstabdetect=shakiness=5:show=1 out.avi
ffmpeg -i "input.MTS" -vf deshake out.avi


But always have an error "No such filter".



I want to create a simple nautilus script for this.


More From » video

 Answers
2

Currently, ffmpeg from the repository only supports the simpler deshake filter, but does not support the better vidstab filters.



You have a few options to get vidstab support: compile or use a PPA.






Compiling



This is the best option if you also want to customize your ffmpeg or use the latest version.



First you will have to compile libvidstab or use the libvidstab-dev package. Currently only 19.04 Disco Dingo and newer provides this package. Alternatively, 16.04 Xenial Xerus users can use the libvidstab-dev package from the mc3man PPA).



To compile libvidstab:



$ sudo apt-get install build-essential cmake
$ mkdir ~/ffmpeg_sources ~/ffmpeg_build
$ cd ~/ffmpeg_sources
$ wget -O https://github.com/georgmartius/vid.stab/archive/master.zip
$ unzip master.zip
$ cd vid.stab-master
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/ffmpeg_build .
$ make
$ make install


Now follow How to Compile FFmpeg on Ubuntu. When you get to the step where ffmpeg is configured then add --enable-libvidstab to the list of configure options.






mc3man PPA



FFmpeg current release plus git PPA for 16.04 Xenial Xerus:



sudo add-apt-repository ppa:mc3man/ffmpeg-test
sudo apt-get update
sudo apt-get install ffmpeg-static


Now run ffmpeg2 (note the "2").






Usage



See the vid.stab usage instructions.






Also see




[#27489] Friday, November 18, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
riffnkful

Total Points: 390
Total Questions: 123
Total Answers: 110

Location: Puerto Rico
Member since Sat, Mar 13, 2021
3 Years ago
;