Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stabilize a goPro video with ffmpeg?

I want to know an EASY way to stabilize a goPro video on Windows, using a simple batch and ffmpeg.

like image 388
Julien Mazars Avatar asked Aug 03 '17 12:08

Julien Mazars


People also ask

How do I make my GoPro footage stable?

Step 1: Go to timeline of iMovie and then open your GoPro clip that you wish to stabilize. Step 2: Now hit the adjust button available on toolbar. Step 3: Go to adjustment bar and then select stabilization option. Step 4: Now select the checkbox representing stabilize shaky videos.

Can you stabilize GoPro footage?

Since the GoPro 5, filmmakers can use the built-in stabilization feature by turning them either on or off. However, there are no other options or ways to adjust the amount of stabilization. It doesn't always work, and footage may still come out shaky.

How can I add stability to a video?

First, select the clip you want to stabilize. Then, in the Effects panel, choose Distort › Warp Stabilizer. Next, apply the effect by double-clicking or by dragging the effect to the clip in the Timeline or the Effect Controls panel. After the effect is added, analysis of the clip begins immediately in the background.

Why is my GoPro video so shaky?

GoPro videos are more likely to jerk and shake because most GoProers shoot videos in movement or sports like during swimming, surfing, hiking, cycling, mountaineering and skiing. Especially, if you are using the earlier version of GoPro, it would happen more easily since the stabilization ability is not so well.


1 Answers

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.

like image 151
Julien Mazars Avatar answered Sep 28 '22 04:09

Julien Mazars