VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. i did a basic install of vapoursynth and got some basic scripts that include nnedi3,QTGMC etc

    Code:
    import vapoursynth as vs
    import havsfunc as haf
    core = vs.get_core()
    clip = core.ffms2.Source(source='E:\Archive\\input video.avi')
    clip = core.fmtc.resample (clip=clip, css="420")
    clip = core.fmtc.bitdepth (clip=clip, bits=8)
    clip = haf.QTGMC(clip, Preset='Slower', TFF=False)
    clip = core.resize.Spline36(clip, 720, 540, format=vs.YUV422P10, matrix_in_s='709')
    clip.set_output()
    i can open a video and do basic stuff but what i really need is to rip DVD's, run scripts trough them and make them into an mkv file.
    also i need to get "VapourSynth-Waifu2x-caffe" working to use it in the process.

    https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Waifu2x-caffe

    i did all the stuff under "Note"

    so few things.
    1.need to figure , out how to rip DVD's , in avisyth i did it with DGindex , made a .d2v file and run it trough
    Code:
    MPEG2Source("D:\VideoTS\VIDEO_TS.d2v")
    TFM()
    TDecimate(Mode=1)
    cant figute out what to use for vapoursynth
    2.get "VapourSynth-Waifu2x-caffe" working, i added all the needed plugings
    made it simple with this one
    Code:
    import vapoursynth as vs
    core = vs.get_core()
    clip = core.ffms2.Source(source=r'D:\Z.mp4')
    clip = caffe.Waifu2x(clip clip[, int noise=0, int scale=2, int block_w=128, int block_h=block_w, int model=6, bint cudnn=True, int processor=0, bint tta=False, int batch=1])
    clip.set_output()
    gave me this error

    Code:
    Failed to evaluate the script:
    Python exception: invalid syntax (, line 6)
    
    Traceback (most recent call last):
    File "src\cython\vapoursynth.pyx", line 1924, in vapoursynth.vpy_evaluateScript
    File "", line 6
    clip =caffe.Waifu2x(clip clip[, int noise=0, int scale=2, int block_w=128, int block_h=block_w, int model=6, bint cudnn=True, int processor=0, bint tta=False, int batch=1])
    ^
    SyntaxError: invalid syntax
    i am a noob and all the things i've learned were from here or youtube so i might miss really obvious stuff that might be easy for you

    Edit:i installed everything in 64bit
    Last edited by zanzar; 3rd Feb 2019 at 15:19.
    Quote Quote  
  2. 1. Try D2VWitch: https://github.com/dubhater/D2VWitch.git
    Then you can add something like: clip = core.d2v.Source\(input=r"/media/drive/video.d2v") to your script

    2. I don't think "[" en "]" should be in there. These indicate 'optional' settings as found in the documentation.

    3. Also remove the 'int' and 'bint' words,,,

    Greetings!
    Last edited by babiulep; 3rd Feb 2019 at 16:06.
    Quote Quote  
  3. Originally Posted by babiulep View Post
    1. Try D2VWitch: https://github.com/dubhater/D2VWitch.git
    Then you can add something like: clip = core.d2v.Source\(input=r"/media/drive/video.d2v") to your script

    2. I don't think "[" en "]" should not be in there. These indicate 'optional' settings as found in the documentation.

    3. Also remove the 'int' and 'bint' words,,,

    Greetings!
    can you rephrase 2. there is double negative in the sentence
    Quote Quote  
  4. The [ ] are only in the documentation. Every parameter enclosed by [ ] is optional. You don't actually write them into your script.
    Quote Quote  
  5. Originally Posted by sneaker View Post
    The [ ] are only in the documentation. Every parameter enclosed by [ ] is optional. You don't actually write them into your script.
    well so it should look something like
    Code:
    import vapoursynth as vs
    import havsfunc as haf
    core = vs.get_core()
    clip = core.ffms2.Source(source=r'D:\Z.mp4')
    clip = caffe.Waifu2x(clip clip)
    clip.set_output()
    ?

    doesnt run
    Code:
    Failed to evaluate the script:
    Python exception: invalid syntax (, line 5)
    
    Traceback (most recent call last):
    File "src\cython\vapoursynth.pyx", line 1924, in vapoursynth.vpy_evaluateScript
    File "", line 5
    clip = caffe.Waifu2x(clip clip)
    ^
    SyntaxError: invalid syntax
    there are different values i will need to set later , i know what each one of them mean , i just want to get it working first
    Quote Quote  
  6. If you have in the documentation:
    function(clip clip)

    Then clip is the type of the variable with the name clip. VapourSynth knows that the first variable is of type clip so you don't need to actually write it. So you only write:
    function(clip)

    clip is only a name. Could also be quackquackimaduck:
    Code:
    import vapoursynth as vs
    import havsfunc as haf
    core = vs.get_core()
    quackquackimaduck = core.ffms2.Source(source=r'D:\Z.mp4')
    quackquackimaduck = caffe.Waifu2x(quackquackimaduck)
    quackquackimaduck.set_output()
    Quote Quote  
  7. Originally Posted by sneaker View Post
    clip is only a name. Could also be quackquackimaduck
    To extend this a bit. This isn't always fully true. Because parameters can be named. E.g. you have in the documentation:
    function2(clip clip[, int a, int b])

    Then if you want to specfify clip to "quackquackimaduck" and b to "5", but leave a as default you can't write:
    function2(quackquackimaduck, 5)
    because then VapourSynth would think a="5", not b="5". You could then write:
    function2(clip=quackquackimaduck, b=5)

    This won't always work, though, I think. Depends on plugin. So beware.
    Quote Quote  
  8. Originally Posted by sneaker View Post
    If you have in the documentation:
    function(clip clip)

    Then clip is the type of the variable with the name clip. VapourSynth knows that the first variable is of type clip so you don't need to actually write it. So you only write:
    function(clip)

    clip is only a name. Could also be quackquackimaduck:
    Code:
    import vapoursynth as vs
    import havsfunc as haf
    core = vs.get_core()
    quackquackimaduck = core.ffms2.Source(source=r'D:\Z.mp4')
    quackquackimaduck = caffe.Waifu2x(quackquackimaduck)
    quackquackimaduck.set_output()
    well i guess i have some masters missing.
    gave me this

    Code:
    Failed to evaluate the script:
    Python exception: name 'caffe' is not defined
    
    Traceback (most recent call last):
    File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript
    File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript
    File "D:/1T.vpy", line 5, in 
    McTemporalDenoise(settings="Low")
    NameError: name 'caffe' is not defined
    i downloaded the "cudnn64_7.dll" (says it need to be in the search path,i've put it in the plugin folder)
    Quote Quote  
  9. waifu2x-caffe in vapoursynth only accepts 32bit, so you need to upconvert before

    It would look something like this

    Note, the path that I have for Waifu2x-caffe.dll is in a separate folder . cudnn64_7.dll is in the same folder at the same level as Waifu2x-caffe.dll . The models folder is in that same folder too
    Code:
    import vapoursynth as vs
    core = vs.get_core()
    core.std.LoadPlugin(r'PATH\Waifu2x-caffe.dll')
    clip = core.ffms2.Source(source=r'D:\Z.mp4')
    clip = core.fmtc.bitdepth(clip, bits=32)
    clip = core.caffe.Waifu2x(clip, noise=1, scale=2, block_w=64, block_h=64, model=3, cudnn=True, processor=0, tta=False)
    clip = core.fmtc.bitdepth(clip, bits=8)
    clip.set_output()
    Run small tests to see what block sizes run faster on your GPU, and for your source
    Quote Quote  
  10. Originally Posted by poisondeathray View Post
    waifu2x-caffe in vapoursynth only accepts 32bit, so you need to upconvert before

    It would look something like this

    Note, the path that I have for Waifu2x-caffe.dll is in a separate folder . cudnn64_7.dll is in the same folder at the same level as Waifu2x-caffe.dll . The models folder is in that same folder too
    Code:
    import vapoursynth as vs
    core = vs.get_core()
    core.std.LoadPlugin(r'PATH\Waifu2x-caffe.dll')
    clip = core.ffms2.Source(source=r'D:\Z.mp4')
    clip = core.fmtc.bitdepth(clip, bits=32)
    clip = core.caffe.Waifu2x(clip, noise=1, scale=2, block_w=64, block_h=64, model=3, cudnn=True, processor=0, tta=False)
    clip = core.fmtc.bitdepth(clip, bits=8)
    clip.set_output()
    Run small tests to see what block sizes run faster on your GPU, and for your source
    thank you the preview oppened even tho its 64bit...
    Quote Quote  
  11. Originally Posted by zanzar View Post

    thank you the preview oppened even tho its 64bit...

    x64 , yes, but I'm referring to the video format bitdepth has to be 32bits per channel float , not 8bit video (0-255) like DVD-video

    clip = core.fmtc.bitdepth(clip, bits=32) # <= this is upconverting to 32bits per channel

    If you read the instructions
    https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Waifu2x-caffe
    clip: Clip to process. Only planar format with float sample type of 32 bit depth is supported.
    Quote Quote  



Similar Threads

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