VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 48 of 48
Thread
  1. App Digger JKyle's Avatar
    Join Date
    Oct 2018
    Location
    United States
    Search PM
    Originally Posted by johnmeyer View Post
    @JKyle - If you ever revisit your excellent re-write of my script, you might also want to parameterize the Cycle/CycleR numbers. For this script, Cycle must be exactly 2x CycleR. Using larger values for Cycle can help when the drops and dups are widely scattered. However, the larger the values, the slower the script will run.
    Thanks for your advice. Per your suggestion, I introduced dcycle as the parameter for decimation cycle. The smallest even number >= dcycle will be used as the decimation cycle and half will be decimated.

    Here's the updated script: DeJump.avsi

    ---

    And I'm also thinking about improving the performance, but some benchmarking is due for it.

    About Selur's suggestion, I think MvTools2 is sort of free of indexing. According to pinterf's manual of MvTools2,

    Main mean for goals achievement (in MVTools version 2) is removing MVTools internal buffer with mysterious (for many people) index (idx) and some other internal tricks (see thread MVTools without idx).
    So I guess we don't have to go with indexing.

    Still, I'm wondering if setting the default filter MT mode to MT_MULTI_INSTANCE, SetFilterMTMode("DEFAULT_MT_MODE", 2), will improve the overall performance of the script.

    And since Dogway is working on a MaskTools2 replacement, ExTools, which is expected to show better performance than MaskTools2 in many cases, maybe there's still room for performance improvement if we adopt it instead of MaskTools2. But it's still just a thought. Benchmarking and refactoring the script code is due, of course.
    Quote Quote  
  2. Ah, you are right totally forgot that was removed with v2.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. @JKyle Setting the default filter MT mode to MT_MULTI_INSTANCE, SetFilterMTMode("DEFAULT_MT_MODE", 2) did not help with speed.
    The new script didn't either.
    But I'm not sure if my old computer is a reliable source for speed testing.

    @ Selur I changed the 3 lines in the FillDropsAlt.avsi script from post 15 the way you wrote in post 29,
    and I got "Script error: There is no function named 'mvanalyse'".
    Quote Quote  
  4. @micha.el: you missed the other posts where we concluded that this change only worked with older mvtools versions and doesn't work anymore.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. I read the posts, but I did not understand it that way. To me it sounded like it was about indexing.
    But nevermind, I'm not at all familiar with all this, like you, JKyle and johnmeyer, and just try to understand things...
    thx
    Quote Quote  
  6. Member
    Join Date
    Dec 2021
    Location
    Germany
    Search Comp PM
    Hi, in short: I just started to rerip old PAL VHS-C tapes with a framegrabber (sadly only 25p "interlaced", found out that QTGMC helps with that so i switched from HandBrake to StaxRip) and a "new" JVC VCR with TBC. I have some tapes where the output is "jumpy" (it looks like the field order switches for 1 or a few frames in these cases).

    Googling for a solution I found your DeJump Script in StaxRip, sadly i get an error message when i try to use it and i don't know how to correct this:

    Script Error

    I don't know what 'color_black' means.
    (C:\Users\danie\Desktop\StaxRip-v2.10.0-x64\Apps\Plugins\AVS\Scripts\DeJump.avsi, line 84)
    (D:\VHS_Rerips\vlc-record-2021-11-30-07h36m04s-dshow___-_temp\yadifmod_dejump.avs, line 14)
    Maybe it's some dependency or a problem with my source material? I hope it's okay to post this here and that someone can help me.
    Quote Quote  
  7. It's a dependency issue, you need color_rgb.avsi, for example from https://github.com/XhmikosR/avisynth-mt/blob/master/avisynth258MT/distrib/color_preset...olors_rgb.avsi for color_black and also color_white.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Or you could replace color_black with $000000 and color_white with $ffffff. Getting the colors_rgb.avsi is preferable though -- other scripts may use the other colors it defines.
    Quote Quote  
  9. Member
    Join Date
    Dec 2021
    Location
    Germany
    Search Comp PM
    Thanks a lot (copied the script into \Apps\FrameServer\AviSynth\plugins\), the error message is gone!

    First tests don't seem to make a difference though. I uploaded two samples (interlaced and deinterlaced with qtgmc) that show the error i mean (beginning of the tape, so as bad as it gets ) - i hope thats okay. Maybe you can give me a hint if DeJump is even the right script to help with these artifacts?

    https://www.youtube.com/watch?v=PyJUArC0vJY
    https://www.youtube.com/watch?v=h1gYxZqI2C0

    EDIT:
    Original files (encoded and the capture file): https://drive.google.com/drive/folders/14VlxSfllN9chyZzTTxlhM0ZtEW00AzGQ?usp=sharing

    (It really is the last problem that i have to tackle, it seems that it's mostly happening with VHS-C tapes where the beginning of the tape is not in great condition..)
    Last edited by Hadeur; 3rd Dec 2021 at 12:14.
    Quote Quote  
  10. File uploaded to youtube is basically useless. Either attach a sample of the source here or upload it somewhere where it does not get reencoded.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. Member
    Join Date
    Dec 2021
    Location
    Germany
    Search Comp PM
    I added a link to a Google Drive folder with the files (the original capture file as well). Thx a lot for trying to help.
    Quote Quote  
  12. Doesn't look like a field order issue to me, using Stab http://avisynth.nl/index.php/Stab seems to work fine on most of the clip, the beginning looks more like missing frames,... (you might want to look into a better capturing setup).
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  13. It's not a field order problem it's a field position problem. This is a common problem with video capture. The capture device starts capturing a scanline early or late - resulting in that field shifting up or down. And since it's a field, one scanline early/late puts it up/down two scan lines in the frame. The easiest way to handle this in AviSynth is deinterace the use Stab() -- as suggested by Selur.
    Quote Quote  
  14. Member
    Join Date
    Dec 2021
    Location
    Germany
    Search Comp PM
    Originally Posted by Selur View Post
    Doesn't look like a field order issue to me, using Stab http://avisynth.nl/index.php/Stab seems to work fine on most of the clip, the beginning looks more like missing frames,... (you might want to look into a better capturing setup).
    This looks very promising, thanks for the hint and your sample.

    (Yeah.. i already put more money than i wanted into this for the JVC VCR with TBC & S-Video output, a Hauppauge capture card and another one from AverMedia because i thought it could capture actual 576i50. I already captured most of the tapes >10 years ago with my parents old vcr + a panasonic dvd recorder [with TBC, as i learned just a few days ago..] and wanted to take a shot at doing this a little better. --> So, i'm trying to work with what i have for now. )


    Originally Posted by jagabo View Post
    It's not a field order problem it's a field position problem. This is a common problem with video capture. The capture device starts capturing a scanline early or late - resulting in that field shifting up or down. And since it's a field, one scanline early/late puts it up/down two scan lines in the frame. The easiest way to handle this in AviSynth is deinterace the use Stab() -- as suggested by Selur.
    Thank you for the explanation as well, i will try Stab().
    Last edited by Hadeur; 3rd Dec 2021 at 15:18.
    Quote Quote  
  15. One note: For me Stab() doesn't work in 64 bit AviSynth, only 32 bit. It might be an incompatibility problem with the version of DePan I have.
    Quote Quote  
  16. works fine here with 32bit, 64bit Avisnyth and 64bit Vapoursynth,so yes it's probably an issue with Depan...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  17. Member
    Join Date
    Dec 2021
    Location
    Germany
    Search Comp PM
    Originally Posted by Selur View Post
    works fine here with 32bit, 64bit Avisnyth and 64bit Vapoursynth,so yes it's probably an issue with Depan...
    Would you mind attaching the .avs script you used for the sample? I got Stab to work via StaxRip, but it doesn't even reproduce your result so far (i guess you used 32 for dxmax and dymax?).

    Stab(range=1, dxmax=32, dymax=32, mirror=0)
    Quote Quote  
  18. I usually use Vapoursynth not Avisynth. Ans yes I used 32 for x/y max.
    Script I used was:
    Code:
    # Imports
    import os
    import sys
    import ctypes
    # Loading Support Files
    Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
    import vapoursynth as vs
    # getting Vapoursynth core
    core = vs.core
    # Import scripts folder
    scriptPath = 'I:/Hybrid/64bit/vsscripts'
    sys.path.insert(0, os.path.abspath(scriptPath))
    # Loading Plugins
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DePan.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
    # Import scripts
    import havsfunc
    # source: 'C:\Users\Selur\Desktop\vlc-record-2021-12-02-15h16m40s-dshow___-.avi'
    # current color space: YUV422P8, bit depth: 8, resolution: 720x576, fps: 24.96, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
    # Loading source using FFMS2
    clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/vlc-record-2021-12-02-15h16m40s-dshow___-.avi",cachefile="E:/Temp/avi_7457d7342098808f3ffd5f6cd5d7a942_853323747.ffindex",format=vs.YUV422P8,alpha=False)
    # making sure input color matrix is set as 470bg
    clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited")
    # making sure frame rate is set to 24.960
    clip = core.std.AssumeFPS(clip=clip, fpsnum=624, fpsden=25)
    # Setting color range to TV (limited) range.
    clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
    # setting field order to what QTGMC should assume (bottom field first)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
    # Deinterlacing using QTGMC
    clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=False) # new fps: 24.96
    # make sure content is preceived as frame based
    clip = core.std.SetFieldBased(clip, 0)
    clip = clip[::2]
    # DEBUG: VsQTGMC changed scanorder to: progressive
    # stabilizing using Stab
    clip = havsfunc.Stab(clp=clip,mirror=0,dxmax=32,dymax=32)
    # cropping the video to 688x544
    clip = core.std.CropRel(clip=clip, left=16, right=16, top=16, bottom=16)
    # adjusting output color from: YUV422P8 to YUV420P8 for x264Model
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
    # set output frame rate to 24.960fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=624, fpsden=25)
    # Output
    clip.set_output()
    if I remember correctly, additionally applying Stab with higher values on the first 185frames and cropping some more also helps a bit with the beginning.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

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