Advertisement
Guest User

DBZ Special TV1 Bluray

a guest
Apr 13th, 2022
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.98 KB | None | 0 0
  1. from vapoursynth import core
  2. import vapoursynth as vs
  3. core = vs.core
  4.  
  5. def change_matrix(clip, mats, matd):
  6.     video = clip
  7.  
  8.     video = core.fmtc.resample(clip = video , css="444")
  9.     video = core.fmtc.matrix(clip = video , mats = mats, matd = matd, bits = 16)
  10.     video = core.fmtc.resample(clip = video , css="420")
  11.     video = core.fmtc.bitdepth(clip = video , bits = 8)
  12.    
  13.     return video
  14.  
  15. #Filenames in root path
  16. pathfile1 = r"Dragon Ball Z - TV Special 1 [1080p] [x264] [GYAO].ts"
  17. pathfile2 = r"00016.m2ts"
  18.  
  19. #Loading file using LSmash
  20. video1 = core.lsmas.LWLibavSource(pathfile1).std.AssumeFPS(fpsnum=30000,fpsden=1000)
  21. video2 = core.lsmas.LWLibavSource(pathfile2).std.AssumeFPS(fpsnum=24000,fpsden=1001)
  22.  
  23. #IVTC/Deinterlace
  24. video1 = core.tivtc.TDecimate(video1,mode=7,rate=23.976,dupThresh=0.9, display=False,maxndl=5)
  25. video1 = core.grain.Add(video1,var=6.9, uvar=0.0, constant=True)
  26.  
  27. #Force fps
  28. video1 = video1.std.AssumeFPS(fpsnum=24000,fpsden=1001)
  29. video2 = video2.std.AssumeFPS(fpsnum=24000,fpsden=1001) #video2[0]*47+  video2[0]*24+
  30.  
  31. #Crooping
  32. video1 = video1.std.Crop(left=240,right=240)
  33. video2 = video2.std.Crop(left=240,right=240)
  34.  
  35. #Metrics adjustment
  36.  #Initial crop for webdl
  37. video1 = video1[360:]
  38.  
  39.  #Eyecatchs
  40. eyecatch1 = video1[17807:18149]
  41. eyecatch2 = video1[33240:33582]
  42. eyecatch3 = video1[49751:50093]
  43.  
  44. video2 = video2[0:17807] + eyecatch1 + video2[17807] + video2[17807:]
  45. video2 = video2[0:33095] + video2[33095-5:33095] + video1[33100:33240] + eyecatch2 + video2[33095:]
  46. video2 = video2[0:49751] + eyecatch3 + video2[49752:]
  47. video2 = video2[0:69069]
  48.  
  49. resto = video2[68879:]
  50.  
  51. #change matrix
  52. resto = change_matrix(clip=resto, mats="709", matd="601")
  53.  
  54. video2 = video2[0:68879] + resto
  55.  
  56. subtitles = False
  57.  
  58. if subtitles:
  59.     video1= core.sub.Subtitle(video1,"WEBDL")
  60.     video2= core.sub.Subtitle(video2,"BD")
  61.  
  62. stack = False
  63.  
  64. if stack:
  65.     video = core.std.StackHorizontal([video1, video2])
  66.  
  67.     video.set_output()
  68.    
  69.     exit()
  70.  
  71. video2.set_output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement