VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 67
Thread
  1. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Hello. I'm very much a novice at ripping so please be gentle with me.

    I have two different problems to solve.
    I'm using Staxrip 2.8.0.
    1: An anime series that I can encode using QTGMC with okay results but with lots of 'in-between ghost frames'. It's supposed to be possible to do an IVTC on it together with decimate but since I'm a novice, I can't get it to work.

    Original info (very scant) on what needs to be done to the file is available here:
    NYAA

    Here is a piece of the episode that is a good place to start:
    CLIP
    I have tried all the IVTC options in Staxrip and all leave in-between images in the end result.
    I also tried the Assume TFF command with similar results:
    AssumeTFF()
    TFM()
    TDecimate()

    A screen grap of my TIVTC:
    GRAB

    This is what the scene looks like in the linked rip:
    TH05

    I'm doing my own rip to preserve as much of the original quality as possible without softening the image like the rip does.

    2: A film where most frames are progressively stored but that has interlaced frames at some scene cuts.
    dgmpgdec2006 reports this as 97.5% progressive.

    I can do a frame repair with QTGMC Progressive but I lose a lot of detail in the progressive frames.
    How do I make these interlaced frames progressive without affecting the quality of the rest of the frames?

    Here's a sample with two such scene cuts. The first at 1min 12secs and the second at 2min 7secs.
    Progressive


    I hope I'm not breaking any rules of this forum.
    Quote Quote  
  2. The second sample is easy so I'll begin with that.
    Originally Posted by ericf View Post
    I can do a frame repair with QTGMC Progressive but I lose a lot of detail in the progressive frames.
    How do I make these interlaced frames progressive without affecting the quality of the rest of the frames?
    Don't even think of using QTGMC when an IVTC is called for. Make the D2V using 'Honor Pulldown Flags' and use the D2V option as described in the TFM doc:
    flags -

    Controls how much of the info from the d2v file is used when the "d2v" parameter is set.
    Possible options:

    0 - Check the d2v file for illegal transitions and set the order parameter if it
    is not already manually set. Also, pass on rff flag duplicate info to
    tdecimate.


    4 - Same as 1, but d2v matches are checked for being combed. If a d2v match is detected
    as combed then tfm uses its own matching routine for that frame.
    It, in effect, uses 'Forced Film' to get back the progressively encoded parts and only IVTC's the interlaced parts.

    TFM(D2V="Video.d2v").TDecimate()

    The first sample has many of the problems of anime - the poorly IVTC'd mouths, the scene change blending, and the chroma bleeding into the next frames. I'd just do a:

    TFM().TDecimate(Mode=1)

    and forget about it. But I don't guess that's good enough for you. I don't think the blended scene changes can be fixed any way other than manually as before the IVTC there are 2 of them in a row. Maybe someone else has better suggestions.
    Quote Quote  
  3. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thank you. I'm not concerned with the scene changes in the anime. Just the chrome bleeding which looks like a ghost image and the horizontal lines in it. I did a regular deinterlace version using Yadif the first time and that produced a lot of jagged stairstepping so I'm trying to do better this time. I did try the TFM().TDecimate(Mode=1) and that produced the horizontal lines I mentioned. If I do a QTGMC, those lines, as seen in the capture, in the chroma bleed, are gone and there's a complete color field instead.
    It's not the same frame, but this illustrates the effect:
    QTGMC
    I'm using Topaz VEAI to upscale and clean it up after the video has been encoded.

    I'll try the TFM(D2V="Video.d2v").TDecimate() on the film.
    Yes! It worked perfectly on the sample. I'll do the whole film then.
    EDIT:
    I demuxed the video using dgmpgdec2006 checking the Honor Pulldown Flags.
    When I load the d2v in Staxrip and add the D2V="Video.d2v" to the TFM code, I get an error message saying that the d2v frame count does not match the filter frame count (207591 vs 166073).

    Last edit before I go to bed.
    The d2v I get for the whole video, using dgmpgdec2006 and ticking the Honor Pulldown Flags results in a d2v with this header:
    Stream_Type=1
    MPEG_Type=2
    iDCT_Algorithm=6
    YUVRGB_Scale=1
    Luminance_Filter=0,0
    Clipping=0,0,0,0
    Aspect_Ratio=16:9
    Picture_Size=720x480
    Field_Operation=1
    Frame_Rate=23976 (24000/1001)
    Location=0,0,5,58371

    Setting the pulldown option should result in a framerate of 29.970, right?
    Just saving as a project without demuxing results in a proper d2v with 29.970.
    So what went wrong?
    EDIT: Staxrip rewrites the d2v to 23976 frames when I choose to open the d2v as a project and when I open the m2v instead, it creates a new d2v that is 23976 frames! I can't use the TFM(D2V="Video.d2v").TDecimate() then.
    D**n!
    How do I trick Staxrip to show the stream as 29.970 on both sides of the encoding window?
    Why does it work with the small clip but not the whole film (not the separate VTS either)?
    Answer, sort of: when I load the d2v for the small clip, there's no information of SDR (Interlaced or Progressive). I can't see anything different in the d2v for this clip and the others.

    Sorry, I'm not used to encoding at all. I've tried to read up but a lot of it just doesn't stick with me. I'm trying to get by with a fixed solution plus some avisynth script codes.

    It's obvious it won't work in Staxrip. Suggest a diffrent encoder that can accept the d2v and lets me change the avs so I can encode it with the TFM(D2V="Video.d2v").TDecimate() script.
    Megui doesn't accept the TFM code and when I try to tell it the video is mixed film and video and saves the avs, loads it and try to encode it, I get errors. Also, I can't resize the video in Megui unless it's to make the video smaller. So I have to encode it without resize.
    Last edited by ericf; 28th Aug 2021 at 19:42.
    Quote Quote  
  4. For the 1st case chroma issue, use animeivtc's chrfix=true . There are more settings to tweak, more problems to address but that's the setting that handles the misaligned chroma like this typical for many bad anime DVD's

    http://avisynth.nl/index.php/AnimeIVTC
    Quote Quote  
  5. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    The chrfix=true fixes some of the chroma problems but I still get the foreshadowing on the colored band around his shoulder and hip in the clip (the color appears a couple of frames before the band moves to the same place) and some around the baton.
    I've tried Hard Telecine, Field Blended, Hybrid and Double Hard Telecine.
    Except for Hard Telecine, the others causes problems with stairstepping. Lots of jaggies in anything drawn diagonally (clothes, stairs and so on).
    Quote Quote  
  6. Yes, it's not perfect, there are still some bad frames, but some are caught by mode 2.

    You can mix and match frames or take the chroma from mode 2 and combine with mode 1 or normal ivtc on a specific frame - basically add manual overrides. (Mode 2 deinterlaces, so you get lower quality, but by preserving Y plane and taking CbCr from "fixed" frame, you keep the cleaner lines, no stairstepping). You add rainbows on some frames - so you need to selectively derainbow and chroma deniose, but at least it aligns more frames. I don't think you can automate this accurately

    Even then, there are a few frames that clearly have no solve. You can see this by examining Y,Cb,Cr planes separately forward and back a few frames. Unless you photoshop it, or replace with duplicate or interpolated frame (optical flow usually doesn't work well on anime)

    e.g.
    normal ivtc
    Image
    [Attachment 60480 - Click to enlarge]


    animeivtc mode 1 - didn't fix on this frame
    Image
    [Attachment 60483 - Click to enlarge]


    animeivtc mode 2 - chroma aligned better , but lines deinterlaced resulting aliasing (look at the 2nd guy's shirt near the waist, top of the tent)
    Image
    [Attachment 60484 - Click to enlarge]


    mix normal ivtc Y + CbCr animeivtc mode 2
    Image
    [Attachment 60485 - Click to enlarge]
    Last edited by poisondeathray; 28th Aug 2021 at 21:54.
    Quote Quote  
  7. Originally Posted by ericf View Post
    The d2v I get for the whole video, using dgmpgdec2006 and ticking the Honor Pulldown Flags results in a d2v with this header:
    Stream_Type=1
    MPEG_Type=2
    iDCT_Algorithm=6
    YUVRGB_Scale=1
    Luminance_Filter=0,0
    Clipping=0,0,0,0
    Aspect_Ratio=16:9
    Picture_Size=720x480
    Field_Operation=1
    Frame_Rate=23976 (24000/1001)
    Location=0,0,5,58371


    How do I trick Staxrip to show the stream as 29.970 on both sides of the encoding window?
    I have no idea why StaxRip changes it into being an Forced Film D2V. Maybe it reads the film percentage as being greater than 95% and decides those should always be Forced Filmed. But I don't use that program. The author is active here so you might track down the StaxRip thread and ask him. Anyway, you can easily convert that D2V to an "Honor Pulldown Flags" D2V by editing two lines like so:

    Stream_Type=1
    MPEG_Type=2
    iDCT_Algorithm=6
    YUVRGB_Scale=1
    Luminance_Filter=0,0
    Clipping=0,0,0,0
    Aspect_Ratio=16:9
    Picture_Size=720x480
    Field_Operation=0
    Frame_Rate=29970 (30000/1001)

    Location=0,0,5,58371


    Maybe doing that will then get past the framecount not matching error.
    Quote Quote  
  8. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thanks manono. I can do that, but I have to do it from inside Staxrip. If I change the d2v manually, I have to reload it, and Staxrip will correct it again. I have placed a few questions about this in the Staxrip thread.
    Quote Quote  
  9. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thanks for helping out, poisondeathray. How would the script look like for mix normal ivtc Y + CbCr animeivtc mode 2?
    I use Staxrip, so I have to set it to TIVTC and then add the Y + CbCr parameter and then add animeivtc mode 2 (animeivtc(mode=2) right?).
    This is what the TIVTC looks unaltered in Staxrip: TFM().TDecimate(). Where do I add YCbCr? I know I can just add animeivtc(mode=2) underneath that.
    I have looked around for script examples but as usual with Avisynth wikis, those are not shown and I haven't seen any threads with that covered except for this one THREAD and that doesn't show it with the TFM code.
    Thank you.

    EDIT: No, I can't use animeivtc after TFM().TDecimate() in Staxrip because there's some error with the frame rate (it becomes 25 fps).
    Now what do I do...?
    Last edited by ericf; 29th Aug 2021 at 03:39.
    Quote Quote  
  10. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Made some changes to my avs and added links to 32-bit dlls. Opened that avs directly in Megui and managed to encode the video. It does look like the interlaced frames are transformed to progressive, maybe with one extra frame each time? Stepping frame by frame between the final full video and the cut vob does generate some mismatches in number of frames.
    Quote Quote  
  11. Originally Posted by ericf View Post
    Thanks for helping out, poisondeathray. How would the script look like for mix normal ivtc Y + CbCr animeivtc mode 2?
    Think of it as mixing and matching separate versions of the video. Version A might be normal IVTC. Version B might be AnimeIVTC mode 1, Version C might be mode 2, Version D might be IVTC Y + AnimeIVTC mode1 CbCr, Version E might be IVTC Y + AnimeIVTC mode2 CbCr. You might have a few more versions, because some of them ight add chroma noise or rainbows, and you dont' want to denoise or filter all the frames, otherwise you degrade the "good" frames. You want to apply selective filtering

    To mix and match frames, start with the "base" version that gets the most right. You can use Trim and Spline or functions like RemapFrames or ClipClop to mix frames from full different versions
    http://avisynth.nl/index.php/RemapFrames

    Sometimes the frames are offset. For example AnimeIVTC mode2 has and extra frame because of the way it's processed. So to align them you might have to trim or add duplicate frame. It's easier to see if you load different versions in different tabs in avspmod, so you can see which version is right. The number keys swap tabs, and timeline is aligned if the number of frames, dimensions line up

    To pick specific channels, Y,Cb,Cr (We call Cb and Cr, "U" and "V" in avisynth), you can use Extract . To put them back together, you can use CombinePlanes
    http://avisynth.nl/index.php/Extract
    http://avisynth.nl/index.php/CombinePlanes

    e.g. for a "full" (every frame) IVTC Y, + AnimeIVTC U,V, on that sample video it would look like this

    Code:
    # original video
    o=MPEG2Source("VTS_02_1.[0].d2v")
    
    #ivtc version
    ivtc = o.tfm().tdecimate()
    
    #animeivtc mode 1 + chrfix
    a1 = o.animeivtc(mode=1, chrfix=true)
    
    #animeivtc mode 2 + chrfix , requires trim alignment to match other versions
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)
    
    #channel extraction , you can extract more , eg. from a1 , or others
    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV
    
    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=o)
    You might give that a name like VersionD , or whatever you want. I like descriptive names, because it makes it easier to organize and plug into the script later when you use RemapFrames or similar function. If it's just a few frames, I'd just use Trim and Splice (++), but I suspect there's a lot of work in this video and it's difficult to automate what you want to do accurately. It takes human eyes for this task, and it becomes tedious quickly
    Quote Quote  
  12. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Okay. Staxrip doesn't recognize the o in front of every ivtc.
    'I don't know what 'o' means' is what it says.
    I tried to find something like it by searching Google but failed.
    Is this o and a1 and a2 there in the script because of the many different filters?
    Anyway, tried Megui, too, and got 'I don't know what 'o' means.'
    If I'm to use the script as is, what software (free) can I use it in to encode the episode?
    Thank you.

    LoadPlugin("D:\Megui\MeGUI-2913-32\tools\dgindex\DGDecode.dll")
    LoadPlugin("D:\Megui\MeGUI-2913-32\tools\avisynth_plugin\TIVTC.dll")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\5\To Heart 05 VideoFile_temp\To Heart 05 VideoFile.d2v")
    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)
    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV
    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=o)
    Spline64Resize(640, 480)
    Quote Quote  
  13. The script is not finished. You DO NOT want to encode the entire episode like that because it cause more serious problems on other frames. It's only a specific fix for specific frames

    (And sample_clip should be ivtc, not "o", sorry)

    Try this and preview in vdub2. You will notice some good frames are now "bad". You need to mix and match. This is just 1 version of many . You need to select the best frames. For example if ivtc is the "base" version, replace the bad frames with those from other versions

    Not sure why staxrip/megui don't accept it , try using o=last
    Code:
    MPEG2Source("D:\Encodes\To Heart\Vol 2\5\To Heart 05 VideoFile_temp\To Heart 05 VideoFile.d2v")
    o=last
    
    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)
    
    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV
    
    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)
    Quote Quote  
  14. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thanks for trying to help.
    This is getting too far above my grasp so I'll just try the AnimeIVTC(mode=1, omode=1, chrfix=true) to clean up the worst offenders. I'm only doing this for myself, having failed the first time because there was too much stairstepping. I'm not particularly bothered by the chroma bleeding but it's nice to be able to clean some of it up.
    That said, I have to use Hard Telecine in Staxrip since that's what it seems like the source is. There are some interlacing problems on some frames, but not many, using AnimeIVTC.
    Quote Quote  
  15. Originally Posted by ericf View Post
    Thanks manono. I can do that, but I have to do it from inside Staxrip. If I change the d2v manually, I have to reload it, and Staxrip will correct it again.
    Then don't reload it into StaxRip. Is there something proprietary about the AVS's that StaxRip creates? Try loading it into VDub or VDub2 (File->Open Video File). If it's accepted, then it can be used in any encoder that accepts AVS as input, including VDub2.
    Quote Quote  
  16. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thanks again, manono. I managed to open and encode the film using Megui the second time I tried. I just loaded the script and sent it to the queue.

    @poisondeathray: When loading the last script you suggested in Vdub2, I get this message: Avisynth open failure. Script error: There is no function named 'MPEG2Source.'

    Obviously, there is, but why won't the encoders accept the function?
    I didn't add any extra dll-files or anything to Vdub2. I think it's supposed to be almost self sufficient?
    Anyway, if you can load it, what do I have to do on my end to get Vdub2 to accept 'MPEG2Source?'

    I found a program called avsmeter that supposedly can tell me if I have loaded the wrong dll versions in the avisynth folders but it came up clean.
    THREAD
    Last edited by ericf; 30th Aug 2021 at 00:44.
    Quote Quote  
  17. Originally Posted by ericf View Post
    Obviously, there is, but why won't the encoders accept the function?
    One thing: You have to be using the same versions of DGIndex and the DGDecode.dll from the same DGMPGDec package or other source.
    Another thing: MPEG2Source only works in the presence of the DGDecode.dll. I load it explicitly in my scripts but you should at least have it in the Plugins folder.
    Quote Quote  
  18. I'm using Topaz VEAI to upscale and clean it up after the video has been encoded.
    Use awarpsharp2. It will probably get you better results as it's made for animated sources. online, there are a bunch of examples of anime shaprened with it
    Quote Quote  
  19. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by ericf View Post
    Obviously, there is, but why won't the encoders accept the function?
    One thing: You have to be using the same versions of DGIndex and the DGDecode.dll from the same DGMPGDec package or other source.
    Another thing: MPEG2Source only works in the presence of the DGDecode.dll. I load it explicitly in my scripts but you should at least have it in the Plugins folder.
    I copied the DGDecode.dll from my DGMPGDec package (32 and 64) to the plugin folders of VirtualDub2 and I still get the error message.
    Do I have to load the dll to get it to work?
    I tried to load it before the MPEG2Source:
    LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\DGDecode.dll")
    alternately
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\VTS_02_1.[0].d2v")
    o=last

    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)

    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV

    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)

    and got this message:
    Avisynth open failure. There is no function named 'tfm.'
    This is getting funny in a bad way.
    Quote Quote  
  20. "Avisynth open failure. There is no function named 'tfm.' "


    You need tivtc.dll

    https://github.com/pinterf/TIVTC

    I have a feeling you're mixing versions of plugins and avisynth, such as megui portable, and installed version
    Quote Quote  
  21. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Originally Posted by s-mp View Post
    I'm using Topaz VEAI to upscale and clean it up after the video has been encoded.
    Use awarpsharp2. It will probably get you better results as it's made for animated sources. online, there are a bunch of examples of anime shaprened with it
    Thanks for the tip.
    Quote Quote  
  22. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    I have avisynth installed on the system but Megui and Staxrip are stand alone versions.
    This is getting ridiculous.
    I'm using VirtualDub2 64-bit and I've overcome the problem with the tivtc.dll. Now it won't accept animeivtc.avsi saying is *either not designed to run on Windows or it contains an error.'

    This is my script so far:
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \DGDecode.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TIVTC.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \AnimeIVTC.avsi")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\VTS_02_1.[0].d2v")
    o=last

    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)

    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV

    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)

    I warned you that I'm a novice at this.
    Note: The forum software inserts empty spaces in the dll lines that aren't there in the script.
    Quote Quote  
  23. Originally Posted by ericf View Post
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \AnimeIVTC.avsi")


    For .avs and .avsi files you use Import(PATH\"file.avs")

    LoadPlugin() is for .dll's

    If you put .dll or .avsi into plugins directory, most will autoload

    .avs function scripts will not autoload, and you must use Import()
    Quote Quote  
  24. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Okay, I've gotten across a few hurdles by adding plugins to the script but now it's asking what AVSPlusVersionNumber is. I find that on line 231 in the QTGMC.avsi 2294.
    This is my current script:
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \DGDecode.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TIVTC.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\Ani meIVTC.avsi")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \nnedi3.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \tmm2.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\QTG MC.avsi")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\SMD egrain v.3.1.2d.avsi")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\VTS_02_1.[0].d2v")
    o=last

    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)

    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV

    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)

    For each error message I have to add this or that file to the directory. This time I have downloaded the latest SMDegrain v.3.1.2d.avsi. I can't change the info in the QTGMC.avsi to say 312d instead because that won't work. The same error message keeps popping up. It also refers to line 207 in AnimeIVTC.avsi.
    That line:
    \ i.tdeint(1, emask=emask, sharp=tdeintsharp, type=tdeinttype) : NOP()
    I tried adding TDeint.dll to the load lines but that didn't solve it.
    Last edited by ericf; 31st Aug 2021 at 01:11.
    Quote Quote  
  25. Originally Posted by ericf View Post
    Okay, I've gotten across a few hurdles by adding plugins to the script but now it's asking what AVSPlusVersionNumber is.
    You need Zs_RF_Shared.avsi , which has a bunch of helper functions
    http://avisynth.nl/index.php/Zs_RF_Shared
    Quote Quote  
  26. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Sorry. I don't know how many times I will have to post here to get this script to load but the latest problematic one is MSuper. It's apperently part of MVTools but not a dll.

    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \DGDecode.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TIVTC.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\Ani meIVTC.avsi")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \nnedi3.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \tmm2.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\QTG MC2.avsi")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\SMD egrain v.3.1.2d.avsi")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\Zs_ RF_Shared.avsi")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \RemoveGrain64.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TDeint.dll")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\VTS_02_1.[0].d2v")
    o=last

    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)

    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV

    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)

    Maybe it's time to give up?
    I'm not sharp enough to get this to work on my own and I can't find anything on the net using Google where these types of commands are discussed.
    Quote Quote  
  27. I was looking at the blended frames at shot changes after AnimeIVTC. All the ones I saw were a 50:50 mix of the frame before and the frame after. So I thought that one might compare each frame to a 50:50 mix of the frame before and after -- if they were the same you could replace them with a copy of the previous (or next) frame. That worked but it also replaced some frames in still or nearly still shots. In still shots it didn't really matter but in some shots it did (like when just a characters mouth was moving). So I attempted to eliminate those substitutions by comparing the difference between the current frame and the last frame too. If there wasn't also a significant difference between the current frame and the last frame the frame isn't replaced. Here's the script I came up with:

    Code:
    Mpeg2Source("VTS_02_1.[0].d2v", Info=3) 
    AnimeIVTC(mode=2, chrfix=true)
    
    src = last # the source video
    prev = Loop(2,0,0) # the previous frame, used to replace blended frames
    
    blend = Merge(Trim(1,0), Loop(2,0,0)) # a video where every frame is replaced with a 50:50 blend of the previous and next frame
    diff = AbsSubtractY(src, blend) # the absolute value of the source frame minus the intentionally blended frame
    
    # If the current frame is significantly different than the previous frame, AND there's little difference between
    # the current frame and the intentionally blended frame, replace it with the previous frame:
    ConditionalFilter(diff, prev.Subtitle("Substituted"), src, "(YDifferenceFromPrevious(src) > 10) && (AverageLuma(diff) < 5.0)")
    
    StackHorizontal(src, last)
    return(last)
    
    ##########################################################################
    #
    # Absolute value of v1-v2, luma only
    #
    ##########################################################################
    
    function AbsSubtractY(clip v1, clip v2)
    {
        Subtract(v1.GreyScale(), v2.GreyScale()).ColorYUV(off_y=2)
        Overlay(last.ColorYUV(off_y=-128), last.Invert().ColorYUV(off_y=-127), mode="add")
    }
    
    ##########################################################################
    At frame 751 a blended frame was fixed even though it was not a a shot change.
    Image Attached Files
    Last edited by jagabo; 31st Aug 2021 at 19:50.
    Quote Quote  
  28. Member
    Join Date
    Oct 2005
    Location
    Sweden
    Search Comp PM
    Thank you both. Can you reccomend a software application that has all the filters needed to load these scripts so I don't have to go chasing down each and every one every time I load the script anew? In Staxrip I would have to enter the code in the avs inside the program. Since it doesn't accept mixed versions of IVTC, I can't use it.
    In Vdub2 I have to load all the appropriate dll and avsi files in the script for things to work.
    In jagabo's script I had to ad Yadifmod2 and now it asks me for srestore.
    http://avisynth.nl/index.php/Srestore
    Is this an avsi or a dll: https://pastebin.com/raw/JYBjMBvx
    I added masktools2.dll but it still asks for Srestore.

    In poisondeathray's script, currently this:

    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \DGDecode.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TIVTC.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\Ani meIVTC.avsi")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \nnedi3.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \tmm2.dll")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\QTG MC2.avsi")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\SMD egrain v.3.1.2d.avsi")
    Import("D:\Encodes\VirtualDub2_44282\plugins64\Zs_ RF_Shared.avsi")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \RemoveGrain64.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \TDeint.dll")
    LoadPlugin("D:\Encodes\VirtualDub2_44282\plugins64 \mvtools2.dll")
    MPEG2Source("D:\Encodes\To Heart\Vol 2\VTS_02_1.[0].d2v")
    o=last

    ivtc = o.tfm().tdecimate()
    a1 = o.animeivtc(mode=1, chrfix=true)
    a2 = o.animeivtc(mode=2, chrfix=true).trim(1,0)

    sourceY = ivtc.ExtractY
    sourceU = a2.ExtractU
    sourceV = a2.ExtractV

    CombinePlanes(sourceY, sourceU, sourceV, source_planes="YYY", planes="YUV", sample_clip=ivtc)

    I get: Avisynth Open Failure:
    System exception - access violation
    AnimeIVTC line 303
    fmdecim = mode==1 ? chrfix_b ? (palf && Ofrate==2) ? debprep.tdecimate(1,13,25) : (o3025cfr) ? debprep.tdecimate(1,3,6) : debprep.tdecimate(1,3,5) : (palf && Ofrate==2) ? fm.tdecimate(1,1,25) : (o3025cfr) ? fm : (autoAssuf) ?
    *.avs line 16
    a1 = o.animeivtc(mode=1, chrfix=true)

    ?
    Quote Quote  
  29. As was mentioned before, if you put all your AviSynth dll and AVSI files in AviSynth's plugins folder they will load automatically. You won't have to explicitly LoadPlugin() or Import() them within your scripts. Some people prefer to manually load them so they can control exactly which version is used (they may more than one version of some). And that way you know which filters are being used within your scripts. For example I didn't realize my script in post #28 needed SRestore (though it's listed in the Wiki as one of the requirements). And I had to add TMM2 to my plugins when I tried to use PDR's script in post #13. These issues exist because the filters are written by different people around the world with little coordination between them. It's a pain but once you have it set up you don't often have to find and install more filters.

    I have most of the 64 bit plugins in AviSynth+'s plugins64+ folder, the 32 bit plugins in its plugins+ folder. I usually use VirtualDub2 64 bit to preview scripts then x264 CLI or ffmpeg to render them. Sometimes VirtualDub+ 32 bit if an old 32 bit only filter is required.
    Quote Quote  



Similar Threads

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