Posts for BIgGreen

Joined: 8/5/2010
Posts: 1
why not just make it a function?
#the function name is ridiculous but i didnt know what to call it...

Function FlygonScript(clip c, bool "isthishd", bool "handheld", string "picture", \
string "gamename", string "branchname", string "time", string "authors", string "rerecords")
{
isthishd   = default(isthishd, false)
handheld   = default(handheld, false)
picture    = Default(picture,     "")
gamename   = default(gamename,    "")
branchname = default(branchname,  "")
time       = default(time,        "")
authors    = default(authors,     "")
rerecords  = default(rerecords,   "")

a=c.converttorgb24()

subff = 801 

#High Definition 
isthishd ? Eval(""" 
factor = (a.height > 540) ? 1 : \ 
         (a.height > 270) ? 2 : \ 
         (a.height > 180) ? 3 : 4 
b = a.PointResize(a.width * factor, a.height * factor) 

c = handheld ? b : ((b.width < b.height * 4 / 3) ? b.PointResize(b.height * 4 / 3, b.height) : b.PointResize(b.width, b.width * 3 / 4)) 
g = c.PointResize(c.width * 2, c.height * 2) 

multi = (factor * 2) 

#Standard Definition 
""") : Eval(""" 
g = a.PointResize(a.width * 1, a.height * 1) 
multi = 1 
""") 

handheld ? Eval(""" 
d = ImageSource(file=Picture, start=0, end=119, fps=a.FrameRate).ConvertToRGB24() 
""") : Eval(""" 
d = ImageSource(file=picture, start=0, end=119, fps=a.FrameRate).ConvertToRGB24() 
""") 
e = BlankClip(d, audio_rate=a.AudioRate, channels=a.AudioChannels) 
f = AudioDub(d, e).Lanczos4Resize(g.width, g.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator) 
last = f + g 
#mister epics sub idea
Subtitle(gamename + "\n" + branchname + "\nPlayed by: " + authors + "\nPlaying time: " + time + "\nRerecord count: " + rerecords, \
y=(8 * multi), align=7, first_frame=subff, last_frame=(subff + 300), size=(13.0 * multi), text_color=$15FFFFFF, halo_color=$00000000, lsp=1) 
Subtitle("This is a tool\nassisted recording.\nFor details, visit\nhttp://TASVideos.org/", \
y=(8 * multi), align=7, first_frame=(subff + 301), last_frame=(subff + 601), size=(15.0 * multi), text_color=$15FFFFFF, halo_color=$00000000, lsp=1) 

isthishd ? Eval(""" 
ChangeFPS(30) 
""") : Eval(""" 
""") 

ConvertToYV24(matrix="PC.601", chromaresample="point") 
isthishd ? Eval(""" 
ConvertToYV12(matrix="PC.601", chromaresample="point") 
""") : Eval(""" 
ConvertToYV12(matrix="PC.601", chromaresample="lanczos4") 
""") 
return last
}
Save that as an avsi and put it in your avisynth plugin folder. then use it like this:
FlygonScript(false, false, "picture.png", "Game Name", "Branch Name", "time", "Player", "Rerecords")
Example video kinda Link to video