Post subject: Encoding problem with custom script
admiralpete
He/Him
Joined: 11/22/2013
Posts: 14
Location: Southwestern PA
I didn't know whether to make a new topic or post this on the submission I got the script from. I've been trying to find the best way to encode Mega Man X games, and while Googling information on TASBlend, I came across a small script from the link at the bottom of the post. The problem is, I keep getting an error from AVISynth (I don't know what "c" means). I've included my script, and was wondering if someone would know what I am doing wrong. A solution is much appreciated!
AVISource("Mega Man X.avi")
  function Blend(clip c, float oa)  {
  Interleave(
  \ Layer(SelectEvery(c, 8, 0), SelectEvery(c, 8, 1), level=int(round(oa * 257))),
  \ Layer(SelectEvery(c, 8, 2), SelectEvery(c, 8, 3), level=int(round((1.0 - oa) * 257))),
  \ Layer(SelectEvery(c, 8, 4), SelectEvery(c, 8, 5), level=int(round((1.0 - oa) * 257))),
  \ Layer(SelectEvery(c, 8, 6), SelectEvery(c, 8, 7), level=int(round(oa * 257))))
  }
  Blend(c,2.0/3)
http://tasvideos.org/3620S.html
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Don't mix the main program with the function declarations. c is only defined inside the function.
Language: Avisynth

AVISource("Mega Man X.avi") Blend(2.0 / 3) function Blend(clip c, float oa) { Interleave( Layer(SelectEvery(c, 8, 0), SelectEvery(c, 8, 1), level=int(round(( oa) * 257))), \ Layer(SelectEvery(c, 8, 2), SelectEvery(c, 8, 3), level=int(round((1.0 - oa) * 257))), \ Layer(SelectEvery(c, 8, 4), SelectEvery(c, 8, 5), level=int(round((1.0 - oa) * 257))), \ Layer(SelectEvery(c, 8, 6), SelectEvery(c, 8, 7), level=int(round(( oa) * 257)))) }
admiralpete
He/Him
Joined: 11/22/2013
Posts: 14
Location: Southwestern PA
Thanks for the help!