Advertisement
Guest User

AVS Skript

a guest
Oct 4th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. ### SagaraS Scriptmaker - Version 5.6 ###
  2.  
  3. ### Lade Plugins und setze die globalen Variablen ###
  4. Global breite = 2048
  5. Global hoehe = 1152
  6. Global AR = 0
  7.  
  8. ### Lade Videoquellen ###
  9. SetMTMode(3)
  10. AVIload("E:\Premiere-Dateien\portal 2 coop\portal.avi", 0, 0, 0, -0, -0, "Auto", "Auto", 0, 0)
  11.  
  12. ### Filter Verarbeitungszone ###
  13. SetMTMode(2)
  14. last.Trim(0, 60852)
  15.  
  16. ### Funktion für Video-Laderoutine ###
  17. Function AVIload (String file, int loading, int cl, int co, int cr, int cu, string pixtype, string afps, int fpsn, int fpsd) {
  18. (loading == 1) ? FFIndex(file) : nop()
  19. clip0 = (loading == 3) ? LWLibavVideoSource(file) : (loading == 2) ? Import(file).KillAudio() : (loading == 1) ? FFVideoSource(file, threads=1) : (pixtype == "Auto") ? AVISource(file, false).KillAudio() : AVISource(file, false, pixel_type=pixtype).KillAudio()
  20. clip1 = clip0.AutoFPS(afps, fpsn, fpsd).Cropping(cl, co, cr, cu)
  21. Return (clip1.width == breite && clip1.height == hoehe) ? clip1.ConvertToYV12(matrix = "Rec709", ChromaResample = "Spline36") : Clip1.Resize()
  22. }
  23.  
  24. Function AutoFPS (Clip clip0, string afps, int fpsn, int fpsd) {
  25. rate1 = (afps == "Auto") ? (Round(Float(clip0.framerate * 1000)) / 1000) / 2 : nop()
  26. rate2 = (afps == "Auto") ? Round(clip0.framerate) / 2 : nop()
  27. rate = (afps == "Auto") ? (rate1 == rate2) ? 1 : 1001 : (afps == "Igno.") ? clip0.frameratedenominator : fpsd
  28. ratefaktor = (afps == "Auto") ? (rate == 1001) ? 1000 : 1 : nop()
  29. clip0 = (afps == "Auto") ? (rate == 1001) ? clip0.AssumeFPS(Round(clip0.Framerate) * 1000, rate) : clip0.AssumeFPS(round(clip0.framerate), rate) : (afps == "Igno.") ? clip0.AssumeFPS(clip0.frameratenumerator, rate) : clip0.AssumeFPS(fpsn, rate)
  30. Return clip0
  31. }
  32.  
  33. Function Cropping (Clip clip0, int cl, int co, int cr, int cu) {
  34. clip0 = (clip0.IsRGB32() == True) ? clip0.ConvertToRGB24() : clip0
  35. Return (cl != 0 || co != 0 || cr != 0 || cu != 0) ? clip0.Crop(cl, co, cr, cu) : clip0
  36. }
  37.  
  38. Function Resize (Clip clip1) {
  39. 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(matrix = "Rec709") : clip1.ConvertToRGB24(matrix = "Rec709") : clip1
  40. clip1 = (AR == 1) ? (((clip1.width * hoehe) / clip1.height > breite) ? Clip1.Spline36Resize(breite, ceil(float(Clip1.height * breite) / clip1.width)) : Clip1.Spline36Resize(ceil(float(clip1.width * hoehe) / clip1.height), hoehe)) : clip1.Spline36Resize(breite, hoehe).ConvertToYV12(matrix = "Rec709", ChromaResample = "Spline36")
  41. back = (AR == 1) ? (0 == 1) ? ImageReader("", 0, clip1.framecount - 1, clip1.framerate).ChangeFPS(clip1.frameratenumerator, clip1.frameratedenominator).Spline36Resize(breite, hoehe).ConvertToYV12(matrix = "Rec709", ChromaResample = "Spline36") : BlankClip(clip1, width = breite, height = hoehe, pixel_type = "YV12").KillAudio() : clip1
  42. Return (AR == 1) ? Overlay(back, clip1, (back.width - clip1.width) / 2, (back.height - clip1.height) / 2) : clip1
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement