VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 33 of 33
  1. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by carlmart
    How do you get the blankclip to be at the beginning?
    last ++d1

    And at that time "last" is the blank clip.

    Originally Posted by carlmart
    And you don't need to name variables if you can use "last".
    The use of these variables is not that clear to me yet, and I can't seem to grab the reasoning behind them. Where can I get more info about that?
    Step through some scripts line by line.

    AvsP is good for that.
    Comment out the whole thing and uncomment line by line.


    Originally Posted by carlmart
    OK. Will do that. Hopefully there's a way to change the fonts too
    See the link.


    You can do things like this:
    Subtitle("The Break-In", y=100, align=5, size=40, font="lucida fax",first_frame=0, last_frame=256,text_color =$00e8e763, interlaced=true)
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by carlmart
    The use of these variables is not that clear to me yet, and I can't seem to grab the reasoning behind them. Where can I get more info about that?
    I'm not sure if you are confused about variables in general, or just the use of 'last'. Anyway, I hope this helps...

    Variables allow you to save the result of an operation in one part of a script so that you can use it in another (later) part. An example from your script is
    Code:
    v=FFMpegSource2("d:\tmp\file.mkv")
    a=Nicac3Source("d:\tmp\file.ac3")
    audiodub(v,a)
    Here the variable 'v' is set to the result of FFMpegSource2 (the video clip) and 'a' is set to the audio clip. You then use these values to mux them together in AudioDub(v, a).

    A variable name can be anything you like, as long as it contains only letters, numbers and underscore characters, and does not start with a number. See http://avisynth.org/mediawiki/Script_variables.

    As well as the variables that you explicitly set in your script (like v and a above), Avisynth implicitly uses a variable called last in a special way. If the result of a statement is a clip and it is not saved by you in a variable, Avisynth automatically saves it in last. In addition, if a function has a clip as its first argument (which most filters do), last is used as a default value for that clip.

    So a sequence like
    Code:
    AviSource("vid.avi")
    FadeIn(30)
    is actually a 'shorthand' for
    Code:
    last = AviSource("vid.avi")
    last = FadeIn(last, 30)
    (That is what makes it possible to create filter chains, where the result of each filter is used as the input to the next one.)

    Note how the value of last changes from one line to the next. At each point in the script, it represents the result of the last operation performed (hence its name).
    Quote Quote  
  3. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Poison, AlanHK and Gavino,

    Thank you for your patience. Now I think I've climbed one more step.
    Quote Quote  



Similar Threads

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