View Single Post
Old 6th June 2019, 21:35   #1  |  Link
szabi
Registered User
 
Join Date: Nov 2004
Posts: 251
Video stabilization (deshake)

Hi

I tried to stabilize my video, however I could not get what I expected.
Video source is 3840×2160@29.970, mp4.
First I try to use deshaker (v3.1) plugin in virtualdub.
Altered setting from default in 1st pass, scale:Full
Altered setting from default in 2nd pass, edge compensation:None
Because the final video going to be cropped any zoom is not needed.
I was not happy with outcome.

Second try to use DePanStabilize.
Code:
LoadPlugin("C:\My Program Files\MeGui\tools\lsmash\LSMASHSource.dll")
LSMASHVideoSource("D:\Camera\deshake-test\VID_20190606_123345.mp4")
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata)
crop(142, 80, -142, -80)
LanczosResize(1920,1080)
I was not happy with result so I modified the script based on what sample I did find on internet:
Code:
i = ConvertToYV12()
mdata = DePanEstimate(i, range=2, trust=0, dxmax=5, dymax=5, zoommax=1,  log="F:\depanlog.log")
DePanStabilize(i, data=mdata, dxmax=30, dymax=15, zoommax=1, rotmax=0, inputlog="F:\depanlog.log")
crop(142, 80, -142, -80)
LanczosResize(1920,1080)
It did not improve anything, even the created logfile was empty.

Last I did try also came from google search.
Code:
i = ConvertToYV12()
vectors=MSuper().MAnalyse(isb=false,blksize=8, overlap=0,search=5)
globalmotion=MDepan(vectors,pixaspect=1,thSCD1=500)
DepanStabilize(data=globalmotion,cutoff=0.5,mirror=15,prev=0,next=0,blur=50,pixaspect=1,subpixel=2,method=1)
crop(142, 80, -142, -80)
LanczosResize(1920,1080)
Unfortunately this one has crashed whatever I did try.

I created a stack video about each try including one video which only cropped and resized:
Video stabilization (deshake) by Avisynth

The original video is available here: VID_20190606_123345
I would like to ask help what should I do to get a correct result?

Regards
Szabi
szabi is offline   Reply With Quote