Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. ### Lade Plugins und setze die globalen Variablen ###
  2. LoadPlugin("C:\Program Files (x86)\SagaraS Scriptmaker\Plugins\SplineResize.dll")
  3. Global breite = 2560
  4. Global hoehe = 1440
  5. Global AR = 0
  6.  
  7. ### Lade Videoquellen ###
  8. AVIload("E:\062.avi", 0, 0, 0, -0, -0)
  9.  
  10. ### Filter Verarbeitungszone ###
  11. video = Last
  12. watermark = ImageReader("E:\Let's Plays\Wasserzeichen.png", 0, 0, Last.framerate, pixel_type="RGB32")
  13. watermask = watermark.ShowAlpha(pixel_type = "RGB32")
  14. Overlay(video, watermark, video.width - watermark.width - 20, 0 + 20, watermask, 0.5)
  15.  
  16. ### Funktion für Video-Laderoutine ###
  17. Function AVIload (String file, int loading, int cl, int co, int cr, int cu) {
  18. (loading == 1) ? FFIndex(file) : nop()
  19. clip0 = (loading == 3) ? LWLibavVideoSource(file) : (loading == 2) ? Import(file).KillAudio() : (loading == 1) ? FFVideoSource(file, threads=1) : AVISource(file, false)
  20. rate1 = (Round(Float(clip0.framerate * 1000)) / 1000) / 2
  21. rate2 = Round(clip0.framerate) / 2
  22. rate = (rate1 == rate2) ? 1 : 1001
  23. ratefaktor = (rate == 1001) ? 1000 : 1
  24. clip1 = (rate == 1001) ? clip0.AssumeFPS(Round(clip0.Framerate) * 1000, rate) : clip0.AssumeFPS(round(clip0.framerate), rate)
  25. clip1 = clip1.Crop(cl, co, cr, cu)
  26. clip1 = (clip1.width == breite && clip1.height == hoehe) ? clip1 : (AR == 1) ? ((float(Clip1.height * breite) / clip1.width) / 2 == round((float(Clip1.height * breite) / clip1.width) / 2)) ? ((float(Clip1.width * hoehe) / clip1.height) / 2 == round((float(Clip1.width * hoehe) / clip1.height) / 2)) ? clip1 : clip1.ConvertToRGB24() : clip1.ConvertToRGB24() : clip1
  27. clip1 = (clip1.width == breite && clip1.height == hoehe) ? clip1 : (AR == 1) ? (((clip1.width * hoehe) / clip1.height > breite) ? Clip1.Spline100Resize(breite, ceil(float(Clip1.height * breite) / clip1.width)) : Clip1.Spline100Resize(ceil(float(clip1.width * hoehe) / clip1.height), hoehe)) : clip1.Spline100Resize(breite, hoehe).ConvertToYV12(matrix = "Rec601")
  28. back = (clip1.width == breite && clip1.height == hoehe) ? clip1 : (AR == 1) ? (0 == 1) ? ImageReader("", 0, clip1.framecount, clip1.framerate).ChangeFPS(round(clip1.framerate) * ratefaktor, rate).Spline100Resize(breite, hoehe).ConvertToYV12(matrix = "Rec601") : BlankClip(clip1.framecount, breite, hoehe, "YV12", round(Clip1.framerate) * ratefaktor, rate).KillAudio() : clip1
  29. Return (clip1.width == breite && clip1.height == hoehe) ? clip1.ConvertToYV12(matrix = "Rec601") : (AR == 1) ? Overlay(back, clip1, (back.width - clip1.width) / 2, (back.height - clip1.height) / 2) : clip1
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement