VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 32
Thread
  1. i am looking for a way to encode 10bit videos with vapoursynth script , its opens allright at VS edit , but doesnt in Staxrip

    Code:
    Failed to load script.
    
    AVIFileOpen failed to execute
    
    Failed to open VapourSynth script:
    
    D:\Super Script\Rip Mod_temp\Rip Mod_source.vpy
    
    You can try to open the script with VirtualDub x64, if it don't open it could be a problem with the script or the VapourSynth x64 setup, if StaxRip don't report a script error and the script looks valid then reinstalling VapourSynth x64 might fix the problem.
    it doesnt open in VD , any reason to why it might happen ? Staxrip is unable to find 90% of the stuff even when are allready installed , now i stuck at missing "FFT3DFilter" at system32 folder error (its not missing ...).
    Quote Quote  
  2. Can you open a simple script like:
    Code:
    import vapoursynth as vs
    core = vs.get_core()
    res = core.std.BlankClip(color=[255, 0, 0])
    res.set_output()
    What error message does VirtualDub 64 bit show? What version of VapourSynth 64 bit do you have installed?
    Quote Quote  
  3. Originally Posted by sneaker View Post
    Can you open a simple script like:
    Code:
    import vapoursynth as vs
    core = vs.get_core()
    res = core.std.BlankClip(color=[255, 0, 0])
    res.set_output()
    What error message does VirtualDub 64 bit show? What version of VapourSynth 64 bit do you have installed?
    no it doesnt open , looks like it has a problem opening VS scripts.
    the error in VD is "AVI report filter error unknown) (80040154)"
    running r45 VS
    Quote Quote  
  4. Make sure its vdub2 . vdub does not have support for vapoursynth

    (To make sure it's 10bit test)

    Code:
    res = core.std.BlankClip(format=vs.YUV420P10, color=[1023, 0, 0])
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    Make sure its vdub2 . vdub does not have support for vapoursynth

    (To make sure it's 10bit test)

    Code:
    res = core.std.BlankClip(format=vs.YUV420P10, color=[1023, 0, 0])
    same error exacly
    Quote Quote  
  6. What version of vdub2?
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    What version of vdub2?
    the latest one that is linked here (when you write the program name)
    Quote Quote  
  8. Are you testing that simple BlankClip script?

    Is it VirtualDub64.exe ?
    VirtualDub2_43385

    It works ok here


    What message does this say ?
    Code:
    vspipe --info script.vpy -
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    vdub does not have support for vapoursynth
    VapourSynth offers VfW interface so even vanilla VirtualDub can open it if necessary.



    @zanzar:
    I know it sounds stupid but please try reinstalling Python and VapourSynth.
    http://www.vapoursynth.com/doc/installation.html
    Quote Quote  
  10. Originally Posted by sneaker View Post
    Originally Posted by poisondeathray View Post
    vdub does not have support for vapoursynth
    VapourSynth offers VfW interface so even vanilla VirtualDub can open it if necessary.



    @zanzar:
    I know it sounds stupid but please try reinstalling Python and VapourSynth.
    http://www.vapoursynth.com/doc/installation.html
    ill try , in the mean time , a way to encode 10bit videos with vapoursynth?
    Quote Quote  
  11. In the mean time, since vsedit works, you can use that to encode (script => encode video, or F8)

    You have to configure the settings
    Quote Quote  
  12. Originally Posted by zanzar View Post
    ill try , in the mean time , a way to encode 10bit videos with vapoursynth?
    Not really different from encoding 8 bit videos. VapourSynth supports both 8 bit and 10 bit natively.
    Quote Quote  
  13. in case you have portable Vapoursynth, you cannot use VirtualDub because there are no registry entries for VFW
    https://forum.doom9.org/showthread.php?p=1864051#post1864051
    ..ok, you are using installed version I guess
    Quote Quote  
  14. Originally Posted by zanzar View Post
    in the mean time , a way to encode 10bit videos with vapoursynth?
    as Sneaker says, no hacking about 10bit video in Vapoursynth,
    if input is 10bit you load it with ffms2.Source or LibavSMASHSource(mp4, mov) or LWLibavSource (transport streams)

    if input is 8bit and you want to get 10bit, you just convert it:
    clip = core.resize.Bicubic(clip, matrix_in_s = "709", format = vs.YUV420P10)
    Quote Quote  
  15. Originally Posted by _Al_ View Post
    Originally Posted by zanzar View Post
    in the mean time , a way to encode 10bit videos with vapoursynth?
    as Sneaker says, no hacking about 10bit video in Vapoursynth,
    if input is 10bit you load it with ffms2.Source or LibavSMASHSource(mp4, mov) or LWLibavSource (transport streams)

    if input is 8bit and you want to get 10bit, you just convert it:
    clip = core.resize.Bicubic(clip, matrix_in_s = "709", format = vs.YUV420P10)
    ok i think i know what happened , my vapoursynth was portable and was "installed" in my doc folder along with VSedit , also my pyton was 32 bit for some reason ,
    deleted , installed 64 bit , installed vapoursynth in the original req' folder , now it gives me this

    Code:
    Failed to load script.
    
    Python exception: Failed to load D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS\DCTFilter\DCTFilter.dll. GetLastError() returned 126. A DLL dependency is probably missing.
    
    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:\Super Script\Rip Mod -22 Copy_temp\Rip Mod -22 Copy_source.vpy", line 15, in <module>
        core.std.LoadPlugin(r"D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS\DCTFilter\DCTFilter.dll")
      File "src\cython\vapoursynth.pyx", line 1833, in vapoursynth.Function.__call__
    vapoursynth.Error: Failed to load D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS\DCTFilter\DCTFilter.dll. GetLastError() returned 126. A DLL dependency is probably missing.
    the dct filter dll is there...

    edit :doesnt even run this

    from vapoursynth import core
    import muvsfunc as puf
    import mvsfunc as muf
    import havsfunc as kuf
    import hysteria as ma
    import nnedi3_resample as nnrs
    import adjust as re
    clip = core.ffms2.Source(r'D:\Z.mp4')

    clip.set_output()
    Quote Quote  
  16. Now it becomes third party issue, Staxrip problem, or as it says that DLL might need some other stuff.

    Also it could easily become a nightmare if programs load DLL's on their own, guessing, especially towards future. Those DLL's might better be in dedicated places, like in Vapoursynth folder etc.
    Quote Quote  
  17. What about basics first, like sneakers script ?
    Quote Quote  
  18. Originally Posted by _Al_ View Post
    What about basics first, like sneakers script ?
    it asks me to install FFTW , when i click install there it says "FFTW returned an error"

    god damn this program needs to much stuff around it to work .
    any otherway to encode the videos with VS? , something like Megui , where you insert the script , set the crf , then press a button.
    or even something else since noting works for now...
    Quote Quote  
  19. MeGui should work with vpy by now, I don't see why not, how easy it is, I do not know, if 'One click encoder' (Ctrl+F1) supports vpy input, it should be user friendly.
    Quote Quote  
  20. Originally Posted by _Al_ View Post
    MeGui should work with vpy by now, I don't see why not, how easy it is, I do not know, if 'One click encoder' (Ctrl+F1) supports vpy input, it should be user friendly.
    well it doesnt seem to suppot it (maybe i suck at checking this lol)
    Quote Quote  
  21. well vspipe is a dedicated tool to encode vpy, but it is a command line tool, not much user friendly, but it comes with with Vapoursynth, it is its folder:
    Code:
    vspipe.exe  your_script.vpy - --y4m | x264_64bit.exe  --demuxer y4m --crf 18 --colorprim bt709 --colormatrix bt709  --output out.h264  -
    you 'd need to have all used DLL's in Vapoursynth dedicated folder as well
    but that VirtualDub2 64bit, after installation of Python 64bit and Vapoursynth 64bit should load that vpy also
    Quote Quote  
  22. one quite important thing though, Vapoursynth = Python script, so you are in a quite elaborate language script already, you can do encoding & other magic right there.
    You can load vpy , x264, file and encode using subprocess or something else, there is plenty tutorials on web.

    Or you can even get h264 encoded file right from your Vapoursynth script as well. Vapoursynth can output object to a file handle. And that could be loaded into subprocess that is right in your script. Just name your script as *.py and run it in some console (IDLE3 came with Python for you) using F5, I think even VS editor would work, it would be just started by evaluation of script, example:
    Code:
    #your script
    import subprocess
    import vapoursynth as vs
    from vapoursynth import core
    
    input=r'C:\path_to_video\video.mkv'
    clip = core.ffms2.Source(input)
    #clip.set_output()   #this you comment out
    
    
    #add this to the bottom of your script, adjust whatever you need
    
    output = r'C:\destination\video.264'
    x264 = r'C:\path\x264-64bit.exe'
    
    cmd = [x264, '--frames',           f'{len(clip)}',
                 '--input-csp',         'i420',
                 '--demuxer',           'raw',  
                 '--input-depth',       '8',
                 '--input-res',        f'{clip.width}x{clip.height}',
                 '--fps',              f'{clip.fps_num}/{clip.fps_den}',
                 '--crf',               '18',
                 '--colorprim',         'bt709',
                 '--transfer',          'bt709',
                 '--colormatrix',       'bt709',
                 '--output',             output,
                 '-']
    process = subprocess.Popen(cmd, stdin=subprocess.PIPE)
    clip.output(process.stdin)
    process.communicate()
    I tried to simplify it as much as needed
    Last edited by _Al_; 5th Mar 2019 at 22:03.
    Quote Quote  
  23. Originally Posted by _Al_ View Post
    well vspipe is a dedicated tool to encode vpy, but it is a command line tool, not much user friendly, but it comes with with Vapoursynth, it is its folder:
    Code:
    vspipe.exe  your_script.vpy - --y4m | x264_64bit.exe  --demuxer y4m --crf 18 --colorprim bt709 --colormatrix bt709  --output out.h264  -
    you 'd need to have all used DLL's in Vapoursynth dedicated folder as well
    but that VirtualDub2 64bit, after installation of Python 64bit and Vapoursynth 64bit should load that vpy also
    ok so the problem was that i had a portable "everything folder" without anything actually installed , making the other programs not recognize it , i had a folder where i extracted VS , pytone , all the plugins.

    let me understand how to do it correctly ,
    1.install pytone in its original path (64bit)
    2.install VS , should i use the portable option (64bit) and extract it into the pytone folder ? or should i use the VS installer to let it install at "Program Files" ?
    3.extract vsedit to the pytone folder
    4.add all the plugins needed.

    also should i ignore R45.1? or should i install it in some way also?
    Quote Quote  
  24. as for Windows:
    install latest Python 64bit, it is going to reside in
    Code:
    "C:\Users\-your user name -\AppData\Local\Programs\Python\Python37"
    install latest Vapoursynth 64bit, it is going to reside in
    Code:
    C:\Program Files (x86)\VapourSynth
    and that's it, everything shoud be ready
    yes even 64bit Vapoursynth is going to install in x86 directory, everything is automatic then, you do not suppose to move anything to anywhere, your Vapoursynth plugin(dll) folder is going to be at:
    Code:
    C:\Program Files (x86)\VapourSynth\plugins64\
    where you put your DLL's if you download them from web

    your scripts, moduls (something.py) downloaded from web like havsfunc.py and many others, that's another issue, they have to be in a PATH for Python to see. That could be current folder, and couple of other folders, I strongly recomend you choose:
    Code:
    C:\Users\-your user name -\AppData\Local\Programs\Python\Python37\Lib\site-packages\vapoursynth
    that directory is there created for you and you'd have nicely all *.py overthere within site-packages directory,
    for example, if you put your "my_super_script.py" in there, and then anywhere in your PC you design vpy file, importing that script as:
    Code:
    import my_super_script.py
    your script would load it (something similar like with *.avsi in avisynth)
    Last edited by _Al_; 6th Mar 2019 at 02:33.
    Quote Quote  
  25. Originally Posted by _Al_ View Post
    as for Windows:
    install latest Python 64bit, it is going to reside in
    Code:
    "C:\Users\-your user name -\AppData\Local\Programs\Python\Python37"
    install latest Vapoursynth 64bit, it is going to reside in
    Code:
    C:\Program Files (x86)\VapourSynth
    and that's it, everything shoud be ready
    yes even 64bit Vapoursynth is going to install in x86 directory, everything is automatic then, you do not suppose to move anything to anywhere, your Vapoursynth plugin(dll) folder is going to be at:
    Code:
    C:\Program Files (x86)\VapourSynth\plugins64\
    where you put your DLL's if you download them from web

    your scripts, moduls (something.py) downloaded from web like havsfunc.py and many others, that's another issue, they have to be in a PATH for Python to see. That could be current folder, and couple of other folders, I strongly recomend you choose:
    Code:
    C:\Users\-your user name -\AppData\Local\Programs\Python\Python37\Lib\site-packages\vapoursynth
    that directory is there created for you and you'd have nicely all *.py overthere within site-packages directory,
    for example, if you put your "my_super_script.py" in there, and then anywhere in your PC you design vpy file, importing that script as:
    Code:
    import my_super_script.py
    your script would load it (something similar like with *.avsi in avisynth)
    i solved everything , even staxrip works , thanks you guys are awesome!
    Quote Quote  
  26. Originally Posted by _Al_ View Post
    as for Windows:
    install latest Python 64bit, it is going to reside in
    Code:
    "C:\Users\-your user name -\AppData\Local\Programs\Python\Python37"
    install latest Vapoursynth 64bit, it is going to reside in
    Code:
    C:\Program Files (x86)\VapourSynth
    and that's it, everything shoud be ready
    yes even 64bit Vapoursynth is going to install in x86 directory, everything is automatic then, you do not suppose to move anything to anywhere, your Vapoursynth plugin(dll) folder is going to be at:
    Code:
    C:\Program Files (x86)\VapourSynth\plugins64\
    where you put your DLL's if you download them from web

    your scripts, moduls (something.py) downloaded from web like havsfunc.py and many others, that's another issue, they have to be in a PATH for Python to see. That could be current folder, and couple of other folders, I strongly recomend you choose:
    Code:
    C:\Users\-your user name -\AppData\Local\Programs\Python\Python37\Lib\site-packages\vapoursynth
    that directory is there created for you and you'd have nicely all *.py overthere within site-packages directory,
    for example, if you put your "my_super_script.py" in there, and then anywhere in your PC you design vpy file, importing that script as:
    Code:
    import my_super_script.py
    your script would load it (something similar like with *.avsi in avisynth)
    why did i thought this is over?

    when i load and fire everything up it just crashes , even when i use simple stuff.

    Edit: ok its a x265 problem , the x264 works fine.
    Image Attached Files
    Quote Quote  
  27. Originally Posted by zanzar View Post
    why did i thought this is over?

    when i load and fire everything up it just crashes , even when i use simple stuff.

    Edit: ok its a x265 problem , the x264 works fine.


    ------------------- Video encoding using x265 2.9+34 -------------------

    "C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" D:\test_temp\test.vpy - --y4m | D:\Programs\Staxrip.2.0.0.0.x64\Apps\Encoders\x265\x265.exe --crf 20 --output-depth 10 --sar 40:33 --frames 581 --y4m --output D:\test_temp\test_out.hevc -

    Error: fwrite() call failed when writing frame: 0, plane: 0, errno: 32
    Output 5 frames in 0.68 seconds (7.33 fps)


    y4m header is supposed to convey this info automatically ... but with most (?all) compiled x265 binaries - you actually have to enter the clip input parameters (fps, dimensions, colorspace, bit depth, etc...) . For x264 builds it works properly with y4m as you experienced . You should notify stax or file bug report if you want it fixed

    I don't know if this is what your script was sending, but for something like 10bit 4:2:0 1920x1080, 24.0fps the missing lines would look like
    Code:
    --fps 24 --input-res 1920x1080 --input-depth 10 --input-csp i420
    You don't actually have to scale the input to 10bit to encode 10bit (you can send 8bit data, and the encoder will scale to 10bit if input-depth is 10, and output-depth is 10, but some people prefer to control over how things are scaled or done in the script)
    Quote Quote  
  28. notice, in your log you posted
    Code:
    import importlib.machinery
    muvsfunc = importlib.machinery.SourceFileLoader('muvsfunc', r"D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS\Scripts\muvsfunc.py").load_module()
    staxrip is loading muvsfunc.py modul (using another loading modul importlib.machinery) because as a package software it has all of those py moduls and would not mess with your PC copying those files anywhere, checking what and where is available.
    If you are going to create your Vapoursynth script you could just put that mvsfunc.py or others you download from web into \site-packages\vapoursynth directory and use it with simple import muvsfunc

    he is also loading all DLL's in script because of the same reason, staxrip cannot rely what you have or not in your: C:\Program Files (x86)\VapourSynth\plugins64 directory and must load them from his directory to script
    Quote Quote  
  29. Originally Posted by _Al_ View Post
    notice, in your log you posted
    Code:
    import importlib.machinery
    muvsfunc = importlib.machinery.SourceFileLoader('muvsfunc', r"D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS\Scripts\muvsfunc.py").load_module()
    staxrip is loading muvsfunc.py modul (using another loading modul importlib.machinery) because as a package software it has all of those py moduls and would not mess with your PC copying those files anywhere, checking what and where is available.
    If you are going to create your Vapoursynth script you could just put that mvsfunc.py or others you download from web into \site-packages\vapoursynth directory and use it with simple import muvsfunc

    he is also loading all DLL's in script because of the same reason, staxrip cannot rely what you have or not in your: C:\Program Files (x86)\VapourSynth\plugins64 directory and must load them from his directory to script
    so is there any way to fix this? i see that staxrip has its own dll folders

    D:\Programs\Staxrip.2.0.0.0.x64\Apps\Plugins\VS
    ?

    i allready have the py in \site-packages\vapoursynth in the pyton folder.
    Quote Quote  
  30. Originally Posted by poisondeathray View Post
    Originally Posted by zanzar View Post
    why did i thought this is over?

    when i load and fire everything up it just crashes , even when i use simple stuff.

    Edit: ok its a x265 problem , the x264 works fine.


    ------------------- Video encoding using x265 2.9+34 -------------------

    "C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" D:\test_temp\test.vpy - --y4m | D:\Programs\Staxrip.2.0.0.0.x64\Apps\Encoders\x265\x265.exe --crf 20 --output-depth 10 --sar 40:33 --frames 581 --y4m --output D:\test_temp\test_out.hevc -

    Error: fwrite() call failed when writing frame: 0, plane: 0, errno: 32
    Output 5 frames in 0.68 seconds (7.33 fps)


    y4m header is supposed to convey this info automatically ... but with most (?all) compiled x265 binaries - you actually have to enter the clip input parameters (fps, dimensions, colorspace, bit depth, etc...) . For x264 builds it works properly with y4m as you experienced . You should notify stax or file bug report if you want it fixed

    I don't know if this is what your script was sending, but for something like 10bit 4:2:0 1920x1080, 24.0fps the missing lines would look like
    Code:
    --fps 24 --input-res 1920x1080 --input-depth 10 --input-csp i420
    You don't actually have to scale the input to 10bit to encode 10bit (you can send 8bit data, and the encoder will scale to 10bit if input-depth is 10, and output-depth is 10, but some people prefer to control over how things are scaled or done in the script)
    where do i write the line?
    Quote Quote  



Similar Threads

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