VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. I'm not sure of the terminology I'm looking for here. In short, in the example below, instead of .qtgmc() on the second line I want to use the last 4 lines of the code. The q,d, conditionalfilter, and srestore. How would I write that so I can append it in the same way qtgmc() is on line 2. I hope that makes sense.

    HTML Code:
    part1=Trim(170,5370)
    part2=Trim(5370,0).qtgmc()
    
    part1+part2
    
    
    
    q = assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC") # for debugging purposes, remove subtitle for production
    d = ChangeFPS(48)
    ConditionalFilter(d, q, d, "IsCombedTIVTC(cthresh=4)")
    srestore(frate=24)
    Quote Quote  
  2. Code:
    ConditionalFilter(ChangeFPS(48), assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    Quote Quote  
  3. Originally Posted by jagabo View Post
    Code:
    ConditionalFilter(ChangeFPS(48), assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    Jagabo, I've been trying to crack this all evening. The video I'm trying to encode is made of footage, each with their own issues. The middle footage needs to be combed. I'm trying to use your one line method above but am getting error I'm having trouble debugging. Do you have any other suggestions I can try? I feel like I'm missing a simple concept with the syntax. Below is where I currently am.

    Code:
    part1=Trim(174,13450)
    part2=Trim(13451,125230).ConditionalFilter(ChangeFPS(48), assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    part3=Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    
    part1+part2+part3
    Last edited by LaserBones; 13th Aug 2024 at 23:56.
    Quote Quote  
  4. It's just simple algebraic substitution:
    Code:
    Trim(174,13450)+Trim(13451,125230).ConditionalFilter(ChangeFPS(48), assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)+Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    Quote Quote  
  5. Originally Posted by jagabo View Post
    It's just simple algebraic substitution:
    Code:
    Trim(174,13450)+Trim(13451,125230).ConditionalFilter(ChangeFPS(48), assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)+Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    Thanks Jagabo. I should have been more clear. What I was saying is that the conditional filter doesn't work as a single line. I'm getting this error.

    Script error: Invalid arguments to function 'ConditionalFilter'.

    It works fine when I set it up as a multiline script but trying to include it in a single line, as it is in part 2, is causing an error that I'm having a hard time troubleshooting.
    Quote Quote  
  6. By proceeding ConditionalFilter with Trim, it'd be taking that clip as the first video, but then you've given it three more, so you'd need to do....

    Code:
    part1 = Trim(174,13450)
    part2 = ConditionalFilter(Trim(13451,125230).ChangeFPS(48), Trim(13451,125230).AssumeTFF().QTGMC().Subtitle("QTGMC"), Trim(13451,125230).ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    part3 = Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    part1 + part2 + part3
    
    or
    
    part1 = Trim(174,13450)
    part2 = Trim(13451,125230).ChangeFPS(48).ConditionalFilter(Trim(13451,125230).AssumeTFF().QTGMC().Subtitle("QTGMC"), Trim(13451,125230).ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    part3 = Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    part1 + part2 + part3
    but rather than a single line:

    Code:
    part1 = Trim(174,13450)
    part2 = Trim(13451,125230)
    part2 = ConditionalFilter(part2.ChangeFPS(48), part2.AssumeTFF().QTGMC().Subtitle("QTGMC"), part2.ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    part3 = Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    part1 + part2 + part3
    
    or
    
    part1 = Trim(174,13450)
    part2 = Trim(13451,125230)
    part2 = part2.ChangeFPS(48).ConditionalFilter(part2.AssumeTFF().QTGMC().Subtitle("QTGMC"), part2.ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    part3 = Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    part1 + part2 + part3
    Although rather than create long lines that are hard to follow....
    I tend to assign the "last" value to a variable so I don't confuse myself, but that's optional.

    Code:
    Clip = Last
    
    A = Clip.Trim(174,13450)
    
    B = Clip.Trim(13451,125230)
    C = B.ChangeFPS(48)
    D = B.AssumeTFF().QTGMC().Subtitle("QTGMC")
    E = ConditionalFilter(C, D, C, "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    
    F = Clip.Trim(125231,128128).QTGMC(preset="Medium").SelectEven()
    
    A + E + F
    
    or
    
    A = Last
    
    B = A.ChangeFPS(48)
    C = A.AssumeTFF().QTGMC().Subtitle("QTGMC")
    D = ConditionalFilter(B, C, B, "IsCombedTIVTC(cthresh=4)").srestore(frate=24)
    
    E = A.QTGMC(preset="Medium").SelectEven()
    
    A.Trim(174,13450) + D.Trim(13451,125230) + E.Trim(125231,128128)
    Last edited by hello_hello; 16th Aug 2024 at 12:19.
    Quote Quote  
  7. Originally Posted by LaserBones View Post
    I should have been more clear. What I was saying is that the conditional filter doesn't work as a single line. I'm getting this error.

    Script error: Invalid arguments to function 'ConditionalFilter'.
    Oh, sorry. I think this is what you want:

    Code:
    Trim(174,13450) \
        + ConditionalFilter(Trim(13451,125230).ChangeFPS(48), Trim(13451,125230).assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), Trim(13451,125230).ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24) \
        + Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    That's considered one line by AviSynth. Or literally on one line:
    Code:
    Trim(174,13450) + ConditionalFilter(Trim(13451,125230).ChangeFPS(48), Trim(13451,125230).assumetff().QTGMC(TR0=2, TR1=2, TR2=1, Rep0=1, Rep1=0, Rep2=4, DCT=5, ThSCD1=300, ThSCD2=110, SourceMatch=3, Lossless=2, Sharpness=0.1, Sbb=0, MatchPreset="slow", NoiseProcess=2, GrainRestore=0.0, NoiseRestore=0.4, NoisePreset="slow", StabilizeNoise=false, NoiseTR=0, NoiseDeint="bob").Subtitle("QTGMC"), Trim(13451,125230).ChangeFPS(48), "IsCombedTIVTC(cthresh=4)").srestore(frate=24) + Trim(125231,128128).QTGMC(preset="Medium").selecteven()
    If you are handling audio too, replace each + sign with two plus signs, ++.
    Last edited by jagabo; 16th Aug 2024 at 15:22.
    Quote Quote  
  8. Something else that may help you understand how AviSynth treats video and audio streams: when you don't explicitly reference a stream by name, the name "last" is assumed by AviSynth. So a script like:

    Code:
    AviSource("filename.avi")
    QTGMC()
    is the equivalent of:

    Code:
    last = AviSource("filename.avi")
    last = QTGMC(last)
    return(last)
    And a script like:

    Code:
    AviSource("filename.avi")
    q =  QTGMC()
    return(last)
    returns the original video, not q.
    Quote Quote  



Similar Threads

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