Masterjun

movie000comb03.avs

Sep 15th, 2021 (edited)
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. length = 98403
  2. mfull = (AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\april2021_dump.avi")+AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\april2021_dump_1.avi")).Trim(0,length-1)
  3. mfullnm = (AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\april2021_dump_nomusic.avi")+AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\april2021_dump_nomusic_1.avi")).Trim(0,length-1)
  4.  
  5. #fps 21477272/357368
  6.  
  7. #mfull = mfull
  8. #mfullnm = mfullnm
  9.  
  10. m00 = mfull
  11. m01 = (BlankClip(mfull,8590*1)+mfull).Trim(0,-8590*1-86393).FadeOut(28)
  12. m02 = (BlankClip(mfull,8590*2)+mfull).Trim(0,-8590*2-77650)+mfullnm.Trim(77650,77960)
  13. m03 = (BlankClip(mfull,8590*3)+mfull).Trim(0,-8590*3-68990)+mfullnm.Trim(68990,69210)
  14. m04 = (BlankClip(mfull,8590*4)+mfull).Trim(0,-8590*4-60640)+mfullnm.Trim(60640,60880)
  15. m05 = (BlankClip(mfull,8590*5)+mfull).Trim(0,-8590*5-51850)+mfullnm.Trim(51850,52080)
  16. m06 = (BlankClip(mfull,8590*6)+mfull).Trim(0,-8590*6-43240)+mfullnm.Trim(43240,43490)
  17. m07 = (BlankClip(mfull,8590*7)+mfull).Trim(0,-8590*7-34560)+mfullnm.Trim(34560,34980)
  18. m08 = (BlankClip(mfull,8590*8)+mfull).Trim(0,-8590*8-26070)+mfullnm.Trim(26070,26290)
  19. m09 = (BlankClip(mfull,8590*9)+mfull).Trim(0,-8590*9-17435)+mfullnm.Trim(17435,17710)
  20. m10 = (BlankClip(mfull,8590*10)+mfull).Trim(0,-8590*10-8910)+mfullnm.Trim(8910,9130)
  21. m01 = m01+BlankClip(m01,length=length-m01.FrameCount)
  22. m02 = m02+BlankClip(m02,length=length-m02.FrameCount)
  23. m03 = m03+BlankClip(m03,length=length-m03.FrameCount)
  24. m04 = m04+BlankClip(m04,length=length-m04.FrameCount)
  25. m05 = m05+BlankClip(m05,length=length-m05.FrameCount)
  26. m06 = m06+BlankClip(m06,length=length-m06.FrameCount)
  27. m07 = m07+BlankClip(m07,length=length-m07.FrameCount)
  28. m08 = m08+BlankClip(m08,length=length-m08.FrameCount)
  29. m09 = m09+BlankClip(m09,length=length-m09.FrameCount)
  30. m10 = m10+BlankClip(m10,length=length-m10.FrameCount)
  31. #m00nm = mfullnm
  32. #m01nm = (BlankClip(mfullnm,8590*1)+mfullnm).Trim(0,-8590*1-86393-29)
  33. #m02nm = (BlankClip(mfullnm,8590*2)+mfullnm).Trim(0,-8590*2-77960)
  34. #m03nm = (BlankClip(mfullnm,8590*3)+mfullnm).Trim(0,-8590*3-69210)
  35. #m04nm = (BlankClip(mfullnm,8590*4)+mfullnm).Trim(0,-8590*4-60880)
  36. #m05nm = (BlankClip(mfullnm,8590*5)+mfullnm).Trim(0,-8590*5-52080)
  37. #m06nm = (BlankClip(mfullnm,8590*6)+mfullnm).Trim(0,-8590*6-43490)
  38. #m07nm = (BlankClip(mfullnm,8590*7)+mfullnm).Trim(0,-8590*7-34980)
  39. #m08nm = (BlankClip(mfullnm,8590*8)+mfullnm).Trim(0,-8590*8-26290)
  40. #m09nm = (BlankClip(mfullnm,8590*9)+mfullnm).Trim(0,-8590*9-17710)
  41. #m10nm = (BlankClip(mfullnm,8590*10)+mfullnm).Trim(0,-8590*10-9130)
  42.  
  43. function First(clip img, clip mmap, clip m00, clip m01, clip m02, clip m03, clip m04, clip m05, clip m06, clip m07, clip m08, clip m09, clip m10){
  44.   middle = PointResize(m00,256*3,224*3)
  45.  
  46.   top = StackHorizontal(m01,m02,m03)
  47.   left = StackVertical(m04,m05,m06)
  48.   right = StackVertical(m07,m08,m09)
  49.  
  50.   fullbottom = StackHorizontal(left,middle,right)
  51.   fullv = StackVertical(AddBorders(top,256,0,256,0),fullbottom)
  52.  
  53.   fullv = PointResize(fullv,4480,2688)
  54.  
  55.   #img = AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\pngs\img.avi").ConvertToRGB32()
  56.   #img = img+img+img+img+img+img+img+img+img+img+img
  57.   #img = img.PointResize(900,675).Crop(2,2,896,672)
  58.   fullv = Layer(fullv,img,x=4480-896,y=0)
  59.  
  60.  
  61.   #mmap = AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\mmap.avi").ConvertToRGB32()
  62.   #mmap = mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap
  63.   fullv = StackHorizontal(fullv,mmap)
  64.  
  65.   return fullv
  66. }
  67.  
  68. function Move(clip fullv, clip m, int frm, int xa1, int ya1, int xb1, int yb1, int xa2, int ya2, int xb2, int yb2){
  69.   maxf = 120
  70.   frm = frm<maxf ? frm : maxf
  71.   rt = Float(frm)/maxf
  72.   txa = Int(rt*(xa2-xa1)+xa1)
  73.   tya = Int(rt*(ya2-ya1)+ya1)
  74.   txb = Int(rt*(xb2-xb1)+xb1)
  75.   tyb = Int(rt*(yb2-yb1)+yb1)
  76.   tmp = PointResize(m,txb-txa,tyb-tya)
  77.   ret = Layer(fullv,tmp,x=txa,y=tya)
  78.   return ret
  79. }
  80.  
  81. function Second(clip mfull, int frm, clip img, clip mmap, clip m00, clip m01, clip m02, clip m03, clip m04, clip m05, clip m06, clip m07, clip m08, clip m09, clip m10){
  82.   fullv = BlankClip(mfull,width=4480,height=2688)
  83.   #fullv = Layer(fullv,img,x=4480-896,y=0)
  84.   fullv = Move(fullv,img,frm,4*896,0*672, 5*896,1*672, 3*1120,0*840+84, 4*1120,1*840+84)
  85.  
  86.   fullv = Move(fullv,m00,frm,1*896,1*672, 4*896,4*672, 3*1120,2*840+84, 4*1120,3*840+84)
  87.   fullv = Move(fullv,m10,frm,0*896,0*672, 1*896,1*672, 0*1120,0*840+84, 1*1120,1*840+84)
  88.   fullv = Move(fullv,m09,frm,4*896,3*672, 5*896,4*672, 1*1120,0*840+84, 2*1120,1*840+84)
  89.   fullv = Move(fullv,m08,frm,4*896,2*672, 5*896,3*672, 2*1120,0*840+84, 3*1120,1*840+84)
  90.   fullv = Move(fullv,m07,frm,4*896,1*672, 5*896,2*672, 0*1120,1*840+84, 1*1120,2*840+84)
  91.   fullv = Move(fullv,m06,frm,0*896,3*672, 1*896,4*672, 1*1120,1*840+84, 2*1120,2*840+84)
  92.   fullv = Move(fullv,m05,frm,0*896,2*672, 1*896,3*672, 2*1120,1*840+84, 3*1120,2*840+84)
  93.   fullv = Move(fullv,m04,frm,0*896,1*672, 1*896,2*672, 3*1120,1*840+84, 4*1120,2*840+84)
  94.   fullv = Move(fullv,m03,frm,3*896,0*672, 4*896,1*672, 0*1120,2*840+84, 1*1120,3*840+84)
  95.   fullv = Move(fullv,m02,frm,2*896,0*672, 3*896,1*672, 1*1120,2*840+84, 2*1120,3*840+84)
  96.   fullv = Move(fullv,m01,frm,1*896,0*672, 2*896,1*672, 2*1120,2*840+84, 3*1120,3*840+84)
  97.  
  98.   fullv = StackHorizontal(fullv,mmap)
  99.   return fullv
  100. }
  101.  
  102. function Third(clip mfull, int frm, clip mmap, clip m00){
  103.   fullv = BlankClip(mfull,width=4480,height=2688)
  104.   fullv = Move(fullv,m00,frm,3*1120,2*840+84, 4*1120,3*840+84, 448,0,3584+448,2688)
  105.  
  106.   fullv = StackHorizontal(fullv,mmap)
  107.   return fullv
  108. }
  109.  
  110. function Main(clip mfull, clip img, clip mmap, int current_frame){
  111.   length = mfull.FrameCount
  112.   m00 = mfull
  113.   m01 = (BlankClip(mfull,8590*1)+mfull).Trim(0,-8590*1-86393).FadeOut(28)
  114.   m02 = (BlankClip(mfull,8590*2)+mfull).Trim(0,-8590*2-77650)
  115.   m03 = (BlankClip(mfull,8590*3)+mfull).Trim(0,-8590*3-68990)
  116.   m04 = (BlankClip(mfull,8590*4)+mfull).Trim(0,-8590*4-60640)
  117.   m05 = (BlankClip(mfull,8590*5)+mfull).Trim(0,-8590*5-51850)
  118.   m06 = (BlankClip(mfull,8590*6)+mfull).Trim(0,-8590*6-43240)
  119.   m07 = (BlankClip(mfull,8590*7)+mfull).Trim(0,-8590*7-34560)
  120.   m08 = (BlankClip(mfull,8590*8)+mfull).Trim(0,-8590*8-26070)
  121.   m09 = (BlankClip(mfull,8590*9)+mfull).Trim(0,-8590*9-17435)
  122.   m10 = (BlankClip(mfull,8590*10)+mfull).Trim(0,-8590*10-8910)
  123.  
  124.   fullv = mfull
  125.   fullv = current_frame < 85780 ? First(img,mmap,m00,m01,m02,m03,m04,m05,m06,m07,m08,m09,m10) : fullv
  126.   fullv = ((current_frame >= 85780) && current_frame < 94984) ? Second(fullv,current_frame-85780,img,mmap,m00,m01,m02,m03,m04,m05,m06,m07,m08,m09,m10) : fullv
  127.   fullv = current_frame >= 94984 ? Third(fullv,current_frame-94984,mmap,m00) : fullv
  128.  
  129.   return fullv
  130.  
  131. }
  132.  
  133. img = AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\pngs\img.avi").ConvertToRGB32()
  134. imgend = AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\pngs2\imgend.avi").ConvertToRGB32()
  135. img = img+img+img+img+img+img+img+img+img+img+img+imgend
  136. img = img.PointResize(900,675).Crop(2,2,896,672)
  137. mmap = AviSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\mmap.avi").ConvertToRGB32()
  138. fullmmap = ImageSource("C:\Users\Masterjun\Desktop\Emu\BizHawk 2.6.1\inputimg\fullmmap.png",fps=60).ConvertToRGB32()
  139. mmap = mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+mmap+fullmmap
  140.  
  141. fullv = BlankClip(mfull,width=4480+300,height=2688)
  142.  
  143. fullv = ScriptClip(fullv,"Main(mfull,img,mmap,current_frame)")
  144.  
  145.  
  146. #fulla = MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(m00,m01,1.0/2.0),m02,2.0/3.0),m03,3.0/4.0),m04,4.0/5.0),m05,5.0/6.0),m06,6.0/7.0),m07,7.0/8.0),m08,8.0/9.0),m09,9.0/10.0),m10,10.0/11.0)
  147. #fulla = MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(m00,m01,1.0/2.0),m02,2.0/3.0),m03,3.0/4.0),m04,4.0/5.0),m05,5.0/6.0),m06,6.0/7.0),m07,7.0/8.0),m08,8.0/9.0),m09,(9.0/10.0)/1.5)
  148. fullafst = MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(m10,m09,1.0/2.0),m08,2.0/3.0),m07,3.0/4.0),m06,4.0/5.0),m05,5.0/6.0),m04,6.0/7.0),m03,7.0/8.0),m02,8.0/9.0),m01,9.0/10.0),m00,(10.0/11.0)/1.5)
  149. fullasnd = MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(MixAudio(m10,m09,1.0/2.0),m08,2.0/3.0),m07,3.0/4.0),m06,4.0/5.0),m05,5.0/6.0),m04,6.0/7.0),m03,7.0/8.0),m02,8.0/9.0),m01,9.0/10.0),m00,10.0/11.0)
  150.  
  151. fullap1 = fullafst.Trim(0,-85780)
  152. fullap2a = fullafst.Trim(85780,-120)
  153. fullap2b = fullasnd.Trim(85780,-120)
  154. fullap3 = fullasnd.Trim(85780+120,-9085)
  155.  
  156. adout = FadeOut0(fullap2a,120)
  157. adin = FadeIn0(fullap2b,120)
  158. fullap2 = MixAudio(adout,adin,1.0,1.0)
  159.  
  160. #94985
  161. fullap4a = fullasnd.Trim(94985,-120)
  162. fullap4b = fullafst.Trim(94985,-120)
  163. fullap5 = fullafst.Trim(94985+120,0)
  164.  
  165. adout2 = FadeOut0(fullap4a,120)
  166. adin2 = FadeIn0(fullap4b,120)
  167. fullap4 = MixAudio(adout2,adin2,1.0,1.0)
  168.  
  169. fulla = fullap1+fullap2+fullap3+fullap4+fullap5
  170.  
  171. #fullv = fullv.Subtitle(String(fulla.FrameCount))
  172.  
  173. out = AudioDub(fullv,fulla)
  174. #out = out.ScriptClip("""Subtitle(String(current_frame),0,256,font="Courier New")""")
  175. #out = out.ScriptClip("""Subtitle(txt,0,270,font="Courier New")""")
  176. #out = out.ConditionalReader("inp3.txt","txt",false)
  177.  
  178.  
  179. out = Amplify(out,2.0)
  180. #out = out.Trim(8590*10,-8590)
  181. out = out.ChangeFPS(60)
  182. #out = out.BilinearResize(out.Width/4,out.Height/4)
  183.  
  184. out
  185.  
  186. #m01.PointResize(Int(256*3.5),224*3).Info()
  187. #mfull
  188.  
  189. # ffmpeg -i movie000comb03.avs -c:v libx264 -crf 18 -pix_fmt yuv420p -b:a 384k out_v05.mp4
Add Comment
Please, Sign In to add comment