<p>To stabilize your video you can use the <a href="https://www.ffmpeg.org/download.html" rel="noreferrer">ffmpeg</a> command line tool.</p>
<h2>The easy way: one pass using <code>deshake</code> filter</h2>
<pre><code>ffmpeg -i shaky-input.mp4 -vf deshake stabilized-output.mp4
</code></pre>
<p>The <code>deshake</code> filter has also some <a href="https://www.ffmpeg.org/ffmpeg-filters.html#deshake" rel="noreferrer">optional settings</a>.</p>
<h2>The better way: two passes using <code>vidstab</code> filters</h2>
<p>For better results you can try the two-step process using ffmpeg's <code>vidstabdetect</code> and <code>vidstabtransform</code> filters: (Thanks @Mulvya)</p>
<pre><code>ffmpeg -i shaky-input.mp4 -vf vidstabdetect=shakiness=5:show=1 dummy.mp4
</code></pre>
<p>This will output a <code>transforms.trf</code> that will be read by the second pass:</p>
<pre><code>ffmpeg -i shaky-input.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4
</code></pre>
<p>The <a href="https://www.ffmpeg.org/ffmpeg-filters.html#vidstabdetect-1" rel="noreferrer">vidstab filters documentation</a> explains all the configuration options.</p>

CC BY-SA 3.0
2017-11-17T20:12:45.783Z
I got this error: `No such filter: 'vidstabdetect'`. I guess on some distros (like Ubuntu) this filter isn't included by default.
Flimm
CC BY-SA 3.0
2016-08-10T16:34:52.837Z
There's also the vidstab filters.
Gyan
CC BY-SA 4.0
2020-01-02T12:58:14.577Z
libvidstab is external and GPL, so ffmpeg needs to be configured with `--enable-libvidstab --enable-gpl`
DomTomCat
CC BY-SA 4.0
2022-07-27T10:17:58.433Z
Tried multiple methods so far and the 2nd two-step process is the best quality and simplest so far. Many thanks.
Scott Hather
CC BY-SA 3.0
2016-08-10T14:38:05.310Z
2016-08-10T20:12:47.937Z
2020-06-17T09:53:03.607Z
Duvrai
<p><a href="https://www.blender.org/" rel="noreferrer">Blender</a> has <a href="https://www.blender.org/manual/editors/movie_clip_editor/tracking/introduction.html" rel="noreferrer">motion tracking</a>, which can in turn be used to stabilize video.  Here is a YouTube tutorial showing how to load video footage into Blender's movie clip editor, setting a tracking point, solving the tracking equation, and then discusses considerations about how to balance the various factors between too much and too little stabilization.  The video tutorial is here: <div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/DpIXqAepfxY?start=0"></iframe>
            </div></div></p>

CC BY-SA 4.0
2019-10-15T18:46:02.270Z
Now do it on the command line
forresthopkinsa
CC BY-SA 4.0
2019-10-21T04:00:43.293Z
The original question did not ask for command line.
boatcoder
CC BY-SA 3.0
2016-08-07T11:31:14.727Z
2016-08-07T11:31:14.727Z
Michael Tiemann
<p>Does anyone knows a free video stabilization software for Linux (ubuntu, fedora or something else), whose result is like the Youtube Video Stabilization?</p>

<p>At this moment, to stabilize my video I need to upload my files on youtube and wait a lot until stabilization finishes and then download my files. One software for computer will be helpful, and save a lot of time.</p>

<p>Does anyone knows one?
Thank you!</p>

<video-editor><stabilisation>
Youtube-like video stabilization on Linux
ITChristian
# Youtube-like video stabilization on Linux

(Asked by: username_0 on 2016-08-07)

Does anyone knows a free video stabilization software for Linux (ubuntu, fedora or something else), whose result is like the Youtube Video Stabilization?

At this moment, to stabilize my video I need to upload my files on youtube and wait a lot until stabilization finishes and then download my files. One software for computer will be helpful, and save a lot of time.

Does anyone knows one?
Thank you!

**Tags:** video-editor, stabilisation


---

## 2 answers

### Answer by username_1 on 2016-08-10. Score: 19

To stabilize your video you can use the ffmpeg command line tool.
The easy way: one pass using deshake filter
ffmpeg -i shaky-input.mp4 -vf deshake stabilized-output.mp4

The deshake filter has also some optional settings.
The better way: two passes using vidstab filters
For better results you can try the two-step process using ffmpeg's vidstabdetect and vidstabtransform filters: (Thanks @Mulvya)
ffmpeg -i shaky-input.mp4 -vf vidstabdetect=shakiness=5:show=1 dummy.mp4

This will output a transforms.trf that will be read by the second pass:
ffmpeg -i shaky-input.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4

The vidstab filters documentation explains all the configuration options.

> **Comments:**
> **username_3**: There's also the vidstab filters.  
> **username_2**: I got this error: `No such filter: 'vidstabdetect'`. I guess on some distros (like Ubuntu) this filter isn't included by default.  
> **username_4**: libvidstab is external and GPL, so ffmpeg needs to be configured with `--enable-libvidstab --enable-gpl`  
> **username_5**: Tried multiple methods so far and the 2nd two-step process is the best quality and simplest so far. Many thanks.  

---

### Answer by username_6 on 2016-08-07. Score: 5

[Blender](https://www.blender.org/) has [motion tracking](https://www.blender.org/manual/editors/movie_clip_editor/tracking/introduction.html), which can in turn be used to stabilize video. Here is a YouTube tutorial showing how to load video footage into Blender's movie clip editor, setting a tracking point, solving the tracking equation, and then discusses considerations about how to balance the various factors between too much and too little stabilization. The video tutorial is here:

> **Comments:**
> **username_7**: Now do it on the command line  
> **username_8**: The original question did not ask for command line.  

---

