# AVSLib :: sample script # Copyright (c) 2007 George Zarkadas (gzarkadas@users.sourceforge.net) # This program is free software; you can redistribute it and/or modify it under the terms of # the GNU General Public License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # You should have received a copy of the GNU General Public License along with this program; # if not, write to the "Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA" LoadModule("avslib", "filters", "utility") # load a clip (640x480) clp = AVISource("script.avi") # create a CR/LF delimited array of Subtitle parameters (ie a multiline string) # text, x, y, first_frame, last_frame, font, size, text_color, halo_color, align # sub_ttl = \ """ "Smiths Productions", 320, 100, 8, 240, "verdana", 28, color_antiquewhite, color_gray30, 2 "prowdly presents", 320, 140, 32, 240, "verdana", 24, color_antiquewhite, color_gray30, 2 "A John Smith Film", 320, 200, 90, 240, "verdana", 28, color_lavenderblush, color_gray30, 2 "The Family Grows", 320, 280, 150, 240, "verdana", 42, color_lightsalmon, color_gray30, 2 "Episode III", 320, 330, 174, 240, "verdana", 36, color_antiquewhite, color_gray30, 2 "Junior walks!", 320, 400, 198, 240, "verdana", 38, color_lavenderblush, color_gray30, 2""" sub_tms = "1,1,1,1,1,1" ttbase = clp.BlankClip(length=240, color=color_gray10) titles = ttbase.FilterVarChain("SubTitle", sub_tms, sub_ttl) return Dissolve(titles.Blur(0.5), ttbase.Trim(0, 20), 10) + clp