Log in

View Full Version : GenMotion and DePan plugins for global motion compensation


Pages : 1 2 3 4 5 [6] 7

Roco
2nd March 2008, 19:16
Have you tried Deshaker (VirtualDub plugin)?

Yes I have, with no success so far... The online documentation doesn't make much sense without doing an infinite number of tests...

Roco
4th March 2008, 10:46
After testing many other apps & plugins including After effects, I came to the conclusion that there is no software for such a task -there is not enough technology today for such a precise stabilzation, especially automatic, even if you show them the static object(s).

mikeytown2
4th March 2008, 11:04
After testing many other apps & plugins including After effects, I came to the conclusion that there is no software for such a task -there is not enough technology today for such a precise stabilzation, especially automatic, even if you show them the static object(s).

If your feeling adventurous you could try cinelerra
http://heroinewarrior.com/cinelerra/cinelerra.html#MOTION
http://forum.doom9.org/showthread.php?t=135040

Example
http://youtube.com/watch?v=3jYFJw1dT18

Another Example
http://www.vimeo.com/302809
"910 frames shot by the mighty Canon EOS 20D. 2 motion tracking passes and color timing in Cinelerra. The changing brightness made automatic motion tracking impossible, so manual tracking was used" This vid looks like it could have used HDRAGC http://strony.aster.pl/paviko/hdragc.htm

Roco
5th March 2008, 18:41
If your feeling adventurous you could try cinelerra


Not that adventurous! I'd rather go to the Jungle for treasure hunting like Indiana Jones!!! :p

Seriously now, after your post, I went there and ... I came back!
I installed Ubuntu Studio and then Cinelerra, but the number of issues I encountered made me running back to Billy's Windows (unfortunately)! Half of the times I booted on Ubuntu Studio, Gnome or something didnt started, also before I run Cinelerra I had to type some strange instructions in a console to free more ram (which reminded me the old days of DOS back in 1994 when I bought my first PC), I couldn't always find my partitions (I never understood why it was so hard), when I did find them the playback of most files was sluggish, although I did install all the updates and additional codecs/players. Also the Cinelerra's interface was a bit problematic and it couldn't load my raw avis. So I didn't actually tested that stabilization feature but I don't regret it. If I did, I might become ...unstable! :)

Thanx for the links though!

I have heard something for Fusion and Nuke, I wonder if anyone knows how good is that software for stabilization... I have some respect for Macs...

johnmeyer
5th March 2008, 20:03
Yes I have, with no success so far... The online documentation doesn't make much sense without doing an infinite number of tests...

Well, I actually did write a manual for this which you'll find in lots of places (people just took it and copied it). Here's one of the authorized posts:

http://www.sundancemediagroup.com/articles/deshaker_guide.htm

Most of this was designed to help someone who had never used VirtualDub, so it may be too basic for you. However, it provides some initial settings that work pretty well.

In our case, you are trying to remove extremely tiny shaking. If you do some Google searching on "Deshaker" and "film," you may come across some posts from many years ago that discuss the settings to use in order to remove the "gate weave" (sometimes called gate jitter) that all film exhibits because of the fact that each frame of film, both in the camera and then in the projector, doesn't come to rest in exactly the same position as the previous frame. This can very effectively be removed by Deshaker.

g-force
6th March 2008, 16:32
Roco,

My very first post is dedicated to your problem!
I've had a lot of success with the following script that I created for a very similar problem.

Let me know how this works!


orig=last
temp=orig.TemporalSoften(7,255,255,25,2)
rep=repair(temp,orig,mode=16).TemporalSoften(1,255,255,25,2)
source=Interleave(rep,orig,rep)
mdata=DePanEstimate(source, range=1, trust=0, dxmax=1, dymax=1)
DePan(source, data=mdata, offset=1)
SelectEvery(3,2)

You will need repair from here:

http://home.pages.at/kassandro/RemoveGrain/

You may have to play around with dxmax and dymax for your application, and then you'll have to crop the edges by the appropriate amount. I may write a function for this if it works for more people than just myself.

-G

Roco
7th March 2008, 23:25
johnmeyer,
Thanx for the response, you have done a great job with the guide, also congratulations to the author of Deshaker!

It worked very good, to a degree that I wouldn't mind for some slight instabilities, but unfortunately not at the resolution I wanted which is 3008x2000. While it passed the first pass succesfully, at the second pass, no matter what I tried, it causes the following runtime error:

http://forum.doom9.org/attachment.php?attachmentid=8191&stc=1&d=1204928117

I wonder if the author could fix this...

g-force,
Welcome to the forum and thank you very much for the suggestion, but at some basic tests I did, the script didn't work for me as expected, but I will experiment a bit more with the parameters.

g-force
8th March 2008, 00:02
g-force,
Welcome to the forum and thank you very much for the suggestion, but at some basic tests I did, the script didn't work for me as expected, but I will experiment a bit more with the parameters.

Thanks for the warm welcome! I didn't even think that your source is way larger in resolution that what I'm used to. You may need to increase dxmax and dymax as a result.

Hope you get something that works!

-G

g-force
10th March 2008, 19:04
Roco,

have you had a chance to play around with this yet? I can take a whack at it if you want to post a clip.

-G

Roco
12th March 2008, 22:32
Roco,

have you had a chance to play around with this yet? I can take a whack at it if you want to post a clip.

-G

Thank you very much g-force for your interest and your offer, but I cannot post a sample of that material (I wish I could). I was occupied with some other stuff until today so I will know in about 2-3 days what solution will be more suitable (if any) and I will let you know.

g-force
13th March 2008, 17:57
Thank you very much g-force for your interest and your offer, but I cannot post a sample of that material (I wish I could). I was occupied with some other stuff until today so I will know in about 2-3 days what solution will be more suitable (if any) and I will let you know.

No worries. Let me know what you find out!

-G

thetoof
14th December 2008, 06:52
Little question about pixaspect=

I use a LOT this very useful script by g-force (turned into a function for convenience) before encoding anamorphic (so I don't resize to square pixel aspect ratio).

function stab (clip orig, float "pixaspect"){
pixaspect=default(pixaspect,1)
orig
temp = last.TemporalSoften(7,255,255,25,2)
Interleave(temp.Repair(last.TemporalSoften(1,255,255,25,2)),last)
DePan(last,data=DePanEstimate(last,trust=0,dxmax=10,dymax=10),offset=-1, pixaspect=pixaspect)
return SelectEvery(2,0)}

It is said in the docs (actually, I saw that in the MVtools docs) that the pixaspect should be 1.094 for standard PAL and 0.911 for standard NTSC.

However, this calculation yields to other values... where did I mess up??
NTSC
720x480 is actually 640x480 (4:3)
y * 720 = 640
y = 0.8888....

720x480 is actually 853.3333x480 (16:9)
y = 1.185185185.....

PAL
720x576 is actually 768x576 (4:3)
y * 720 = 768
y = 1.06666........

720x576 is actually 1024x576 (16:9)
y = 1.42222.....

edit: and (why) is it such a big deal to use pixaspect=1 even if I'm filtering an anamorphic clip??

kemuri-_9
14th December 2008, 09:49
It is said in the docs (actually, I saw that in the MVtools docs) that the pixaspect should be 1.094 for standard PAL and 0.911 for standard NTSC.

However, this calculation yields to other values... where did I mess up??


it seems that those calculations are more seeming to be based on a source with a width of 704 not 720
so
640/704 ~ .910
768/704 ~ 1.10

the aspect numbers you posted/quoted result as:
640/.911 ~ 703
768/1.094 ~ 702

so it seems that these are fairly close to being based on 704,
but not quite, so maybe some rounding error?

probably based on 704 to account for cropping on 'typical' overscan (which may or may not actually be true for what you're dealing with)

Fizick
14th December 2008, 14:46
about aspect you may read "Analog capture guide" http://forum.doom9.org/showthread.php?t=78797

g-force
15th December 2008, 21:50
Fizick, correct me if I'm wrong, but DePan should only need to know about pixaspect for Zoom or Rotation, both of which the script thetoof posted doesn't use.

Fizick
15th December 2008, 23:11
g-force, only if rotation is not 0.
So, you are wrong (partially) :)

g-force
16th December 2008, 21:09
I think I understand. I'll try one more time:

Fizick, correct me if I'm wrong, but DePan should only need to know about pixaspect for Rotation, which the script thetoof posted doesn't use. ?!?!

-G

Fizick
16th December 2008, 21:31
g-force,
yes, it is correct.

but IMHO, all this aspects is not so important practically :)

gaillague
4th May 2009, 08:07
Hello all,
This is my first post ever and I want to thank the community, but this question is perhaps especially for Fizick.

I have problems with DePanStabilize with the average method method=1
Many parameter do not longer work when i use before mdepan() or mvdepan() for global motion estimation.

eg dxmax,dymax,rotmax,addzoom, zoommax

However they work fine when i use DepanEstimate() for the global motion estimation but it's less interesting for me because there is no rotation estimation.

It seems to me that the average method give a very good deshaking, close to the Vdub Plugin Deshaker.
Unfortunately without all this parameters, it's very hard to tweak precisely the motion stabilization and the zoom.

exemple of non working script
a=last
vectors = a.MSuper().MAnalyse(isb = false,blksize=8)
globalmotion = a.MDepan(vectors)
a1 = a.DePanStabilize(data=globalmotion,method=1,cutoff=0.5,dxmax=0,dymax=0,rotmax=0,addzoom=true)
return a1

thanks in advance

Fizick
5th May 2009, 04:51
dxmax=0 (and dymax=0, rotmax=0) should not work for method=1 for any vector source (MDepan, DePanEstimate).
The current code contains division of dx by dxmax, etc
It was unclear for me, how to process special case dxmax=0, etc

gaillague
5th May 2009, 09:13
thank you for reply

dxmax=0 (and dymax=0, rotmax=0) was only an (extrem) exemple but dxmax =x (and dymax=y, rotmax=z ) do'nt work too (with method=1 and M(v)Depan as vector source.
The stabilisation works (damn good) but no correction is possible.
The addaptive zoom do'nt work too.

DePanStabilize(data=globalmotion,method=1,dxmax=10,dymax=20,rotmax=0,addzoom=false)
or
DePanStabilize(data=globalmotion,method=1,dxmax=60,dymax=60,rotmax=30,addzoom=true)

are giving absolut identical results.

Fizick
5th May 2009, 20:30
gaillague,
Oh, yes, dxmax, etc are disabled for method=1. It seems I did not get good result that time.
But it is not dependent on vector source. DepanEstimate should not work too.
You should wait some more advanced developer for motion stab. Sorry.

gaillague
5th May 2009, 21:07
You should wait some more advanced developer for motion stab :rolleyes:

I'll wait....
But it is not too annoying, the tool works anyway very fine :)

In any case,thanks very much for all your work.
:thanks::thanks:

Fizick
6th May 2009, 19:30
I will fix the doc about dxmax, etc.
But addzoom should work with method=1

gaillague
6th May 2009, 22:09
addzoom is not working too :(
always with method=1 & MDepan as vector source

mvtools2 v 2.4.2
Depan v 1.10.0

Fizick
6th May 2009, 23:11
I found that I use DePan v1.10.1, January 27, 2008 :)
Seems, I forget to publish it.
Changes is minimal (fixed bug with blur mode for subpixel=1), but V1.10.0 really does not work with addzoom for some strange reason.
I will upload the update

gaillague
7th May 2009, 08:34
Yes it works now
thanks Fizick
:thanks:

Mini-Me
30th July 2011, 23:39
Sorry to necro this thread, but is the source code available for Depan/DepanStabilize?
DepanEstimate includes the source with the binary, but Depan/DepanStabilize do not.

Thanks :)

Fizick
5th August 2011, 18:53
Well, i am totally out of avisynth world now. :(
So, source Depan code is released today. But it was my first plugin, and probably the worst code ever written :)
Good luck!

Mini-Me
5th August 2011, 20:01
Well, i am totally out of avisynth world now. :(
So, source Depan code is released today. But it was my first plugin, and probably the worst code ever written :)
Good luck!

Don't worry; I think everyone believes their early code to be the worst code ever written. :D I'm glad you decided to make it available anyway. Thank you!

videoFred
8th August 2011, 08:56
Well, i am totally out of avisynth world now. :(

I'm sorry to hear this... why?


So, source Depan code is released today. But it was my first plugin, and probably the worst code ever written :)


Well, it's the best stabilizer for Avisynth and I got it perfect working now! After many tests, I have found that correct levels for the base clip are very important. So I'm feeding DePanEstimate with a special tweaked clip. I'm using colorUYV(autogain=true) for this. ColorYUV(autogain=true) is often wrong, but it works very good for DePanEstimate().

The trust parameter is very important too. It sets the scene change detection.

I have tested this on many different clips and the result is almost always 100%, with trust=1.5.

I will upload my new stabilizing script here today. :)

Fred.

fluor
9th August 2011, 23:38
I just discovered this fantastic plugin and it does wonders for my digital camera movies! by just cropping 20 pixels around I get a much more stable picture on many of my movies!

I use the following for some of my canon camera movies

loadplugin("C:\Util\canon2mkv\ffms2.dll")
FFVideoSource("c:\full-path\MVI_9766.avi")
loadplugin("C:\Util\canon2mkv\hqdn3d.dll")
loadplugin("C:\Util\canon2mkv\DePan.dll")
loadplugin("C:\Util\canon2mkv\DePanEstimate.dll")
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata,method=0,dxmax=20,dymax=20,rotmax=0)
crop(20,20,-20,-20)
hqdn3d()


:thanks: :thanks: :thanks: !!

SSH4
30th October 2011, 18:18
Hmm, i don't undestand why, but blur in DePanStabilize 1.101 not work for me.
Made it any size from 10 to 150 and don't see any difference :(


vectors = MSuper().MAnalyse(isb = false,blksize=8, overlap=4,search=5)
globalmotion = MDepan(vectors, pixaspect=0.911, thSCD1=500)
DepanStabilize(data=globalmotion, cutoff=0.5, mirror=15,rotmax=5,prev=0,next=0,blur=50, pixaspect=0.911,subpixel=2,method=1)

Fizick
10th December 2011, 18:26
SSH4,
sorry. Blur is not implemented for rotation in current version 1.10.1.
Try MDepan (..., rot=false)

Also I discovered, that blur was accidentally not implemented at left side for subpixel=1.

Hat3L0v3
23rd January 2023, 03:41
Can somebody help me to figure out why depan filter crashing my Avs(AvsPmod)?
I want to use DePanStabilize from mvtools pack but it crashes.
system and others:
win10 x64
avs+ 3.7.3 r3825 x86-64
AvsPmod_v2.7.3.2_.Windows_x86-64
mvtools-2.7.45 (.dll`s x64)
vcredist last time installed from here (https://github.com/abbodi1406/vcredist) (v0.64.0) (can't remember what versions I had before)

(libfftw3f-3.dll and libfftw3l-3.dll) from FFTW - 3.3.10
x64.dll into System32 folder (x32.dll on SysWoW64)

I remember before updating avs+ from 3.7.2 to r3825 I tried different stabilizers and depan was causing "access violation" error (same as TemporalDegrain2 with postFFT=2 option). Now they both just crashing without errors.

StainlessS
23rd January 2023, 03:56
libfftw3f-3.dll, but not libfftw3l,-3.dll
also can copy renamed libfftw3f-3.dll to system32/fftw3.dll
Some filters like one name, some the other, and some will accept either.

Failing that, post script.

kedautinh12
23rd January 2023, 04:01
libfftw3f-3.dll, but not libfftw3l,-3.dll
also can copy renamed libfftw3f-3.dll to system32/fftw3.dll
Some filters like one name, some the other, and some will accept either.

Failing that, post script.

Change name x64 libfftw3f-3.dll to fftw3.dll and copy to system32. Don't need rename libfftw3f-3.dll already in system32. I had both libfftw3f-3.dll and fftw3.dll in system32, don't have error with both already in system32

StainlessS
23rd January 2023, 04:07
Well, result is same thing. [provided those in system32 are same version as new ones]

Hat3L0v3
23rd January 2023, 11:10
libfftw3f-3.dll, but not libfftw3l,-3.dll
also can copy renamed libfftw3f-3.dll to system32/fftw3.dll
Some filters like one name, some the other, and some will accept either.

Failing that, post script.

So I need just single libfftw3f-3.dll in my system32 folder if I using x64 version avs/avsp? I deleted all other .dll`s - still crashing.

kedautinh12
23rd January 2023, 11:12
So I need just single libfftw3f-3.dll in my system32 folder if I using x64 version avs/avsp? I deleted all other .dll`s - still crashing.

You need both libfftw3f-3.dll and fftw3.dll in system32 too. And fftw3.dll same with libfftw3f-3.dll (change name libfftw3f-3.dll to fftw3.dll)

kedautinh12
23rd January 2023, 11:32
If still errors, you can check with dependencies, drag mvtools.dll, fft3dfilter.dll, neo-fft3d.dll to this app to check error
https://github.com/lucasg/Dependencies/releases

Hat3L0v3
23rd January 2023, 12:10
If still errors, you can check with dependencies, drag mvtools.dll, fft3dfilter.dll, neo-fft3d.dll to this app to check error
https://github.com/lucasg/Dependencies/releases

after I drag it to app I don't really undestand where to look for errors. Like this (https://i.imgur.com/cztKw55.png)one? the only red I found.

kedautinh12
23rd January 2023, 12:28
after I drag it to app I don't really undestand where to look for errors. Like this (https://i.imgur.com/cztKw55.png)one? the only red I found.

Yes, you missing this .dll. You need download this x64 ver .dll and copy to system32

kedautinh12
23rd January 2023, 12:35
after I drag it to app I don't really undestand where to look for errors. Like this (https://i.imgur.com/cztKw55.png)one? the only red I found.

My mistake. You need check depan.dll and depanestimate.dll too

Hat3L0v3
23rd January 2023, 12:46
My mistake. You need check depan.dll and depanestimate.dll too

I have list (https://i.imgur.com/WPVEgU8.png) of this .dll`s missings. Don't really know how it can helps and where to fix them (if it needed)

kedautinh12
23rd January 2023, 12:57
You can search .dll missing and download here
https://www.solvusoft.com/en/files/missing-not-found-error/dll/

Hat3L0v3
23rd January 2023, 13:14
You can search .dll missing and download here
https://www.solvusoft.com/en/files/missing-not-found-error/dll/

this site not work properly.
I open other .dll that works for test it have same .dll missing but it works fine. so maybe not all of them I need to repair.

kedautinh12
23rd January 2023, 13:45
Ok, i use this fftw3.3.10 and didn't had error (you can copy all x64 .dll to system32)
https://drive.google.com/file/d/1PF9SVH6iWvmkv9Vwbw-yfa7u6BDYqOj6/view?usp=drivesdk

If error still exist, try search: add or remove program -> unistall all vc++ version and install abbodi1406's vc++ again

Selur
23rd January 2023, 15:56
Just as a side note:
Instead of copying fftw dlls into the system folder you could also load it inside the Avisynth script using LoadDLL (http://avisynth.nl/index.php/LoadDLL). :)
Here's an example:

# LoadPlugin("I:\Hybrid\64bit\Avisynth\avisynthPlugins\LoadDll.dll") # only needed when auto-loading is disabled.
LoadDLL("I:\Hybrid\64bit\Avisynth\avisynthPlugins\fftw\libfftw3f-3.dll")

(Hybrid uses this for ages. Hybrid disables the auto-loading and loads everything explicitly for more control over what is used.)

Cu
Selur

StainlessS
23rd January 2023, 20:35
Found this on TechNet
https://social.technet.microsoft.com/Forums/WINDOWS/en-US/8f58e95f-60c5-44ac-85b5-2531914ac738/missing-all-apimswin-dlls-many-apps-will-not-start-including-vc2017redistx64-and?forum=WinServerPreview

Question
Sign in to vote
0
Sign in to vote

Thank you for the pointer to the VC++ 2015-2019 v14.23.27820.0 runtime files that will start and run on Win 10 v1903. Obviously these have been compiled with different dependencies than the VC++ 2015-2019 v14.21.27702.2 runtime files that I have had since v1803 of Win 10.

Although, installing these 2015-2019 C++ runtimes has not solved the issue.

I have read elsewhere on this forum:

"You are not missing those DLLs.

Those DLLs are Windows's implementation detail and are subject to change at anytime. Basically Microsoft started moving around APIs starting from Windows 8. For example, APIs in Windows 8's api-ms-win-core-file-l1-2-0.dll got moved to api-ms-win-core-file-l1-2-1.dll in Windows 8.1. Old software still work because the dlls developer linked to are now just placeholders redirecting calls to the actual implementation. But nobody should link to the implementations directly, as that would be defeating the purpose of having such a redirection. Any software that report those dlls are missing are failing to accommodate the redirection (e.g. reporting a delay-loaded dependency as hard one)."

that v1903 has replaced the direct calls to all of those DLLs with a handful of stub DLLs that now must be called to be redirected to the corresponding function provided by the original DLLs.

In my opinion, it was very rude of Microsoft to make this change to v1903, with no workaround, as it ruins several years of programs that were created using VC++.

Including Microsoft's own VC++ runtime installation files which were obviously recompiled with new dependencies to now function correctly on v1903.

If anyone knows of a workaround other than regression to v1803 of Win 10, please reply.

Thank you in advance.

Looks like M$ ****'ed it up a bit.

Those error messages you have [missing dll's], might be bogus.

Near end of that technet thread, seems that something you downloaded, might not have been installed correctly (maybe the AIO runtimes updater),
due to M$ preventing it from running properly because it was downloaded from an 'unknown' computer. (ie internet).

Also [YOU MUST] see here:- https://forum.doom9.org/showthread.php?p=1872609#post1872609

EDIT: to do with this stuff [see above D9 link]:
https://i.postimg.cc/13hhcYbq/Untitled.jpg (https://postimages.org/)

EDIT: Added a Regedit fix for 'unknown' computer file blocking thing at above D9 link.
There is also a GpEdit.msc fix at above link (Windows Pro only).
Suggest [YOU MUST] get the NirSoft AlternateStreamsViewer mentioned at above link. and search for blocked files over your whole system
(I had hundreds of files blocked without knowing, when I first discovered problem).