VideoHelp Forum
+ Reply to Thread
Results 1 to 29 of 29
Thread
  1. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    i learned more about interlaced processing and found that right now actually what i need for most of my videos is IVTC

    there are some threads and common guides about how to do this with VDub and/or Avisynth scripts but i keep having trouble with everything i try

    the guides and threads for using plugins through VDub rely on plugins that only use YUY2 or YV12 color format, which are both lesser quality formats than v210 so i really don't want to use them. (how can something as common as IVTC only exist in two older formats?! so weird...)

    the other threads i found on this forum involve using avisynth scripts with functions: manualIVTC, loop, SeparateFields,SelectEvery,Weave and trim *

    these don't require lossy conversion but i can't get them to work either, using vdub and mpv i can definitely see them doing something but somehow i never end up with less telecine artifact frames than i started with, the scripts just don't do what they're supposed to
    (i am still trying to figure out if codecs affect this but i don't know if/how, it would be great if there were just some easy way to check if/which a codec is installed but i don't know, i am pretty sure i have one already and don't want more tech problems if i install another without a better idea what i'm doing)

    so maybe you can offer some help it should be really simple, the videos are totally typical telecine, no change in patterns or other forms of interlacing, there's no reason for a sample video clip, project is 100% standard

    ivtc is so common and really simple but i have searched and read for months now and i just can't find anything that works with v210 unless i downgrade from 10-bit to 8-bit... maybe there are more options if i captured rgb video instead of v210 but i'm not sure my computer can



    * fwiw here is the avs script i tried with 0-4 in manualIVTC(#) :

    Code:
    global OPT_Enable_V210 = true
    AviSource("c:\Untitled.avi")
    manualIVTC(2)
    
    
    function manualIVTC(clip v, int p)
    {
    v=loop(v, p, 0,0)
    v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
    v=trim(v,int(p*3/5),0)
    
    return v.assumeFPS(24000,1001)
    }
    Last edited by videobackup; 23rd May 2020 at 19:46.
    Quote Quote  
  2. A workaround is to apply TIVTC as as stacked 16bit msb/lsb

    Code:
    #10bit422 source
    
    ConvertBits(16)
    ConvertToStacked()
    TFM()
    TDecimate()
    ConvertFromStacked()
    ConvertBits(10)
    If the video cadence pattern is not changing, the pattern is strict, then that "manual ivtc" function can do it natively too at 10bit422. If you see combing, you didn't pick the correct number for the phase, or it's not strict pattern (e.g. it was edited somewhere without removing pulldown)
    Quote Quote  
  3. Use ffms2 or lsmash instead of avisource for v210 . That way you know it works. You can check with info() to see it's returning proper 10bit422 .


    If you don't have the proper codec, or AVISource selects a different one, often it returns RGB or 8bit YUV. It's inconsistent and dependent on how you have your system setup
    Quote Quote  
  4. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    thanks for your reply

    if i use the ivtc filter in vdub with manual pattern phase then the preview plays perfectly but of course to export it would downgrade the color format. it's so weird it works that way but not with the script that does the exact same thing

    i don't know what else to try for that manual ivtc script, i agree it should work, the video is strict pattern, i have tried everything from 0 to 9...but all it does is either keep the video the same or actually add more artifacts.

    thanks for the alternate IVTC stacked code, i will try it out and see what i can get, it would be so much easier if the avs script would just work
    Quote Quote  
  5. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    ok i downloaded LSMASHSource.dll and put it into every plugins folder under program files AviSynth+, then replaced the AviSource line with LWLibavAudioSource(c:\untitled.avi) and LWLibavVideoSource(c:\untitled.avi) on two separate consecutive lines
    and now mpv and Vdub either fail to load or freeze
    Quote Quote  
  6. Are you using this one ?
    https://github.com/HolyWu/L-SMASH-Works/releases

    What about the source filter only ?
    Code:
    LWLibavVideoSource("c:\untitled.avi")
    avs+ x64 ? or classic

    vdub2 x64 ? or classic ?
    Quote Quote  
  7. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    yes, that is the LSmash I installed

    I installed AVS+ (not classic, can/should i install both?) using the options: AVS+ Basic, AVS+ 32bit, AVS+ 64bit

    the LSmash dll is in every single plugin folder that exists under AVS+ program files folder

    if i try to run the script using vdub normal it says it cant load 64 bit plugins, if i try with vdub2 64 it just freezes
    Quote Quote  
  8. It freezes with the 1 line script ? Can't load the video ?

    What about ffms2 ?



    vdub2 x64 and avs+ x64 combo is ok . But apparently some people are having problems with avs+ 3.6 released a few days ago for whatever reason. 3.5.1 is stable
    Quote Quote  
  9. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    3.5.1 wasn't working with this so i updated to 3.6 and tried it again right before i read your message

    with only the 1 line script, it loads and plays the video

    when i add the rest of the script back in, it returns this error:
    AviSynth Open failure: the script's return value was not a video clip, (Is the undefined value)

    according to everything i can find out about it, ffms2 needs a hacked version to open 10 bit video files, the only 10 bit version i can find that isnt source code is very old
    Quote Quote  
  10. Check if it's returning 10bit422 with Info()
    Code:
    LWLibavVideoSource("c:\untitled.avi")
    info()

    Next, Check that
    Code:
    LWLibavVideoSource("c:\untitled.avi")
    
    ConvertBits(16)
    ConvertToStacked()
    TFM()
    TDecimate()
    ConvertFromStacked()
    ConvertBits(10)
    You might also need the newest TIVTC , the older versions only work with packed formats
    https://github.com/pinterf/TIVTC/releases
    Quote Quote  
  11. according to everything i can find out about it, ffms2 needs a hacked version to open 10 bit video files, the only 10 bit version i can find that isnt source code is very old
    Really old versions do, newer versions within the last few years do not.

    This one is ok
    https://forum.doom9.org/showthread.php?p=1906345#post1906345
    Quote Quote  
  12. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    info() = Colorspace: YUV422P10, BitsPerComponent: 10 fieldbased: no

    i'll get the newest tivtc and ffms2 but why would lsmash get that weird error and prevent me from using the simpler script method?
    Quote Quote  
  13. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    i downloaded the new ffms2 and tivtc and i just guess i put them in the program files avs+ 64bit plugins folders
    Quote Quote  
  14. Originally Posted by videobackup View Post
    i'll get the newest tivtc and ffms2 but why would lsmash get that weird error and prevent me from using the simpler script method?

    Try adding the clip "last" or variable name for the clip

    (and 0-4 for the phase)

    Code:
    LWLibavVideoSource("c:\untitled.avi")
    manualIVTC(last, 2)
    
    
    function manualIVTC(clip v, int p)
    {
    v=loop(v, p, 0,0)
    v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
    v=trim(v,int(p*3/5),0)
    
    return v.assumeFPS(24000,1001)
    }
    Quote Quote  
  15. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    ok but because i have no idea what "clip last or variable name" means i am limited to just copying and pasting what you wrote there
    Quote Quote  
  16. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    copied and pasted the code you wrote and it gave me the exact same error message as before
    Quote Quote  
  17. That error seems to be related to 3.6 (I get a similar error message "not a clip" in avspmod , and same message as you in vdub2 x64)

    But it works on 3.5.1 for me

    In 3.6 , you need "return last" . There were some syntax changes and bunch of stuff other change - it's probably causing compatibility problems all over, and I know some GUI programs need updating

    Code:
    LWLibavVideoSource("c:\untitled.avi")
    manualIVTC(last, 2)
    return last
    
    function manualIVTC(clip v, int p)
    {
    v=loop(v, p, 0,0)
    v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
    v=trim(v,int(p*3/5),0)
    
    return v.assumeFPS(24000,1001)
    }
    Quote Quote  
  18. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    and that results in exactly the same problem i originally had, no improvement in telecine frames but slight differences based on changing manualivtc #
    Quote Quote  
  19. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    and i had that problem using 3.5, i didn't update until recently
    Quote Quote  
  20. Not sure, it works for me.

    What is the framerate reported by info() for you ?



    I get some combed frames because manualIVTC is not adaptive on a typical sample.

    But on a clean perfect cadence telecine sample - it's 100% perfect .


    Or you can use the workaround with the stacked msb/lsb TIVTC.


    Or maybe there is an issue with your video. Zip it up and upload a sample if you want someone to investigate
    Quote Quote  
  21. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    29.97

    video is standard cadence there's no change and it works perfectly with the manual timing setting of the IVTC plugin in VDub (adaptive off)

    yeah there's nothing that's an issue with the video, based on what you are writing there is no reason for any kind of problem
    maybe i would get the same perfect result if i didn't get an error message for whatever reason

    if i were making any kind of progress then uploading a sample would make more sense but i can totally see it just being another set of technical problems and going nowhere just like everything else i try

    i'll just try the stacked TIVTC, it will take a while to guess and run all possible TFM/Tdecimate values, after i do that and it still doesnt work i will post about it again, might as well assume it wont work and start writing the next thing to try lol
    Quote Quote  
  22. Originally Posted by videobackup View Post


    i'll just try the stacked TIVTC, it will take a while to guess and run all possible TFM/Tdecimate values, after i do that and it still doesnt work i will post about it again, might as well assume it wont work and start writing the next thing to try lol
    You don't have to guess or "run all possible values"

    It's an adaptive field matcher. The default values should work as-is

    If your clip cadence is perfect and there are no other issues such as field warping or alignment issues, you could even completely disable post processing with TFM(pp=0) . Normally it removes residual combing by applying post processing. (Orphan fields, field alignment issues; but you shouldn't have any of those on a perfect source, no cadence breaks)
    Quote Quote  
  23. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    the only way i have used avs scripts is to test them in mpv and vdub2.
    trying this avs script in mpv results in nothing happening, the video doesn't even open
    in vdub2 i get "not responding" freeze and nothing else happens

    Code:
    LWLibavVideoSource("C:\Untitled.avi")
    ConvertBits(16)
    ConvertToStacked()
    TFM(pp=0)
    TDecimate()
    ConvertFromStacked()
    ConvertBits(10)
    Quote Quote  
  24. 1) Try adding

    return last


    2) Did you upgrade TIVTC ?


    3) Or, freezing might be because it's indexing the file. When it opens video the first time, LSmash and FFMS2 will index the file. Since v210 files are uncompressed and usually quite large - it can take a while depending on your hardware

    If you have the option to use MOV container for v210, you can use LSmashVideoSource("video.mov") and you don't need to index
    Quote Quote  
  25. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    i tried to install another v210 codec but i have no idea if it worked, when i run avisource info() it still says RGB32 8 bit
    it was an installer program not an archive i could just copy paste contents of


    "return last" goes on the second line after the lsmash video source line?

    i thought i upgraded TIVTC. i downloaded the archive (and tdeint) and decompressed the contents of "x64" to the plugins64 AND plugins64+ folder of AviSynth+ in program files.

    although my capture card can capture a v210 as a mov file instead of a an avi the quality is lower so i dont use it, i don't know anything about mov container

    since it might be indexing i'll just leave it running longer
    Quote Quote  
  26. Originally Posted by videobackup View Post
    i tried to install another v210 codec but i have no idea if it worked, when i run avisource info() it still says RGB32 8 bit
    it was an installer program not an archive i could just copy paste contents of
    It's difficult to get proper 10bit422 out of windows VFW. Or AVISource in windows.

    "return last" goes on the second line after the lsmash video source line?
    At the very very end

    although my capture card can capture a v210 as a mov file instead of a an avi the quality is lower so i dont use it, i don't know anything about mov container
    Why would it be lower quality than the AVI at the capture stage ?

    You can remux (stream copy) them losslessly in ffmpeg too. I think vdub2 can too. AVI and MOV are just containers. Think of them as different types of "boxes". You can take the video in one box and place it into another box.

    since it might be indexing i'll just leave it running longer
    Or you can try a shorter clip for debugging purposes
    Quote Quote  
  27. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    Code:
    LWLibavVideoSource("C:\Untitled.avi")
    manualIVTC(last, #)
    return last
    
    function manualIVTC(clip v, int p)
    {
    v=loop(v, p, 0,0)
    v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
    v=trim(v,int(p*3/5),0)
    
    return v.assumeFPS(24000,1001)
    }
    it indexed and opened and with everything 0-5 in manualivtc# it's still exactly the same problem as always. no improvement in telecine frames, only changes in pattern


    Code:
    LWLibavVideoSource("C:\Untitled.avi")
    ConvertBits(16)
    ConvertToStacked()
    TFM(pp=0)
    TDecimate()
    ConvertFromStacked()
    ConvertBits(10)
    return last
    playback in vdub2 looks exactly like the original file as if there was no processing at all
    Quote Quote  
  28. Member
    Join Date
    Mar 2020
    Location
    america
    Search Comp PM
    ok well based on what you say "video for windows" (vfw) isnt working i guess, i tried to install a codec to fix that like you suggested, i don't even know if it worked or not let alone what to do to fix vfw

    i have no idea why avi and mov would capture differently, obviously i dont know about video technology, i tried one then the other with identical settings and quicktime mov v210 was worse, since even after it indexes it still doesnt work the whole mov/avi thing doesnt seem important
    Quote Quote  
  29. Originally Posted by videobackup View Post
    Code:
    LWLibavVideoSource("C:\Untitled.avi")
    manualIVTC(last, #)
    return last
    
    function manualIVTC(clip v, int p)
    {
    v=loop(v, p, 0,0)
    v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
    v=trim(v,int(p*3/5),0)
    
    return v.assumeFPS(24000,1001)
    }
    it indexed and opened and with everything 0-5 in manualivtc# it's still exactly the same problem as always. no improvement in telecine frames, only changes in pattern


    Code:
    LWLibavVideoSource("C:\Untitled.avi")
    ConvertBits(16)
    ConvertToStacked()
    TFM(pp=0)
    TDecimate()
    ConvertFromStacked()
    ConvertBits(10)
    return last
    playback in vdub2 looks exactly like the original file as if there was no processing at all

    Are you saving the script before opening in vdub2? What does file=>file information say in vdub2, when either script is loaded ?

    For the 2nd one , does erasing pp=0 change anything ?




    i have no idea why avi and mov would capture differently, obviously i dont know about video technology, i tried one then the other with identical settings and quicktime mov v210 was worse, since even after it indexes it still doesnt work the whole mov/avi thing doesnt seem important
    You said quality is "lower" . I'm wondering why

    Maybe you're not decoding it correctly?

    MOV should actually work better than AVI. At least you get 10bit422 almost everywhere. It has better support for higher bit depths. AVI is very finicky for higher than 8bits .

    But you're right, something else is wrong with your workflow or system. It's just faster to debug MOV, because there is no indexing, that's why I suggested it
    Quote Quote  



Similar Threads

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