This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

VidStab support
#1
"Vidstab is a video stabilization library which can be plugged-in with Ffmpeg and Transcode.
Why is it needed
A video acquired using a hand-held camera or a camera mounted on a vehicle, typically suffers from undesirable shakes and jitters. Activities such as surfing, skiing, riding and walking while shooting videos are especially prone to erratic camera shakes. Vidstab targets these video contents to help create smoother and stable videos.
Some of the features include:
  • Fast detection of subsequent transformations e.g. translation and rotations up to a given extent.
  • Low pass filtered smoothing with adjustable horizon.
  • Detection algorithms:
  • Smart and fast multi measurement fields algorithm with contrast selection.
  • Brute force algorithm only for translations.
  • Clipping options: keep blank (black) or keep from previous frames.
  • Optional drawing of measurement fields and detected transformations for visual analysis.
  • Zooming possible to get rid of jiggling borders (automatic mode).
  • Resulting images are interpolated (different algorithms).
  • Sharpening of the stabilized movie to compensate for interpolation effects due to rotation/zooming (only with Transcode).
  • Single pass filter for streaming applications(only with Transcode).
  • Virtual-tripod-mode to get a tripod experience."
https://github.com/georgmartius/vid.stab
Reply
#2
Hmmm,...
To be frank I'm not sure I want to add support for this due to the annoyance of having to do an additional pass. (Single pass is only supported with transcode and I since Hybrid already uses ffmpeg I'm not planing on adding an additional 50+MB to Hybrid.)
That said, here are a few questions:
  • What OS are you on? Since when I would implement this I would require you to do lots of testing to know this works properly before officially adding this.
  • Have you compared this to the 'Stab' Stabilizing filter Hybrid supports through Avisynth and Vapoursynth ? (To know whether it's worth the effort)
  • Assuming you have used the filter, does it support absolute paths with UFT-8 characters like:
    d:\ဒီအ\nëse\Удивление\Tự\否有效
    or at least absolute paths with ascii characters?

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
I use Arch Linux and for Windows I use Wine.
As for the tests, I did some tests and I can say I was very pleased.

I used the following commands:

ffmpeg -i shaky-input.mp4 -vf vidstabdetect=shakiness=5:result="transforms.trf" -f null -
ffmpeg -i shaky-input.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4

Okay, I see there is such support in Avisynth and Vapoursynth but it is for Windows users. I did not know that. I do not have Avisynth and Vapoursynth in Arch Linux  for this Hybrid-encoder. I do not know how I could add this though I installed Vapoursynth in the system.
Reply
#4
Okay, so I would have to do all testing etc. myself, I'll look into it, but this will take some time.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
When calling:
"I:\Hybrid\64bit\ffmpeg.exe" -y -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -c:v rawvideo -vf vidstabdetect=result="E:/Temp/18_11_50_9710_01.trf":shakiness=5:accuracy=15:stepsize=6:mincontrast=0.3 -f null NUL
on Windows I get:
[vidstabdetect @ 00000191f87c67c0] [Eval @ 00000075b21fde20] Undefined constant or missing '(' in '/Temp/18_11_50_9710_01.trf'
[vidstabdetect @ 00000191f87c67c0] Unable to parse option value "/Temp/18_11_50_9710_01.trf"
[vidstabdetect @ 00000075b21fe5b8] Multithreading: use 12 threads
[vidstabdetect @ 00000075b21fe528] Fieldsize: 48, Maximal translation: 50 pixel
[vidstabdetect @ 00000075b21fe528] Number of used measurement fields: 40 out of 40
[vidstabdetect @ 00000075b21fe528] Fieldsize: 16, Maximal translation: 16 pixel
[vidstabdetect @ 00000075b21fe528] Number of used measurement fields: 162 out of 162
[Parsed_vidstabdetect_0 @ 00000191f87cb680] Video stabilization settings (pass 1/2):
[Parsed_vidstabdetect_0 @ 00000191f87cb680]      shakiness = 5
[Parsed_vidstabdetect_0 @ 00000191f87cb680]       accuracy = 15
[Parsed_vidstabdetect_0 @ 00000191f87cb680]       stepsize = 6
[Parsed_vidstabdetect_0 @ 00000191f87cb680]    mincontrast = 0.300000
[Parsed_vidstabdetect_0 @ 00000191f87cb680]         tripod = 0
[Parsed_vidstabdetect_0 @ 00000191f87cb680]           show = 0
[Parsed_vidstabdetect_0 @ 00000191f87cb680]         result = E
sadly it seems like vidstab can only create files in the working directory and not in a given folder.
Won't add support to Hybrid unless that changes.
-> So unless either the authors of the filter change this behavior change this or it is possible and I don't simply know how to do it and someone tells me how this filter will not be supported in Hybrid

Cu Selur

Ps: in case this is my mistake, I created an issue entry in the vid.stab bug tracker, see: https://github.com/georgmartius/vid.stab/issues/66
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#6
In the end it will be solved.
There are a lot of people who have forgotten about Windows I see.
Reply
#7
Send you a link to a dev version for testing via PM.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#8
I see this but the option is disabled.
https://drive.google.com/file/d/1qc-O_Rl...sp=sharing
Reply
#9
Ah damn, forgot that 'no Xsynth' is the default 'Support' option for you.
-> will fix.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#10
The options are visible but seems to have no effect.
Could you recommend some values?
And the *.trf file should be deleted at the end. It should also be seen in the "Job-Queue" section.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)