VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hello
    I thought it would be very useful if there is "if" option in the coding..
    "if" is the thing that make things more smarter and a big reason why programs working..


    Without it there is no way to write a smart code.. only an idiot code that does not think.

    i want to do this:

    If $Time > 00:45:00 And $Time < 01:00:00 OR $Time > 01:23:16 And $Time < 02:15:00 Then
    {Some AviSynth Code ....
    ...............
    ...............
    ...............
    End code}
    EndIf


    this will be very useful because that way i can write a big script for big cupture (like 3 hours) that have a lot of parts that need other Repairs.
    i that way i don't need to split the video to many parts..
    and the script wil not run Unnecessary repairs in times that dasent need those repairs.
    so the process will be more faster when the script "decides" to disable some heavy algorithms..

    it will very good thing!

    can i do it now or still no one Developed this ability in AviSynth?
    Quote Quote  
  2. It depends on what parameters. You might be able to with conditional filtering , script clip , block statements

    http://avisynth.org/mediawiki/ScriptClip
    http://avisynth.org/mediawiki/Block_statements
    Quote Quote  
  3. sory but i understood nothing..

    i want for example to run the MergeChroma() only between certain times.
    how it can be done?
    Quote Quote  
  4. Originally Posted by gil900 View Post
    sory but i understood nothing..

    i want for example to run the MergeChroma() only between certain times.
    how it can be done?
    Are you asking how to apply filters to segments ? Use search it has been discussed many times, there are several different ways you can approach it

    e.g
    Divide up using Trim() , apply filter to section, Aligned Splice to join

    or you can use other filters like ApplyRange() , ReplaceFrameSimple(), RemapFrames()

    This is not a conditional (if... then), these are known frame ranges or times
    Quote Quote  
  5. thanks!
    i think i understand how to use the ApplyRange()
    Quote Quote  
  6. why it is not working:
    ApplyRange(1031,1849,"McTemporalDenoise",settings= "high",interlaced=true)

    the error:
    ApplyRange does not have a named arguments "settings"
    Quote Quote  
  7. Avisynth know the question operator (http://avisynth.org/mediawiki/Operators) which basically is a 'if ... then ..'
    Quote Quote  
  8. Originally Posted by gil900 View Post
    why it is not working:
    ApplyRange(1031,1849,"McTemporalDenoise",settings= "high",interlaced=true)

    the error:
    ApplyRange does not have a named arguments "settings"
    ApplyRange is very difficult to use for some filters - because you need to enter a value for every variable of MCTD, even if it's default or zero. So for MCTD , you would need 30 entries or so LOL. I would use one of the other techniques, use search they are described in more detail elsewhere many times

    In this example, I added filter1, filter2,3,4 just for demonstration

    Code:
    orig=AVISource()
    
    orig
    Trim(0,1030)
    #filter1
    #filter2
    a=last
    
    orig
    Trim(1031,1849)
    MCTemporalDenoise(settings= "high",interlaced=true)
    b=last
    
    orig
    Trim(1850,0)
    #filter3
    #filter4
    c=last
    
    a++b++c
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    there is also GScript - http://forum.doom9.org/showthread.php?t=147846 though the developer seems to have retired. d/l link in 1st post. install in your plugins folder.

    is a plugin that extends the Avisynth scripting language to provide additional control-flow constructs:
    multi-line conditionals (if-then-else blocks), 'while' loops and 'for' loops.
    Quote Quote  
  10. Originally Posted by vhelp View Post
    there is also GScript - http://forum.doom9.org/showthread.php?t=147846 though the developer seems to have retired. d/l link in 1st post. install in your plugins folder.

    is a plugin that extends the Avisynth scripting language to provide additional control-flow constructs:
    multi-line conditionals (if-then-else blocks), 'while' loops and 'for' loops.
    This is exactly what I was looking for!

    the if, for, while are importent part for making a smart algorithms


    I'll take a look at it later ..

    Meanwhile I want to know how can i get the time/frame variable and then for the test i planing to test the variable by Subtitle(the frame/time variable, align=5)

    i tried to know it alone and i have searched on google but i didn't sow a way to get the variable
    Last edited by gil900; 18th Feb 2013 at 15:30.
    Quote Quote  



Similar Threads

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