I want to know an EASY way to stabilize a goPro video on Windows, using a simple batch and ffmpeg.
Asked
Active
Viewed 7,527 times
2 Answers
15
1) Install ffmpeg on your computer : follow those steps
2) Create a batch file next to the video you want to process. Write the following code :
set input_file=GOPR2665
ffmpeg -i %input_file%.MP4 -vf vidstabdetect=shakiness=10:accuracy=15 -f null -
ffmpeg -i %input_file%.MP4 -vf vidstabtransform=zoom=5:smoothing=30 -vcodec libx264 -preset slow -tune film -crf 20 -an %input_file%_stabilized.MP4
del transforms.trf
3) Run the script, changing the name of the "input_file". Once the script execution is over, your file FILENAME_stabilized.MP4 is created.
NB: the execution of this script reduces a bit the video quality, and remove the audio track.

Julien Mazars
- 1,032
- 11
- 24
-
1This doesn't seem to work anymore, I get an error message `No such filter: 'vidstabdetect'` using ffmpeg version 3.4.6-0ubuntu0.18.04.1. – digijay Jun 25 '20 at 16:08
-
1Why not somehow use the gyroscope metadata recorder by GoPro? You're just throwing away potential perfect stabilisation. – Pithikos Mar 13 '21 at 09:02
-
1@digijay AFAIK vidstab filter is included in FFMPEG only if FFMPEG is specifically compiled to include it. Type ffmpeg -version to see what is enabled in your version or ffmpeg -filters to see a list of embedded filters. – jumpjack Aug 04 '21 at 11:45
-
@jumpjack I saw that, too but not yet tried it. Thanks for the hint, I will give it a try! – digijay Aug 04 '21 at 12:22
-
It works, but audio is lost – Yuriy N. Jan 15 '22 at 16:31
-1
By default vibstabtransform use a zoom feature

Guest
- 1
-
2Hi, this anwser looks like should be a comment for the anwser already provided. If you want to add to it, you can earn some reputation by anwsering actual questions without anwsers and then comeback here, with a comment. Otherwise please read https://stackoverflow.com/help/how-to-answer – Tomasz Juszczak Sep 09 '20 at 13:08