VideoHelp Forum
+ Reply to Thread
Results 1 to 23 of 23
Thread
  1. Since Vegas can't open Avs file types, I'm looking for help on frameserving into Vegas Movie Studio 17 or Vegas Pro 18(64bit, Windows 10) from Virtualdub2 or other app that can read Avs scripts. Want to apply De-interlacing and Noise reduction in Avisynth+ and frameserve into Vegas for further editing without having to create intermediate files.
    Last edited by stymie; 1st Jan 2023 at 10:09.
    Quote Quote  
  2. avfs

    The older versions run using the windows context menu, and x86 only (x86 avisynth)

    The newer versions are x64 and commandline only, and you can extract avfs.exe from the portable vapoursynth installer using 7-zip or similar
    Quote Quote  
  3. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    I've been rendering a QTGMC/TIVTC .AVI file and using that new .AVI in Vegas Pro. Is frameserving a way to save on a generation-loss of rendering?
    Quote Quote  
  4. Originally Posted by clashradio View Post
    I've been rendering a QTGMC/TIVTC .AVI file and using that new .AVI in Vegas Pro. Is frameserving a way to save on a generation-loss of rendering?
    Yes, in terms of lossy compression "losses". But a "losless" AVI can serve the same purpose, and can make it easier to edit in vegas (the script filters are "baked" into the AVI). A slow script can be hard to handle in vegas and make timeline performance sluggish

    Not necessarily in terms of pixel format conversions -

    All versions of Vegas work in RGB, and if source/script work in YUV, there will be some conversion, and that is a type of loss if the conversion is not done in float. In some versions of vegas, you might have to convert to RGB in the script for avfs to work in vegas (not that bad, because vegas will be converting anyways; at least you can control the type of conversion in the avs script)

    Vapoursynth is slightly different. It has pixel format emulation such as "IYUV" for 8bit 4:2:0, "UYVY" for 8bit 4:2:2 and "v210" for 10bit 4:2:2 . Those are "magical" pixel formats for most windows NLE's including vegas, and those formats get passthrough treatment. In vegas <18 , those pixel would get "studio RGB" treatment automatically instead of "computer RGB" . Newer versions of vegas can be set to operate in studio or computer RGB
    Quote Quote  
  5. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    I'm always working with a lossless .AVI rather something I've imported from my miniDV cam and applied QTGMC or captured a laserdisc and IVTC'ed, but have always wondered if there was a way Vegas Pro 16 could read the AVS script and save on that one step potential gen-loss.

    Ahh Vegas and it's RGB. I remember seeing a YouTube video where a guy described how his rendered file looked different to the video on the Timeline; something to do with computer vs studio rgb. I'll have to dig that up.
    Quote Quote  
  6. sorry, never mind
    Quote Quote  
  7. I was fighting this beast in the past, so I tested it again using AVFS.exe. Using a python/vapoursynth portable setup, all in one directory.

    Videos used were NTSC DV avi, which are 4:1:1, that gets more complicated rather than PAL 4:2:0

    Portable setup for Vapoursynth/Python:
    -portable Vapoursynth R60 download link,
    -python portable version 3.10.7, dumped in the same directory (not sure if Python 3.11 is already supported for vapoursynth)
    -audio plugin BestAudioSource.dll , download link (I think, I just copied mine dll from some earlier portable directory of mine). put into that portable directory, into vapoursynth64\plugins directory
    -ffms2.dll (not sure where I have it from, there is one here https://github.com/FFMS/ffms2/releases) and also put into vapoursynth64\plugins directory
    -if using AviSource in vapoursynth script instead of ffms2, then dvsd codec is needed, like having Cedocida codec installed, but then AviSource would capture 4:1:1 NTSC DVavi as 4:2:0. That could be a good (no 4:2:0 conversion is needed in script) or bad thing (conversion cannot be controlled (but Cedocida should do a good job)

    That shoud be enough just to make AVFS work and load created serve avi file into Magix Vegas (former Sony Vegas). VSVFW.dll is in that portable directory, if AVFS.exe does not work, not sure, it might have something to do to have that dll.

    If QTGMC is needed, this needs to be downloaded as well,
    QTGMC setup:
    -make a directory named python_modules , inside portable directory. This is a good habit to have modules, helper python scripts inside a dedicated separate directory, not inside of that full portable directory and put all of those downloaded *.py scripts there. You can copy those *.py scripst into clipboard and then copy/paste it into a file , rename it as it suppose to be:
    - havsfunc.py downloaded from here https://github.com/HomeOfVapourSynthEvolution/havsfunc
    - adjust.py , https://github.com/dubhater/vapoursynth-adjust
    - mvsfunc.py , https://github.com/HomeOfVapourSynthEvolution/mvsfunc/tree/master/
    - nnedi3_resample.py , https://github.com/HomeOfVapourSynthEvolution/nnedi3_resample
    - vsutil , not sure, if it is needed , https://github.com/Irrational-Encoding-Wizardry/vsutil

    creating a vapoursynth script my_script.vpy located in that portable directory:
    Code:
    import vapoursynth as vs
    from vapoursynth import core
    import sys
    from pathlib import Path
    
    PATH = Path(__file__).parent
    sys.path.append(str(PATH / 'python_modules'))
    #loading dll's
    DLL_DIR = PATH / 'vapoursynth64' / 'plugins'
    for dll_name in ['ffms2.dll']:
        try:
            core.std.LoadPlugin(path=str(DLL_DIR / dll_name))
        except vs.Error:
            pass #if dll is already loaded
    
    file = r'F:\testing_files\NTSC_DVavi.avi'
    clip=core.ffms2.Source(file) #captures 4:1:1
    audio = core.bas.Source(file)
    clip=clip.std.SeparateFields()
    yuv=core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_in_s="170m")
    yuv=yuv.std.DoubleWeave()[::2]
    print(yuv)
    print(audio)
    yuv.set_output(0)
    audio.set_output(1)
    and using cmd line (use with proper paths), AVFS.exe is in that portable directory, it came with portable vapoursynth:
    Code:
    "AVFS.exe"   "my_script.vpy"
    creates C:\Volumes directory where you find avi (Codec ID/Info : ATI YVU12 4:2:0 Planar) and wav file. Cmd print of those were:
    Code:
    VideoNode
            Format: YUV420P8
            Width: 720
            Height: 480
            Num Frames: 208
            FPS: 30000/1001
    
    Audio Node
            Sample Type: INTEGER
            Bits Per Sample: 16
            Channels: FRONT_LEFT, FRONT_RIGHT
            Sample Rate: 48000
            Num Samples: 333132
    Using mpv player, video is ok, BUT, loading avi and wav into Vegas 19, grouped both video and audio (both selected and G). Vegas loaded that video with shifted chroma, not sure how to fix it. Again using mpv player, it is ok, video looks ok, but Vegas does not load it properly, not sure how to fix it:
    Image
    [Attachment 68466 - Click to enlarge]



    If using this script and converting to RGB, Vegas loaded video correctly:
    Code:
    import vapoursynth as vs
    from vapoursynth import core
    import sys
    from pathlib import Path
    
    PATH = Path(__file__).parent
    sys.path.append(str(PATH / 'python_modules'))
    #loading dll's
    DLL_DIR = PATH / 'vapoursynth64' / 'plugins'
    for dll_name in ['ffms2.dll']:
        try:
            core.std.LoadPlugin(path=str(DLL_DIR / dll_name))
        except vs.Error:
            pass #if dll is already loaded
    
    file = r'F:\testing_files\NTSC_DVavi.avi'
    clip=core.ffms2.Source(file)
    audio = core.bas.Source(file)
    clip=clip.std.SeparateFields()
    rgb=core.resize.Bicubic(clip, format=vs.RGB24, matrix_in_s="170m")
    rgb=rgb.std.DoubleWeave()[::2]
    print(rgb)
    print(audio)
    rgb.set_output(0)
    audio.set_output(1)
    Code:
    VideoNode
            Format: RGB24
            Width: 720
            Height: 480
            Num Frames: 208
            FPS: 30000/1001
    
    Audio Node
            Sample Type: INTEGER
            Bits Per Sample: 16
            Channels: FRONT_LEFT, FRONT_RIGHT
            Sample Rate: 48000
            Num Samples: 333132
    so it is in RGB and Vegas does not convert it to RGB again.

    Is thera a way to use avfs.exe and Vegas would treat original without compression if rendered again to DVavi, not change content? I guess not, but anyway. NTSC DV perhaps not at all because of that 4:1:1 vs. 4:2:0.
    Last edited by _Al_; 1st Jan 2023 at 19:01.
    Quote Quote  
  8. The "shifted chroma" is because vegas doesn't understand YV12 fourcc pixel format arrangement

    If using vapoursynth R55+ you can use clip.set_output(alt_output=1) to enable fourcc "I420" emulation for YUV420P8 , and it will be imported correctly as YUV

    avisynth doesn't have the emulation, so you usually have to convert to RGB

    Same with other windows NLE's like Pinnacle stuidio, Premiere, Resolve . Those fourcc pixel types UYVY (for 8bit 422) and v210 (for 10bit 422) are "preferred" and get special treatment, such as passthrough, YUV treatment, and/or studio RGB treatment in vegas

    alt_output=1 for YUV420P8 enables I420
    alt_output=1 for YUV420P8 enables IYUV
    alt_output=2 for YUV422P8 enables UYVY
    alt_output=1 for YUV422P10 enables v210


    Originally Posted by _Al_ View Post

    Is thera a way to use avfs.exe and Vegas would treat original without compression if rendered again to DVavi, not change content? I guess not, but anyway. NTSC DV perhaps not at all because of that 4:1:1 vs. 4:2:0.

    Not in terms of compression, because it frameserves decoded (uncompressed) audio & video
    Last edited by poisondeathray; 1st Jan 2023 at 18:03.
    Quote Quote  
  9. What's the difference from AVFS version 1.0.0.6 and the version extracted from the portable vapoursynth package? Any additional files needed to be extracted from the 7-zip vapoursynth installer. I tried extracting the AVFS from VapourSynth64-Portable-R61.7z, but could not get it to work. However, I tried version 1.0.0.6 and installed the referenced Pismo File Mount Audit Package build 192 and got it seeming working for a simple avs script. Is there a different Pismo File Mount Audit Package I need to install from the vapoursynth package or do I need to extract the entire package? I want to keep everything in 64 bit Avisynth+ and Vegas. Current version from the simple avs script shows Avisynth+ 3.7.0 (r3382, 3.7, i386).
    Quote Quote  
  10. Originally Posted by stymie View Post
    I want to keep everything in 64 bit Avisynth+ and Vegas. Current version from the simple avs script shows Avisynth+ 3.7.0 (r3382, 3.7, i386).
    i386 for version() indicates x86 avisynth is being called in that script. It would say x86_64 for the x64 version

    The avfs 1.0.0.6 version will only work with avisynth x86 . That will still work in vegas x64 . But avisynth x86 is slower and has potential memory limitations

    avfs from the VapourSynth64-Portable archive will work with avisynth x64, and vapoursynth x64. It's self contained, you don't need anything else from the archive (unless you want to play with vapoursynth) - the avfs.exe has an embedded version of pismo mount

    To use it with an avisynth script

    Code:
    avfs script.avs
    The "virtual" AVI will appear in c:\volumes\...
    Last edited by poisondeathray; 1st Jan 2023 at 19:25.
    Quote Quote  
  11. Thanks. That's what I realized. Version 1.0.0.6 only supports 32 bit and explains why it possibly ran out of memory when trying to run a larger script. I'm not sure why I can't get avfs from the VapourSynth64-Portable archive to work. If its has a embedded version of PFM, I'll try deleting PFM Audit Package build 192 and try again. The issue I'm having with the VapourSynth version is that I receive a message: "ERROR: Unable to open PFM interface. PFM probably not installed."
    Last edited by stymie; 1st Jan 2023 at 19:59.
    Quote Quote  
  12. When you preview that version() avs script in vdub2 x64, or avspmod x64, or mpchc x64 - does it preview ok and say x86_64 instead of i386 ?
    Quote Quote  
  13. ahh version() is RGB24 . You would need RGB32 to send it through avfs for avisynth. You can add a dummy alpha channel with ConvertToRGB32()

    Code:
    Version()
    ConvertToRGB32()
    Quote Quote  
  14. ^The earlier error where the AVI did not appear , but you had pismo installed was because version() generates RGB24 not RGB32.

    "ERROR: Unable to open PFM interface. PFM probably not installed."
    The new error - My understanding is that pismo was embedded, but that error message suggests that you need it. But looking at the archive, there is a pfm-192-vapoursynth-win.exe inside. So it might require you to run with that in the path (e.g. from the extracted folder) . I have an installed vapoursynth along with some portable versions, so I can't debug it easily without messing up my configuration
    Quote Quote  
  15. Version shows as x86_64 when previewing through vdub2 x64. Not sure you saw my edit above, I still get the message "ERROR: Unable to open PFM interface. PFM probably not installed." even with the RGB32 command. I'll try running the vapoursynth PFM installer.
    Quote Quote  
  16. My impression is that pfm-192-vapoursynth-win.exe isn't actually installed (otherwise it wouldn't be "portable") , rather it is called during runtime

    So I think those 2 files are needed in the path; pfm-192-vapoursynth-win.exe, and vsedit.exe . If both are in the same directory I think it should work too
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    If using vapoursynth R55+ you can use clip.set_output(alt_output=1) to enable fourcc "I420" emulation for YUV420P8 , and it will be imported correctly as YUV
    thanks, that helped:
    Code:
    yuv.set_output(0, alt_output=1) #fourcc "I420"
    btw, for those who tries to load QTGMC to vapoursynth, bunch of dlls needs to be loaded as well using core.std.LoadPlugin, some using ctypes,
    but I do not want to further pollute this thread, op uses Avisynth
    Quote Quote  
  18. I uninstalled the PFM Audit Package build 192 and tried running the VapourSynth PFM installer and the AVFS.exe file extracted from the VapourSynth64-Portable build. Still no AVI file in the volumes directory. I'm wondering if the PFM Audit Package build 192 wasn't completely removed or if there's another file needed. Didn't see a vsedit.exe file in the build package. The next step I can think of is installing Python and a Portable version of VapourSynth. Any other suggestions? The latest available are portable Vapoursynth R61.7 and python version 3.11.1.
    Quote Quote  
  19. Did you try extracting the entire folder? Run avfs.exe from that folder. Maybe it relies on one of the .dll's in that folder too, not sure. That's the next conservative step. I don't think you need python or to install anything

    It works for me with the portable versions like that, but I have an installed version too... so I don' t know if avfs is using other files... I can run a separate version of avfs alone from a separate folder/path, butI don't know if it's only working because of other things installed or in the path.

    vsedit is a separate download ; it's an editor analogous to avspmod, but for vapoursynth. You definitely don't need it for this
    Quote Quote  
  20. Also tried extracting the entire folder. I'll try a few more ideas. Thanks for your help.
    Quote Quote  
  21. Maybe admin privileges ? Although it's a "virtual" file, sometimes windows gets "squirrely" about anything in the c: path

    Is there an error.log file ? What does it say ? What does the console log say ?
    Quote Quote  
  22. I don't get a avi file in the associated volumes folder. All I get is the script.avs and error log file. The error log is blank.
    Quote Quote  
  23. Update - I tried extracting the AVFS.exe file from the R57 version (VapourSynth64-Portable-R57.7z) verses version-R61 and it appears to be working with Windows 10 (64-bit). I now get avi and audio files in the associated volumes folder.
    Quote Quote  



Similar Threads

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