Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Specify The Input File
- File = "dump_5k"
- Proxy = "dump_5k_proxy_240p"
- # Variables
- UseProxy = True
- FullscreenCapture = True
- GameFPS = 30
- Pass = 0
- # Load the source
- UseProxy && (Pass > 4) ? AVISource(Proxy + ".avi") : AVISource(File + ".avi")
- # Pad the clip to ensure no frames are misaligned
- Last.Blankclip(Length=Int(Last.FrameRate * 4)) ++ Last ++ Last.Blankclip(Length=Int(Last.FrameRate * 4))
- # Ensure the clip's FrameCount is divisible down to the game FPS
- Rounding = Int(Last.FrameRate / GameFPS)
- FrameCount = Last.FrameCount
- While (FrameCount % Rounding > 0) {
- FrameCount = FrameCount - 1
- }
- Trim(0, FrameCount)
- # Perform FixFPS incrementally
- (Pass == 1) ? ExactDedup(FirstPass=True, DupInfo=File + "-info480.txt", Times=File + "-times480.txt", MaxDupCount=FrameCount) : (Pass > 1) ? ExactDedup(FirstPass=False, DupInfo=File + "-info480.txt") : Last
- (Pass > 1) ? FixFPS(Times=File + "-times480.txt", Frames=FrameCount/2, Div=2, Mul=1).Trim(0, -FrameCount/2) : Last
- (Pass == 2) ? ExactDedup(FirstPass=True, DupInfo=File + "-info240.txt", Times=File + "-times240.txt", MaxDupCount=FrameCount) : (Pass > 2) ? ExactDedup(FirstPass=False, DupInfo=File + "-info240.txt") : Last
- (Pass > 2) ? FixFPS(Times=File + "-times240.txt", Frames=FrameCount/4, Div=2, Mul=1).Trim(0, -FrameCount/4) : Last
- (Pass == 3) ? ExactDedup(FirstPass=True, DupInfo=File + "-info120.txt", Times=File + "-times120.txt", MaxDupCount=FrameCount) : (Pass > 3) ? ExactDedup(FirstPass=False, DupInfo=File + "-info120.txt") : Last
- (Pass > 3) ? FixFPS(Times=File + "-times120.txt", Frames=FrameCount/8, Div=2, Mul=1).Trim(0, -FrameCount/8) : Last
- (Pass == 4) ? ExactDedup(FirstPass=True, DupInfo=File + "-info60.txt", Times=File + "-times60.txt", MaxDupCount=FrameCount) : (Pass > 4) ? ExactDedup(FirstPass=False, DupInfo=File + "-info60.txt") : Last
- (Pass == 5) ? FixFPS(Times=File + "-times60.txt", Frames=FrameCount/8, Div=Int(60 / GameFPS), Mul=Int(60 / GameFPS)).Trim(0, -FrameCount/8) : Last
- # Crop the clip
- (Pass == 5) ? FullscreenCapture ? Crop(((Last.Width - (Last.Height * 4 / 3)) / 2), 0, -((Last.Width - (Last.Height * 4 / 3)) / 2), 0) : Crop(0, 0, 0, -24) : Last
- # Fix the audio delay and resample
- (Pass == 0) || (Pass == 5) ? DelayAudio(-0.192).ResampleAudio(48000) : Last
- # Trim the clip (specify these values on the 5th pass)
- (Pass == 5) ? Trim(0, 0) : Last
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement