Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #The SD and HD encoding script
- #Modifed by mmarks
- #I added parts of Mister Epic scripts and others than are mine
- function Logo (clip orig, string image, int start, int length, int "fadein", int "fadeout", int "trans", int "x", int "y", int "threshold" )
- {
- trans = Default(trans, 0)
- fadein = Default(fadein, 0)
- fadeout = Default(fadeout, 0)
- x = Default(x, 0)
- y = Default(y, 0)
- threshold = Default(threshold, 0)
- framerate = orig.framerate()
- overlay = ImageReader(image, 0, length-1, framerate, false)
- mask= overlay.ConvertToRGB32().ColorKeyMask(trans, threshold).ShowAlpha().FadeIO(fadein,fadeout)
- numframes = overlay.framecount()
- origclip = orig.Trim(start, start+length-1)
- newclip = Overlay(origclip,overlay,x=x, y=y, mask=mask)
- return orig.Trim(0, start - 1) + newclip + orig.Trim(start + numframes, 0)
- }
- a = AVISource("movie.avi").ConvertToRGB24()
- #This sets the start time for the subtitles to start displaying, this is set as a frame number
- subff = 905
- #Set this to false for SD encodes, set this to true for HD encodes
- isthishd = true
- #Set this to true if this is a handheld console to disable aspect correction
- #This setting has no affect on the aspect of SD encodes, but is still needed to change the logo
- handheld = true
- #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
- """)
- #Logo stuffs
- #Note that if this is a handheld console, you will need to change the .png filename to the corrosponding consoles
- #logo image, this is so that you don't end up with a distorted logo
- handheld ? Eval("""
- d = ImageSource(file="logoHD.png", start=0, end=119, fps=a.FrameRate).ConvertToRGB24()
- """) : Eval("""
- d = ImageSource(file="logoHD.png", start=0, end=119, fps=a.FrameRate).ConvertToRGB24()
- """)
- logoaudio = WAVSource("logoaudio.wav")
- muxedlogo = AudioDub(d, logoaudio).Lanczos4Resize(g.width, g.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator)
- 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
- LoadPlugin("SubtitleEx.dll")
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -3, y = -15, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -4, y = -16, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -5, y = -17, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -6, y = -18, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -7, y = -19, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("Robocop Interactive Game|Played by AKheon|Playing time: 11:04.78|Rerecord count: 9701", x = -8, y = -20, firstframe = 830, lastframe = 1100, size = 95, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -3, y = -30, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -4, y = -31, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -5, y = -32, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -6, y = -33, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -7, y = -34, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- SubtitleEx("This is a tool-assisted recording.|For details, see http://TASVideos.org/", x = -8, y = -35, firstframe = 1101, lastframe = 1330, size = 85, effects = "f(50,50)", textcolor = $00FFFFFF, halocolor = $80000000)
- #This activates the frame dropper for HD encodes, set to either 30fps or 25fps
- #This depends on if the game simulates transperancy with alternating frame flicker
- #The frame dropper saves filesize without image loss, because YouTube caps at 30fps
- isthishd ? Eval("""
- ChangeFPS(30)
- """) : Eval("""
- """)
- #SD encodes need a resizing filter for the colourspace reduction
- #HD encodes need to be point resized to keep the colour information faithful
- ConvertToYV24(matrix="PC.601", chromaresample="point")
- isthishd ? Eval("""
- ConvertToYV12(matrix="PC.601", chromaresample="point")
- """) : Eval("""
- ConvertToYV12(matrix="PC.601", chromaresample="lanczos4")
- """)
- return last
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement