VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. I used to do simple avisynth scripts years ago, but recently scanned a bunch of 8mm film that judders up and down on the Y axis.

    I can use Adobe Premiere or After Effects to make edits but to do what I want to do is very tedious. Maybe what I want is tedious work no matter what I use.

    I would like to avoid all cropping an zooming if possible. I was able to eliminate most of the judder in After effects but it required me to manually transform the video to shift the panning on the X axis.

    I tried and tried for hours and cried inside to get Avisynth+ and depan to work but no matter what I do it generates errors and I can't get the frame server to work. First the libfftw3f-3.dll or fftw3.dll not found, i dumped them in the system32 and systemWOW folders but never really worked. Then depan spits out a 0xc1 error... I think I may give up on this and just do the tedious adobe work.

    I cleaned all the programs off my computer and started again, but it has been hours of wasted time and I still don't know what I am doing or doing wrong.

    Reading the help wikis isn't much help, doesn't seem to stick in my brain for some reason like it did 2 decades ago.

    If I could get some up to date help that would maybe fix this issue I would be greatful. Most of the posts are pre-win10 and with the latest builds and seeing most of the projects I used years ago no longer work on this OS I am doubting my success.
    Quote Quote  
  2. Post the exact error message
    Quote Quote  
  3. Be sure to put 64 bit dlls in System32, and 32 bit dlls in SysWoW64 (that sounds backwards but it's the way it works in Win64). Make sure all your components are 64 bit or 32 bit. You can't use 32 bit AviSynth with 64 bit AviSynth, or vice versa. You can't use 64 bit AviSynth with a 32 bit editor/encoder, and vice versa.

    Along with the exact error message, post your AviSynth script.

    If you just have an issue with small bumps up and down try Stab(). It uses DePan but it can be very simple to use:

    Code:
    AviSource("filename.avi")
    Stab()
    There are some options but the defaults may be sufficient.
    Last edited by jagabo; 10th Jan 2021 at 17:29.
    Quote Quote  
  4. Originally Posted by poisondeathray View Post
    Post the exact error message
    Well out of frustration I cleaned all the junk off computer to make sure that I could start fresh when I want to tackle this again (maybe this weekend coming).

    But AvsPod said libfftw3f-3.dll or fftw3.dll not found

    Then it (and vdub ) said that depan created error error=0xc1, but the libfftw3f-3.dll or fftw3.dll didn't come up again.


    Thanks for that suggestion about having the 32 and 64 bit dlls mixed around.

    I think I need to stick with just the 32bit software if going to use depan since that is a 32 bit filter.

    I have around 2 hours of 8mm footage to clean up. Two 5 minute scenes are old woody woodpecker cartoons and I only would bother with those once I get the avisynth scrypt working. The other clips I have deduced I will need to break into segments by the scene and then stitch them back together as a composition in Premeire.

    They are movies of wife's brother from 58-64 and dad that just died of complications from COVID infection so my goal is to have them ready by the spring/summer when we have the ability to get together for an in-person memorial. So if I have to do frame by frame edits so be it. I want it to be as good as I can do without spending hundreds paying someone to do this. Willing to push myself to learn.

    Thanks for giving me some hope.
    Quote Quote  
  5. Originally Posted by fedge View Post

    I think I need to stick with just the 32bit software if going to use depan since that is a 32 bit filter.
    x64 depan, depanestimate
    https://github.com/pinterf/mvtools/releases


    Run it again after updating the .dll's, post your full script, full error messages if it still doesn't work
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    Originally Posted by fedge View Post

    I think I need to stick with just the 32bit software if going to use depan since that is a 32 bit filter.
    x64 depan, depanestimate
    https://github.com/pinterf/mvtools/releases


    Run it again after updating the .dll's, post your full script, full error messages if it still doesn't work
    What AviSynth do you recommend?

    I also need to figure out how to properly load the mp4s in (they are compressed with H.264 codec). I can get them to open in Vdub and dump them to uncompressed AVI but it is better to skip that step. I read some of the tutorials on how to script that, but it isn't intuitive to me. I just need to read a bit more.
    Quote Quote  
  7. Originally Posted by fedge View Post

    What AviSynth do you recommend?
    avisynth+ x64


    I also need to figure out how to properly load the mp4s in (they are compressed with H.264 codec). I can get them to open in Vdub and dump them to uncompressed AVI but it is better to skip that step. I read some of the tutorials on how to script that, but it isn't intuitive to me. I just need to read a bit more.
    LSmash
    https://github.com/HolyWu/L-SMASH-Works/releases

    For MP4/MOV containers -
    LSmashVideoSource("video.mp4")

    for other containers it would be LWLibavVideoSource("video.ext")
    Quote Quote  
  8. I used the script from this site first post https://forum.doom9.org/showthread.php?t=144271
    20)Film_Restoring_vs_06_2012

    Error:
    DePanEstimate: Can not load FFTW3.DLL!
    (C:\users\.....\01_E_Stabilisation_only.avs, line 69)



    Script paste below:
    -------------
    # film stabilisation script by videoFred.
    # modified june 2012
    #================================================= ============================================




    film= "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4" # source clip, you must specify the full path here




    #PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    result="stabS" # specify the wanted output here stab= stabilised clip, stabS= comparison before/after

    trim_begin=2 play_speed= 18 #trim frames and play speed




    #SIZE, CROP AND BORDERS PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    CLeft=20 CTop=20 CRight=20 CBottom=20 #crop values after Depan and before final resizing

    W=720 H=576 #final size after cropping

    bord_left=0 bord_top=0 bord_right=0 bord_bot=0 #720p= borders 150


    #STABILISING PARAMETERS, YOU REALY MUST USE STABS TO CHECK STABILISATION!
    #----------------------------------------------------------------------------------------------------------------------------
    maxstabH=40
    maxstabV=40 #maximum values for the stabiliser (in pixels) 20 is a good start value

    est_left=40 est_top=40 est_right=40 est_bottom=40 #crop values for special Estimate clip

    trust_value= 1.0 # scene change detection, higher= more sensitive
    cutoff_value= 0.5 # no need to change this, but you can play with it and see what you get




    # END VARIABLES, BEGIN SCRIPT
    #================================================= ================================================== ==============================


    SetMemoryMax(800) #set this to 1/3 of the available memory





    Loadplugin("plugins/Depan.dll")
    LoadPlugin("plugins/DepanEstimate.dll")




    source1= LSMASHVideoSource(source=film)




    #STABILIZING/CROPPING
    #................................................. .................................................. .......................................
    stab_reference= source1.crop(est_left,est_top,-est_right,-est_bottom).colorYUV(autogain=true)

    mdata=DePanEstimate(stab_reference,trust=trust_val ue,dxmax=maxstabH,dymax=maxstabV)
    stab=DePanStabilize(source1,data=mdata,cutoff=cuto ff_value,dxmax=maxstabH,dymax=maxstabV,method=0,mi rror=15)
    stab2= stab.crop(CLeft,CTop,-CRight,-CBottom)
    stab3=DePanStabilize(source1,data=mdata,cutoff=cut off_value,dxmax=maxstabH,dymax=maxstabV,method=0,i nfo=true)

    WS= width(stab)
    HS= height(stab)
    stab4= stab3.addborders(10,10,10,10,$B1B1B1).Lanczos4Resi ze(WS,HS)
    stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5)







    #RESULT5: SPECIAL SERVICE CLIP FOR RESULT S5
    #................................................. .................................................. ...............................................
    result5= overlay(source1,greyscale(stab_reference),x=est_le ft,y=est_top).addborders(2,2,2,2,$FFFFFF).Lanczos4 Resize(WS,HS)




    #PARAMETERS FOR THE COMPARISONS
    #................................................. .................................................. ...............................................
    W2= W+bord_left+bord_right
    H2= H+bord_top+bord_bot





    source4=Lanczos4Resize(source1,W2,H2)





    #SPECIAL COMPARISON CLIP FOR TESTING THE STABILIZER
    #................................................. .................................................. .................................................. ....................
    stabS= stackhorizontal(subtitle(result5,"baseclip for stabiliser -only the B/W clip is used",size=32,align=2),\
    subtitle(stab4,"test stabiliser: dx=horizontal, dy=vertical",size=32,align=5)).converttoYUY2()



    Eval(result)
    Quote Quote  
  9. I tried Directshow, and other ways to load the MP4.. all result in that dll error.

    According to the script instructions I have the dll in the correct spot.. still no go.
    Quote Quote  
  10. If you're using 64 bit AviSynth put copy of the 64 bit version of FFTW3.DLL in C:\Windows\System32.

    If you're using 32 bit AviSynth put copy of the 32 bit version of FFTW3.DLL in C:\Window\SystemWoW64.
    Quote Quote  
  11. Originally Posted by jagabo View Post
    If you're using 64 bit AviSynth put copy of the 64 bit version of FFTW3.DLL in C:\Windows\System32.

    If you're using 32 bit AviSynth put copy of the 32 bit version of FFTW3.DLL in C:\Window\SystemWoW64.

    I thought I had done that but I will download fresh copies and try again.

    I also thought of possibly running this process on a VM version of winxp with two dedicated cores. I don't care if it is slow just so that I can see what the result is to know if I want to keep pursuing this method or do the more tedious Adobe After Effects cleaning that I have as a backup plan if I can't get results this way. I want to avoid any panning or zooming of the frames so complete stabilization of the media isn't important just the frame juddering elimination/minimization is.
    Quote Quote  
  12. AviSynth(+) runs fine under Win10. There's no need to use XP or any other earlier version of Windows.

    Oops, I see I accidentally type SystemWow64 instead of SysWoW64. I should have said:

    If you're using 32 bit AviSynth put a copy of the 32 bit version of FFTW3.DLL in C:\Window\SysWoW64.

    The 32 bit and 64 bit systems are completely separate. 32 bit editors/encoders can't use 64 bit AviSynth, 64 bit AviSynth filters, or other 64 bit Windows dlls. And vice versa.
    Quote Quote  
  13. Originally Posted by jagabo View Post
    AviSynth(+) runs fine under Win10. There's no need to use XP or any other earlier version of Windows.

    Oops, I see I accidentally type SystemWow64 instead of SysWoW64. I should have said:

    If you're using 32 bit AviSynth put a copy of the 32 bit version of FFTW3.DLL in C:\Window\SysWoW64.

    The 32 bit and 64 bit systems are completely separate. 32 bit editors/encoders can't use 64 bit AviSynth, 64 bit AviSynth filters, or other 64 bit Windows dlls. And vice versa.
    I should likely be using the 32 bit version of AviSynth then. I believe the script /package I am using from Doom9 is 32 bit (at least that is my assumption).
    Quote Quote  
  14. Scripts can run in both 64 bit and 32 bit depending on their content (they're just text files). That script runs fine in both 64 bit and 32 bit except for the explicitly imported plugins. Their bitness much match the AviSynth bitness:

    Code:
    Loadplugin("plugins/Depan.dll")
    LoadPlugin("plugins/DepanEstimate.dll")
    Rather than loading the plugins within the script, put the dll files in AviSynth's Plugins folders. Put the 32 bit versions in AviSynth+'s plugins+ folder, and/or the 64 bit versions in the plugins64+ folder. That way they will be available to any AviSynth script you open and the correct one will be loaded whether whether you're running 64 bit AviSynth or 32 bit AviSynth.

    Also, if your video has just small up/down, left/right bounces (no rotations, no rolling shutter distortions) you can use the simple Stab() function from here:

    http://avisynth.nl/index.php/Stab

    Put Stab.avsi in the appropriate (or both) plugins folder and your script will look like:

    Code:
    LSMASHVideoSource( "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    Stab()
    You will still need the depan and depanestimate dll files in the appropriate plugins folder(s).
    Last edited by jagabo; 12th Jan 2021 at 17:05.
    Quote Quote  
  15. Originally Posted by jagabo View Post
    Put Stab.avsi in the appropriate (or both) plugins folder and your script will look like:

    Code:

    LSMASHVideoSource( "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    Stab()

    You will still need the depan and depanestimate dll files in the appropriate plugins folder(s).
    I tried just stab() but that says it does not know what that is in AvsPmod. Virutal dub won't load video.

    I pasted what was in the avsi file and it seems to work, but I will need to play with the settings.

    I do have some clips that roll at certain spots so that is the next hurdle assuming this stab script is working..I can't really tell right now.
    Quote Quote  
  16. At least you're making progress...

    Put Stab.avsi in the plugins folders so it will autoload every time AviSynth is started.

    I seem to be having some trouble with Stab() and 64 AviSynth+ (only stabilizing horizontally). I'll have to track down the problem...
    Quote Quote  
  17. I changed the settings on the script so that it watches the black bar at the top of the video frames. That really seemed to smooth off the judder, still there but much more acceptable.

    Really thanks for the help.

    Any other suggests you may have let me know. i can share the clip and script if you really want to play with it.

    What do you suggest for the rolling frames? I have one or two short clips with that type of artifact in it.
    I may ignore that issue as "part of the nostalgic look of film" and leave it at that in the end.
    Quote Quote  
  18. LSMASHVideoSource( "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    i = ConvertToYV12()
    mdata = DePanEstimate(i)
    DePanStabilize(i, data=mdata)
    function Stab (clip clp, int "range", int "dxmax", int "dymax", int "mirror") {

    range = default(range, 2)
    dxmax = default(dxmax, 0)
    dymax = default(dymax, 5)
    mirror = default(mirror, 0)

    #temp = clp.TemporalSoften(7,255,255,25,2)
    #inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,25 5,25,2)),clp)
    #mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxma x,dymax=dymax)

    DePan(inter,data=mdata,offset=1, mirror=mirror )
    SelectEvery(2,0) }



    This script seems to work pretty good, but I would like to eliminate most of the x axis movement and limit more of the y axis movements. Not sure how to do it. AvsPmod keeps crashing on me when I mess with some things
    Quote Quote  
  19. Originally Posted by fedge View Post
    LSMASHVideoSource( "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    i = ConvertToYV12()
    mdata = DePanEstimate(i)
    DePanStabilize(i, data=mdata)
    function Stab (clip clp, int "range", int "dxmax", int "dymax", int "mirror") {

    range = default(range, 2)
    dxmax = default(dxmax, 0)
    dymax = default(dymax, 5)
    mirror = default(mirror, 0)

    #temp = clp.TemporalSoften(7,255,255,25,2)
    #inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,25 5,25,2)),clp)
    #mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxma x,dymax=dymax)

    DePan(inter,data=mdata,offset=1, mirror=mirror )
    SelectEvery(2,0) }



    This script seems to work pretty good, but I would like to eliminate most of the x axis movement and limit more of the y axis movements. Not sure how to do it. AvsPmod keeps crashing on me when I mess with some things
    You're not calling stab; you're using depanstabilize

    Set dxmax=0 to eliminate horizontal stabilization



    Code:
    LSMASHVideoSource( "C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    Stab(range=1, dxmax=0)
    
    
    function Stab (clip clp, int "range", int "dxmax", int "dymax", int "mirror") {
    
    range = default(range, 2)
    dxmax = default(dxmax, 0)
    dymax = default(dymax, 5)
    mirror = default(mirror, 0)
    
    #temp = clp.TemporalSoften(7,255,255,25,2)
    #inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp)
    #mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxmax,dymax=dymax)
    
    DePan(inter,data=mdata,offset=1, mirror=mirror )
    SelectEvery(2,0) }
    Quote Quote  
  20. I don't really have any good test videos. One I was testing with was a scene shot in a moving car. But it's pretty dark, there's stuff moving outside the window, and there are bright credits sitting still at the bottom middle of the frame. That's a lot of stuff to confuse a deshake filter. It would be helpful if you could provide a sample of your problematic video.

    Your script in post #18 defines the Stab() function but you have to actually call it for it to be used. I like to define functions and such at the top of the script, then use them below:

    Code:
    ##########################################################################
    
    function Stab (clip clp, int "range", int "dxmax", int "dymax", int "mirror")
    {
        range = default(range, 2)
        dxmax = default(dxmax, 5)
        dymax = default(dymax, 5)
        mirror = default(mirror, 0)
    
        temp = clp.TemporalSoften(7, 255, 255, 25, 2)
        inter = Interleave(temp.Repair(clp.TemporalSoften(1, 255, 255, 25, 2)), clp)
        mdata = DePanEstimate(inter, range=range, trust=0, dxmax=dxmax, dymax=dymax)
    
        DePan(inter, data=mdata, offset=1, mirror=mirror )
        SelectEvery(2, 0)
    }
    
    ##########################################################################
    
    
    LSMASHVideoSource("C:\Users\Jeff\Desktop\MOVIE\4\0024.mp4")
    
    # use one method:
    
    #mdata = DePanEstimate(last)
    #DePanStabilize(last, data=mdata)
    
    # or the other:
    
    Stab(dxmax=8, dymax=8, range=1, mirror=15)
    Also note that your Stab function set dxmax=0 as the default -- ie, no horizontal stabilization unless you override it in the call to stab. I changed the default to 5, like dymax.
    Quote Quote  
  21. I did some more work with this but never really got results I liked. In the end I did get good results using that Film9 suite (donationware), at least good enough to move forward. Then I will record audio of one of the last people that know who all the folks in the film are and do the final job in Adobe Premiere/after effects. I like the Adobe color correction a bit more that what avisynth settings can do, key-framing the effect is more desirable to me.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!