VideoHelp Forum
+ Reply to Thread
Results 1 to 29 of 29
Thread
  1. Hi guys
    Its been long time since i did some VHS transfers or restoration, but i still have a lot of avisynth scripts and Neat Video v4. I got a VHS transfer from a friend its from 1995 second gen tape played on Panasonic SVHS 1980 (FHS200 Eu model to be precise ) trough Panasonic es15 to a tv capture card captured as YUV2 720x576 25i Pal Lagarith (its almost identical to mu own gear) its a wedding (so yea its important) that has a lot of "drop outs". The problem is that these spans over a lot of frames (sometimes the whole screen goes from snow to clear picture and lot of "classic vhs drop outs" trought the duration of the tape . From his own words the heads and machine is cleaned and in good condition so I suspect it is the tape itself "dekompozing" (we both don't have the original tape so recapturing is not an option) I uploaded couple of seconds to see what I am talking about.
    I tried RemoveDirtMC, Devcr Fred (Johnmayer ) script some interpolation,Neat video and none has reacted to the problem

    It seems that there is a problem for uploading files its stuck on sending request to forum.videohelp.com couple od minutes the files are around 80mb
    Quote Quote  
  2. Upload to a media sharing site. This site isn't very good for hosting files.

    True tape dropouts usually only persist for one frame. It you have consistent static which comes and goes, this may have been a tracking problem during the tape dub. If that's what it is, I don't hold out a lot of hope for being able to remove it.

    However, if they are nothing more than tape dropouts, you might have some luck with Despot (AVISynth plugin). It is a bear to tune, but it is capable of significantly reducing these dropouts.
    Quote Quote  
  3. https://mega.nz/#!vj4mgSLa!xG6tEjGVpMEOb96Vh9OR7f0ZQ11s9p_IyvURB3SKvis

    https://mega.nz/#!Kzg0gazJ!8mLAFeqFzvcsKPtYc-jO5ZZcSxMFJgVXHVDM62b4gRw

    I uploaded them on mega

    clean part of the same tape
    https://mega.nz/#!HnwCgaAD!xJugtdUo_fWegj0KHnrcc5w-Rlg8BMcDclk_t_EmLlw

    and "classic drop outs"

    https://mega.nz/#!23xEmSCb!9-ziIuBs42_tZak8KS_sR6DOCke9rtHgm5Nd8d35OT4


    True tape dropouts usually only persist for one frame. It you have consistent static which comes and goes, this may have been a tracking problem during the tape dub. If that's what it is, I don't hold out a lot of hope for being able to remove it.
    Its more than one frame johnmeyer i know you made some miracles even for me but this tape seems very bad and its not the vcr because we tried another "clean" tape and it did only 2 or 3 clasic drop outs in 3 hour capture this one is bugger but its very valuable for him

    Maybe its better to cut those parts but i am sure there will be audio desync
    Last edited by mammo1789; 22nd Jul 2019 at 19:59.
    Quote Quote  
  4. Originally Posted by mammo1789 View Post
    Maybe its better to cut those parts but i am sure there will be audio desync
    If you want to cut out parts that are totally unwatchable or really annoying, but still keep audio sync, one trick is to slow down the video just before and just after the portion you cut out. If your NLE lets you "ramp" this speed change, so it starts at 100% of normal speed and then slows, over 2-3 seconds, to 75% or 50%, and then speeds up again, you can often make the gap almost impossible to detect, especially if the shot is just of a bunch of people standing and talking at a wedding reception. I did this for a 1969 TV broadcast that was transferred from the original 2" Quadruplex tape, but had sections that looked much like that living room video you posted. The talent was singing, but it was a long shot so you could detect the lip sync slip during the slowdown.
    Last edited by johnmeyer; 22nd Jul 2019 at 23:16. Reason: fixed HTML error
    Quote Quote  
  5. I noticed that most of the time only one field was bad. So after a smart bob you usually have a two good frames surrounding a bad frame. So I replaced those bad frames with a motion interpolated frame (interpolated from the frame before and the frame after). There are a few sections where there are multiple bad fields in a row so they don't get fixed.

    Code:
    # make a clip where every frame is an interpolated frame (between the frame before and the frame after)
    function AllInterp(clip c)
    {
        e = SelectEven(c).InterFrame(cores=4).SelectOdd()
        o = SelectOdd(c).InterFrame(cores=4).SelectOdd()
        Interleave(e,o)
        Loop(2,0,0)
    Subtitle("interpolated") # remove this for production
    }
    
    AviSource("test1.avi") 
    ConvertToYV12(interlaced=true)
    
    QTGMC(preset="fast")
    src = last
    edges = mt_edge(chroma="-128") # noise makes for lots of edges
    interp = AllInterp(last)
    
    ConditionalFilter(edges, interp, last, "AverageLuma", "greaterthan", "100.0")
    
    StackHorizontal(src, last) # remove this for production
    On the left is the original with just QTGMC(), on the right with the "fixed" frames.
    Image Attached Files
    Quote Quote  
  6. Wow and this was the "most severe part" (its a little bit longer in original)but because of the size limitations I uploaded just seconds

    Jagabo you are always great I tried couple of filters and scripts (one with interpolation) but my main drawback is that I don't understand programing (to figure it out) so I usually use yours or other members solutions. As I understand the script is automatic I don't have to change parameters or change loop for the duration it will always pick the frames ? right ?

    Oh my that QTGMC again there is no function Dither_Luma_Rebuild QTGMC Line 494 wich is :
    srchClip = tv_range && !srchcheck ? srchClip.Dither_Luma_Rebuild(S0=Str,c=Amp,slice=fa lse,lsb=lsb,uv=CMmt) : srchClip
    and I have Dither tools if that is what it ask for
    I tried million combination and always some error Avs ver not know then another and another

    Is there any download of correct plugins and dependencies? why the hell the author of new qtgmc doesn't include them anymore like VIT did
    Last edited by mammo1789; 24th Jul 2019 at 02:37.
    Quote Quote  
  7. It seems simple but i cannot get it to work I put 3.3.2 (3362 newest plugins masktools and rgtools error 3358 newest plugins error )version of qtgmc and old plugins now new problem Image
    [Attachment 49627 - Click to enlarge]


    can someone upload plugins from their pc that works
    Quote Quote  
  8. it works better with selecteven to me, it throws away 3/4 of bad half frames so over 39 half frames you end up interpolating only 4 like this:
    AVISource("test2.avi")
    converttoyv12(interlaced=true)
    assumetff()
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Den oise_sse2.vdf", "CCD", 0)
    CCD(10,1) #
    weave()
    converttoyv12(matrix="Rec601",interlaced=true)

    qtgmc("fast")
    selecteven()

    ReplaceFramesSVPFlow(1,1)
    ReplaceFramesSVPFlow(2,1)
    ReplaceFramesSVPFlow(3,1)
    ReplaceFramesSVPFlow(38,1)

    function ReplaceFramesSVPFlow(clip Source, int N, int X)
    {
    # N is number of the 1st frame in Source that needs replacing.
    # X is total number of frames to replace
    #e.g. ReplaceFramesSVPFLow(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for SVPFlow interpolation

    start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
    end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point

    start+end
    AssumeFPS(1) #temporarily FPS=1 to use mflowfps

    super=SVSuper("{gpu:1}")
    vectors=SVAnalyse(super, "{}")
    SVSmoothFps(super, vectors, "{rate:{num:"+String(X+1)+", den:1}}", url="www.svp-team.com", mt=1).Subtitle("SVPFlow")

    AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
    Trim(1, framecount-1) #trim ends, leaving replacement frames

    Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  9. You can't use SelectEven() with test1 because the good fields alternate between the even fields in some parts, the odd fields in other parts. The bad fields have "snow" type noise which make them easy to detect with mt_edge(). A typical bad field (after qtgmc):

    Image
    [Attachment 49628 - Click to enlarge]


    result of mt_edge():
    Image
    [Attachment 49629 - Click to enlarge]


    mt_edge() of a good field:
    Image
    [Attachment 49630 - Click to enlarge]


    So it's very easy to detect bad fields by looking at the average brightness of mt_edge().

    Test2 has less noise in the bad frames so the noise threshold needs to be lowered to about 60:
    Image
    [Attachment 49631 - Click to enlarge]


    Though only the odd fields have noise in this clip I wouldn't be surprised if a longer cap switches between odd and even fields like the first.

    Obviously, one can follow up with other noise reduction or manually replace the remaining bad segments.

    Code:
    import("C:\Program Files (x86)\AviSynth\plugins\InterpolateAll.avs") 
    import("C:\Program Files (x86)\AviSynth\plugins\ReplaceFramesMC.avs") 
    
    AviSource("test2.avi") 
    ConvertToYV12(interlaced=true)
    
    QTGMC(preset="fast")
    
    src = last
    edges = mt_edge(chroma="-128")
    interp = AllInterp(last)
    
    ConditionalFilter(edges, interp, last, "AverageLuma", "greaterthan", "60.0") # lower threshold for this clip
    
    # a few manual fixes
    ReplaceFramesMC(5,4)
    ReplaceFramesMC(74,5)
    InterpolateAll.avs:
    Code:
    # replace every frame with a motion interpolated frame (between the frame before and the frame after)
    
    function InterpolateAll(clip c)
    {
        e = SelectEven(c).InterFrame(cores=4).SelectOdd()
        o = SelectOdd(c).InterFrame(cores=4).SelectOdd()
        Interleave(e,o)
        Loop(2,0,0)
    }
    ReplaceFramesMC.avs:
    Code:
    function ReplaceFramesMC(clip Source, int N, int "X")
    {
        # N is number of the 1st frame in Source that needs replacing. 
        # X is total number of frames to replace
        #e.g. ReplaceFramesMC(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for mflowfps interpolation
     
        X = Default(X, 1)
    
        start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
        end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point
     
        start+end
        AssumeFPS(1) #temporarily FPS=1 to use mflowfps
      
        super = MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
        backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
        forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
        backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3)
        forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3)
        backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3)
        forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3)
        MBlockFps(super, backward_3, forward_3, num=X+1, den=1, mode=0)
    
        AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
        Trim(1, framecount-1) #trim ends, leaving replacement frames
      
        Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }

    If you can't get QTGMC() working you can replace it with something like:

    Code:
    SeparateFields()
    nnedi3(dh=true)
    Image Attached Files
    Quote Quote  
  10. I will be very grateful If someone upload their working plugins folder of avysinth /+ After almost 2 hours I still struggle with making to work.

    I use another pc now i7 6700HQ (which nnedi3 do I use I tried all of them started avx2 even SEE4 one )16gb ram gfx 1070 windows 10 everything in place rgtools nnedi smdegrain mvtols and masktols (tried couple of ver for both and yes I know that 32bit is for 32bit and 64 bit for 64 bit ) always different errors now it says no nnedi3 ?! I put the yours 2 avs scripts in different folder and call them from there (even in the plugins folder )
    All VC 2008-2017 installed Avysinth+ installed

    What "fascinates" me about Avisynth is that combination that worked earlier can start not working this is really tiring
    Quote Quote  
  11. Keep in mind that you need a 32 bit editor, 32 AviSynth, and 32 bit filters. Or you need a 64 bit editor, 64 bit AviSynth, and 64 bit filters. You can't mix and match "bitness".

    I packaged a working combination of AviSynth filters for 64 bit AviSynth+ for QTGMC in this post:

    https://forum.videohelp.com/threads/393795-Deinterlacing-with-VirtualDub-s-Yadif-filte...e2#post2555738

    Those worked on my old Intel i5 2500K (Sandy Bridge) system. In addition to those you might need MSVC runtime and Intel's math libraries:

    https://forum.videohelp.com/threads/393820-Problems-With-QTGMC-Need-Help#post2555759
    https://forum.videohelp.com/threads/393795-Deinterlacing-with-VirtualDub-s-Yadif-filte...e2#post2555758

    Once you have it working you can look into using SSE4 or AVX2 versions of some of those filters for faster performance.
    Last edited by jagabo; 24th Jul 2019 at 12:00.
    Quote Quote  
  12. Keep in mind that you need a 32 bit editor, 32 AviSynth, and 32 bit filters. Or you need a 64 bit editor, 64 bit AviSynth, and 64 bit filters. You can't mix and match "bitness".

    I think I already sad that I know that and I am pretty tech savvy I also sad that I installed all VC from 2008 to 2019 and even put those fftw in the syswow folder like the last time.Its obvious that the version confusion of some of this filters is not just me and it has nothing to do with bits but "compatibility" of the plugins between them especially QTGMC. I used QTGMC and Avysinth in the past its not my first time but every time you reinstall pc or use different hardware or new plugins or new version of the script its go haywire. So in short I have installed Avisynth+ r2772-MT (it has 32 and 64 bit I use 32 bit ) VDub2 (strange I found that using lagarith trough Vdub2 because it has lagarith in it by it self + the 1327 if I use direct copy ether I chose 1327 or local one the file is unreadable by others and vdub1 I also have AVSpmode For example the combination that worked on my old pc ( i backed avysinth plugin folder) its not working. Even If I comment out QTGMC in your first script I get error like I posted in post bellow is it related to some other plugin or I am missing something
    I will try the 64 bit version and plugins and get back with results thanks Jagabo
    Quote Quote  
  13. Originally Posted by mammo1789 View Post
    Even If I comment out QTGMC in your first script I get error like I posted in post bellow is it related to some other plugin or I am missing something
    What error message do you get? Do you have Interframe()?

    https://www.spirton.com/uploads/InterFrame/InterFrame2.html
    Quote Quote  
  14. No luck
    No nnedi3 (if using qtgmc and plugins from your package) I found new ver avspmod https://github.com/gispos/AvsPmod/releases

    What error message do you get? Do you have Interframe()?

    https://www.spirton.com/uploads/InterFrame/InterFrame2.html
    Yes exactly no interframe but link is broken or I cannot see the download link and it just redirect to some other site but no interframe edit I found it in older posts Ahhh

    edit still no luck Image
    [Attachment 49650 - Click to enlarge]
    Image
    [Attachment 49651 - Click to enlarge]


    Can you zip your plugins folder and upload it here thanks
    Last edited by mammo1789; 24th Jul 2019 at 20:35.
    Quote Quote  
  15. Interframe 2.8.2 is available here (click on the InterFrame tag at the left on the Spiriton page):

    https://www.spirton.com/category/interframe/

    Those archive I linked to had all the filters needed to run QTGMC in 64 bit AviSyth+. I removed all other filters from my plugins64+ folder and was still able to run QTGMC. It doesn't include any MSVC runtimes or the Intel math library which might be needed. The point isn't necessarily to get the most updated versions of each -- it's to get versions that are known to work together as a starting point.
    Quote Quote  
  16. Yes i downloaded but new error i posted pictures

    I installed aio vc ( i tried even one by one manually ) I cannot make it to work
    Quote Quote  
  17. The error is telling you svpflow1.dll is a 32 bit plugin, not the required 64 bit plugin.
    Quote Quote  
  18. well I just downloaded from the link you gave me is there 64 bit svpflow how do you use 64 bit ?
    I don't mind 32bit avs+ or 64 bit just to work
    The first script you gave me were you using Avs+64 or 32 thats way I asked for plugins folder that work
    Last edited by mammo1789; 24th Jul 2019 at 21:04.
    Quote Quote  
  19. This site has a lot of 64 bit plugins for AviSynth+, including SVPFlow:

    http://avisynth.nl/index.php/AviSynth%2B_x64_plugins
    Quote Quote  
  20. This site has a lot of 64 bit plugins for AviSynth+, including SVPFlow:

    http://avisynth.nl/index.php/AviSynth%2B_x64_plugins
    I found them I was here half hour before but is late and tired missed them It seems that even without QTGMC the script (first one ) is cleaning the clip
    Still no luck with qtgmc ( no nnedi3 ) but it is there in folder I dont know what to do

    I downloaded again from the site but still no luck Image
    [Attachment 49652 - Click to enlarge]
    Quote Quote  
  21. Originally Posted by mammo1789 View Post
    Still no luck with qtgmc ( no nnedi3 ) but it is there in folder I dont know what to do
    If they don't autoload for one reason or another, then load them in your script using LoadPlugin and Import lines at the top of your scripts. An example:

    LoadPlugin("C:\Path\To\Nnedi3.dll")

    I don't know anything about 64-bit AviSynth+, though.
    Quote Quote  
  22. If they don't autoload for one reason or another, then load them in your script using LoadPlugin and Import lines at the top of your scripts. An example:

    LoadPlugin("C:\Path\To\Nnedi3.dll")

    I don't know anything about 64-bit AviSynth+, though.
    I tried that before now again still no nnedi3 the error Image
    [Attachment 49653 - Click to enlarge]



    edit finally I made it Its strange that only w7(not intel w7 ) is working any other error I mean I7 6 series is newer avx2 is definitely preset in chip I will make run with this to see if it is stable
    thanks Jagabo
    Last edited by mammo1789; 24th Jul 2019 at 21:27.
    Quote Quote  
  23. What version of AviSynth+ are you using? I noticed from the nnedi3 page at http://avisynth.nl/index.php/Nnedi3 it says:

    x64 version requires AviSynth+ r1576 or greater
    So you have QTGMC working now with the full script I gave?
    Quote Quote  
  24. What version of AviSynth+ are you using? I noticed from the nnedi3 page at http://avisynth.nl/index.php/Nnedi3 it says:
    So in short I have installed Avisynth+ r2772-MT (it has 32 and 64 bit I use 32 bit )
    yes Jagabo is working now even QTGMC ( at least it rended the test file) it was probably my fault (for nnedi) because I selected the Core2 versions (and I have i7 Skylake), now with only w7 all good (at least I hope because still didn't do the render of the whole file it was late yesterday) thanks a lot Image
    [Attachment 49660 - Click to enlarge]


    The resulting file is deinterlaced file (original TFF) , Can I make multiple calls of the script for example first time I render, then open the resulting file in the script again add separate fields> interframe then qtgmc again second time because in preview (the original clip is 2h:53m) there some parts where noisy part "slipped" on more than one frame.
    Then I plan to use (on top of the multiple file) DeVCR or RemovedirtMC to "smooth" the "classical" drop outs then use Despot/NeatVideo for spots and general chroma noise and grain and encode it to mp4 h265 file to be watched on lcd tv or pc ( my friend doesn't have dvd ). When I show him this morning ( he is adobe "fan" and to young for analog signals like VHS its his parents wedding video which are my friends )the results from your script he was like wtf woow can I learn this
    Quote Quote  
  25. The scripts from post#9 trows a error on this line interp = AllInterp(last) there is no function named Allinterp and even Google cant find it
    Quote Quote  
  26. Originally Posted by mammo1789 View Post
    The scripts from post#9 trows a error on this line interp = AllInterp(last) there is no function named Allinterp and even Google cant find it
    Sorry, I was cutting and pasting. I changed the name to of AllInterp() to InterpolateAll(). So the line should read "interp = InterpolateAll(last)", hence the inclusion of the InterpolateAll function in that post. Or you can leave the line as it is and use AllInterp() from the earlier script.
    Quote Quote  
  27. Sorry, I was cutting and pasting. I changed the name to of AllInterp() to InterpolateAll(). So the line should read "interp = InterpolateAll(last)", hence the inclusion of the InterpolateAll function in that post. Or you can leave the line as it is and use AllInterp() from the earlier script.


    I tried Qtgmc (and nothing else) with SelectEven() which brings us to 25p then put that file(part of the whole file which has bad odd fields) in 50p timeline Premiere pro and tested it dosent look jerky at all and it has fever artifacts then trough swp and result file is 50p as I would like but it Is very difficult to watch whole file to find out when does it switch from odd to even (you were right about test1 clip) so I will use the script can it be used twice in a row and do I have to separate then qtgmc or it can be done on progressive

    I will try to split the clip with good parts use qtgmc on them directly put bad parts trough script and fuse them in the end Is that good idea?
    Last edited by mammo1789; 25th Jul 2019 at 14:06.
    Quote Quote  
  28. Originally Posted by mammo1789 View Post
    Can I make multiple calls of the script for example first time I render, then open the resulting file in the script again add separate fields> interframe then qtgmc again second time because in preview (the original clip is 2h:53m) there some parts where noisy part "slipped" on more than one frame.
    No. The script relies on the fact that the original video often has sequences where every other field is clean. In sections where there are multiple bad fields in a row the video isn't fixed. Running it a second time still won't fix those sections.

    For longer dropouts use something like ReplaceFramesMC() as was shown in post #9, or ReplaceFramesSVPFlow() in post #8. Of course, these require that you manually search through the video to specify what needs replacing. And motion interpolation like that doesn't work well with complex motions. It works very well with simple panning shots.
    Last edited by jagabo; 26th Jul 2019 at 07:58.
    Quote Quote  
  29. Another way to address the problem is to replace a bad frame with a copy of the frame before it. You can repeat this as many times as you want to fill in long strings of bad frames. Of course, this gives a jerky result since the picture "locks up" for the duration of the bad sequence. For example, this script will fill sequences of up to 10 bad frames in a row:

    Code:
    AviSource("test1.avi") 
    ConvertToYV12(interlaced=true)
    nnedi3(-2) # using nnedi3 to smart bob here, instead of QTGMC
    edges = mt_edge(chroma="-128")
    
    THRESHOLD = "70.0"
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    ConditionalFilter(edges, last.Loop(2,0,0), last, "AverageLuma", "greaterthan", THRESHOLD)
    Last edited by jagabo; 26th Jul 2019 at 07:53.
    Quote Quote  



Similar Threads

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