Notifiche
Cancella tutti

Video stabilization

   RSS

0
Topic starter

Anyone know if there are any settings in the Motion plugins (including F_deshake) which will emulate the Tripod setting in the Kdenlive stabilizer? By that I mean will hold the result rock solid.

I have done extensive testing over the years, but have never managed better than removing the worst shakes, to give a reasonable result.

@dejay 

In theory the parameter to use would be "Previous frame same block" (in Motion plugin); but I don't think it is easy to get good results. If you have been following the mailing list try using the external program Gyroflow; it is very sophisticated and uses GPU acceleration to increase performance.

5 risposte
0
Topic starter

Thanks for the Gyroflow tip, but it is not compatible with my camera yet.

As I said, I have done extensive testing over the years and tried all the tracking settings, "Previous frame same block" did come out best for most things, but never gave a really steady result. I found several tutorials, but the advice was conflicting, however I gleaned bits from each and finally got it to do something. A bit of honing and it became good enough for most things, but my requirements have changed and now it is not really good enough.

In the last few days I have tried again using both Motion and Motion 2 point and changed sample rate, block sizes and positions, tracking method, settling speed etc., but did not achieve really satisfactory results. Much improvement (Motion, not Motion 2 point), but not steady enough for my current requirements. Add the very long time it takes to track movement, add a track and render twice, plus with 2 point having to delete many files in /tmp for each new clip and it becomes laborious just trying.

Motion 51 seems to give a better, quicker result, but still not quite stable enough IMO.

I couldn't get F_deshaker to work and gave up trying to work out what all the settings should be, even after visiting the ffmpeg website and looking there.

 

@dejay 

You can try using ffmpeg vidstab filter with the option "stab=fixed" which is called tripod mode. Be careful it is not the "deshake" filter present in CinGG. Or you can use the "dewobble" option also with ffmpeg.
https://ffmpeg.org/ffmpeg-filters.html#vidstabdetect-1
https://ffmpeg.org/ffmpeg-filters.html#toc-vidstabtransform-1
For the dewobble see:
https://www.danielplayfaircal.com/blogging/2021/09/28/introducing-dewobble.html
https://git.sr.ht/~hedgepigdaniel/dewobble

If you can get these filters working in CinGG or otherwise create an external script to use them conveniently, let us know so we can put it in the manual.

0

@DeJay

Motion was rewritten with major improvements in September 2020 by SGE (Georgy) and he is the expert on its usage, but very busy.  At that time he did mention the following and I quote from the manual:

"you may want to preprocess by using ffmpeg’s vidstabdetect and vidstabtransform plugins before importing the video into CINELERRA-GG."

Motion51 uses an entirely different mathematical algorithm than Motion. Setting the sample set size is probably the most important setup change. But I would assume you probably already did that along with Enable Tracking to save some compute time.

0
Topic starter

Phyl, the suggestion seems to be don't stabilise in Cin. Currently I am doing one final test on Motion Prev. frame same block with search steps set very high, Translation search steps 32768 and Rotation 32. It's a 12 second 2160p clip transcoded to DNxHR_HQ and Save co-ords has been running over 2 hours, whether it gives a better result or not, that kind of time is unacceptable. Edit: It doesn't improve things much anyway!

Motion 51 at 32678 gives a much better result in a reasonable time, I need to do more tests to see if it will be acceptable for my purposes.

Andrea thanks, I will have a look at your suggestions.

Posted by: @andreapaz

If you can get these filters working in CinGG or otherwise create an external script to use them conveniently, let us know so we can put it in the manual.

Unfortunately that's not going to happen, I'm no coder.

0
Topic starter

To update this and put it to bed as solved, albeit not quite the the way I hoped, I followed your advice and went with FFMPEG.

I only use the terminal when I can find a script someone has written and posted, rarely even then, it's not something I want to learn, I'm a confirmed GUI man. However, after much searching I found suitable scripts and after a bit of trial-and-error, managed to alter them enough to do almost what I wanted, except for batch processing.

I have three versions of the script for hand held footage, one for static camera, one for static camera with tripod setting invoked and one for moving (walking) clips, this way I can copy and paste the required script into a terminal, add the clip name three times, hit enter and it works. I have honed this to be as easy and fast as I can make it with my limited command-line skills.

It is faster than Motion or Motion 51 and gives a more stable result than either. It sounds like a pain, but it is no worse than using Deshaker in VirtualDub when I edited in Sony Vegas on Windows and it saves time.

I am happy to post further information here if you want me to.

0

@DeJay

Thanks for the update.  Sometimes you just can't do everything from the GUI or from Cinelerra.  I think there is enough information in this Forum thread to assist others looking for stabilization.

Condividi: