My experience with trying to get really good video quality has pretty much made this apparent: make it as stable as you can when you shoot it. Shaky video is going to have issues even after you ‘stabilise’ it, because there’s some things you simply can’t fix yet with software.
One of these issues is called ‘rolling shutter’. You can see evidence of it here, in this video:
…at around 30 seconds, where the video appears to wobble and shake – and this is after de-shaking. Well, we’re talking shot during landing in Queenstown, NZ, and the aircraft was none too steady, but yeah, ffmpeg had issues with this shot.
So, stabilising video is a two-step process. I.e., it involves a analysis scan, then the conversion process. Here are the commands I use:
ffmpeg -i a017di.mov -vf vidstabdetect=stepsize=6:shakiness=6:accuracy=9:result=transform_vectors.trf -f null -
ffmpeg -i a017di.mov -vf vidstabtransform=input=transform_vectors.trf:zoom=1:smoothing=30,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -preset slow -tune film -crf 18 -acodec copy a017dis.mov
I failed to explain my own naming conventions – prefixes and suffixes attached to the name, so I sort-of could tell what I’d done to a video just by the name, so I will, now. The .MTS becomes an .mov… but the naming breakdown is thus:
* ‘a’ – for first go, ‘b = second go, and so forth
* ‘017’ – the number of the video itself, taken from the original name
* ‘di’ – de-interlaced
* ‘s’ – stabilised (I only do this if the video needs it
* ‘A’, ‘B’, ‘C’ and so forth – a clip (portion) of a fairly long shot
So far, this seems to work for me. By-the-way, I tend to highlight bash commands in my browser, copy and paste them into terminal (bash) and then run the command (press [Enter]). SO much easier than typing the whole thing out!
I’m in process at-the-moment of de-interlacing footage for my next video: a walk on Mou Waho, an island on Lake Wanaka.