Advertisement
sheela901

my encode.avs

Mar 2nd, 2015
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Avisynth 17.92 KB | None | 0 0
  1. # The downloadable/HD encoding script. For more information, see:
  2. # http://tasvideos.org/EncodingGuide/PublicationManual.html
  3. # Script updated 10.02.2015
  4.  
  5.  AviSource("test.avi")
  6. # AppendSegment("movie.", 1, 8, "%02.0f")                           # multisegment import
  7. #   string format: "02" means pad with zeros uo to 2 digits
  8. # audio = WavSource("movie_000.wav")                                # psxjin
  9. # AudioDub(audio, last)                                             # psxjin
  10. # AssumeFPS(last.FrameCount / last.AudioLengthF * last.AudioRate)   # progressing desync
  11.  
  12. # Dolphin. remove /* and */ to uncomment
  13. # get values at http://tasvideos.org/forum/viewtopic.php?p=373299#373299
  14. /*
  15.  M = 486000000
  16.  F = 60
  17.  k = 1
  18.  N = 525
  19.  b = 0
  20.  D = (k * N + b) * floor(floor(M / F) / N) # don't edit this formula
  21.  LoadCPlugin("./programs/timecodefps.dll")
  22.  video = last.TimecodeFPS("timecodes.txt", fpsnum=M, fpsden=D)
  23.  audio = WavSource("dspdump0.wav")+WavSource("dspdump1.wav").ResampleAudio(32000)+WavSource("dspdump.wav")
  24. */
  25.  
  26. ConvertToRGB32()
  27. trimframe = 32074   # manual, discards logo lengh automatically
  28. handheld = false    # auto, but set it for preview
  29. hd = false          # auto, but set it for preview
  30. halffps = false     # for games that "lag" every other frame
  31.  
  32. # Crop(32,0,-32,0)                  # lowres genesis
  33. # Crop(0,0,-0,-20)                  # old mupen
  34. # ResampleAudio(last,44100)         # old mupen
  35. # hd ? 0 : LanczosResize(342,256)   # old mupen
  36. # hd ? 0 : LanczosResize(256,384)   # hires desmume
  37. stackNDSscreens = false             # stack one of NDS screens near both of them for HD
  38.  
  39. # Subtitles contents
  40. game = "Fatal Labyrinth"
  41. branch = "''" # lowercase for usual words, capital for in-game capital words. when blank, leave "''"
  42. author = "plusminus"
  43. time = "06:46.25"
  44. rerecords = "3560"
  45.  
  46. # Subtitles timing and placement
  47. subFF = 120                     # first subtitles frame, set manually!
  48. subAlign = 8                        # subtitles alignment (7/8/9)
  49. subYpos = 3                         # subtitles vertical position
  50. subLength = int(last.FrameRate * 5) # auto
  51.  
  52. # Deblink
  53. blend = false   # compensate for 30 fps flickering at all. always check if the run requires it!
  54. ngdb = true     # use smart deblink for that, otherwise will tasblend (avoid tasblend!)
  55.  
  56. ######################
  57. # AUTOMATED SETTINGS #
  58. ######################
  59.  
  60. LoadPlugin("./programs/ExactDedup.dll")
  61. LoadPlugin("./programs/mvtools2.dll")
  62. LoadPlugin("./programs/mt_masktools-26.dll")
  63.  
  64. pass = 0
  65. i444 = false
  66. desyncfixer = false
  67.  
  68. factor = hd ? (last.height >= 1440) ? 1 : \
  69.               (last.height >=  720) ? 2 : \
  70.               (last.height >=  360) ? 4 : \
  71.               8 : 1
  72.  
  73. #file = "logo.png"
  74. file = hd ? stackNDSscreens ? "logohdnds.png" : \
  75.             (last.height == 384) ? "logonds.png" : "hdlogo.png" : \
  76.             (last.height == 384) ? "logonds.png" : "logo_320x224.png"
  77.  
  78. # Subtitles variables
  79. subSize = (last.width <= 240) ? 10 : 12
  80. subFF2 = SubFF + subLength + 1
  81. subXpos = (subAlign == 7) ? 2 : \
  82.           (subAlign == 8) ? last.width / 2 : \
  83.           last.width - 2
  84. subString1 = game + "\n" + ((branch == "''") ? "" : (branch + "\n")) \
  85.     + "Played by " + author + "\nPlaying time: " \
  86.     + time + "\nRerecord count: " + rerecords  
  87. subString2 = "This is a tool\nassisted recording.\nFor details, visit\n" + \
  88.     "http://TASVideos.org/"
  89.  
  90. # This fixes length based audio/video desync,
  91. # if it exists inside the encode (eg. Many PCEngine games).
  92. num = last.AudioLengthF * last.FrameRateNumerator
  93. denom = last.FrameCount * last.FrameRateDenominator
  94. fixedaudiorate = Round(num / denom)
  95. (desyncfixer) ? last.AssumeSampleRate(fixedaudiorate) : 0
  96.  
  97. Trim(0, trimframe - int(last.FrameRate * 2))
  98. hd ? blend ? ngdb ? ng_deblink(0.5) : TasBlend() : 0 : 0
  99.  
  100. # Stack 3 NDS screens.
  101. UpperScreen = last.Crop(0, 0, -0, last.height/2)
  102. LowerScreen = last.Crop(0, last.height/2, -0, -0)
  103. HalfScreen = UpperScreen                            # set which NDS screen to place as main
  104. stackNDSscreens ? (hd ? StackHorizontal(HalfScreen.PointResize(last.width*2, last.height), last) : 0) : 0
  105.  
  106. b = last.PointResize(last.width * factor, last.height * factor)
  107.  
  108. # Aspect ratio correction
  109. width = (b.width > b.height * 4 / 3) ? b.width : b.height * 4 / 3
  110. width = (width % 4 == 1) ? width + 3 : \
  111.         (width % 4 == 2) ? width + 2 : \
  112.         (width % 4 == 3) ? width + 1 : width
  113. height = (b.width > b.height * 4 / 3) ? b.width * 3 / 4 : b.height
  114. height = (height % 4 == 1) ? height + 3 : \
  115.          (height % 4 == 2) ? height + 2 : \
  116.          (height % 4 == 3) ? height + 1 : height
  117.  
  118. c = handheld ? b : (hd ? b : b.LanczosResize(width, height, taps=2))
  119. g = hd ? c : ((pass == 0) ? c : last)
  120.  
  121. # Logo.
  122. d = ImageSource( \
  123.     file=file, start=0, end=int((last.FrameRate * 2) - 1), fps=last.FrameRate \
  124. ).ConvertToRGB32().AssumeFPS( \
  125.     last.FrameRateNumerator, last.FrameRateDenominator)
  126. e = BlankClip(d, audio_rate=last.AudioRate, channels=last.AudioChannels)
  127. f = AudioDub(d, blankclip(g)).LanczosResize(g.width, g.height, taps=2)
  128. last = f ++ g
  129.  
  130. subDividend = (last.width > last.height) ? last.height : last.width
  131. subFactor = (subDividend / 240 < 1) ? 1 : subDividend / 240
  132.  
  133. # Subtitles function
  134. hd ? ng_bighalo( \
  135.     subString1, x=(subXpos * factor),  y=(subYpos * subFactor), \
  136.     align=subAlign, first_frame=subFF, last_frame=(subFF + subLength), \
  137.     size=(subSize * subFactor), text_color=$00FFFFFF, halo_color=$00000000, lsp=2 \
  138. ) : subtitle( \
  139.     subString1, x=(subXpos * factor),  y=(subYpos * subFactor), \
  140.     align=subAlign, first_frame=subFF, last_frame=(subFF + subLength), \
  141.     size=(subSize * subFactor), text_color=$00FFFFFF, halo_color=$00000000, lsp=2 \
  142. )
  143.  
  144. hd ? ng_bighalo( \
  145.     subString2, x=(subXpos * factor),  y=(subYpos * subFactor), \
  146.     align=subAlign, first_frame=subff2, last_frame=(subff2 + SubLength), \
  147.     size=(subSize * subFactor), text_color=$00FFFFFF, halo_color=$00000000, lsp=2 \
  148. ) : subtitle( \
  149.     subString2, x=(subXpos * factor),  y=(subYpos * subFactor), \
  150.     align=subAlign, first_frame=subff2, last_frame=(subff2 + SubLength), \
  151.     size=(subSize * subFactor), text_color=$00FFFFFF, halo_color=$00000000, lsp=2 \
  152. )
  153.  
  154. halffps ? hd ? 0 : SelectOdd : 0
  155.  
  156. # Downloadable encodes need a resizing filter for the colourspace reduction.
  157. # HD encodes need to be point resized to keep the colour information faithful.
  158. ConvertToYV24(chromaresample="point", matrix=(hd ? "Rec709" : "PC.601") )
  159. (pass == 1) ? ExactDedup(firstpass=true, \
  160.     dupinfo="./temp/dup.txt", \
  161.     times="./temp/times.txt" \
  162. ) : last
  163. (pass == 2) ? ExactDedup(firstpass=false, dupinfo="./temp/dup.txt") : last
  164. i444 ? last : ConvertToYV12( \
  165.     chromaresample=(hd ? "point" : "lanczos"), \
  166.     matrix=(hd ? "Rec709" : (pass == 0 ? "Rec601" : "PC.601")) \
  167. )
  168.  
  169. ####################
  170. # CUSTOM FUNCTIONS #
  171. ####################
  172.  
  173. # Multisegment AVI import
  174. function AppendSegment(
  175. \ string base,
  176. \    int first_val,
  177. \    int last_val,
  178. \ string format
  179. \){
  180.   AviSegment = base + String(first_val, format) + ".avi"
  181.   result = Eval("AviSource(AviSegment)")#.LanczosResize(256,224)")
  182.   return (first_val < last_val) \
  183.     ? result + AppendSegment(base,first_val+1,last_val,format) \
  184.     : result
  185. }
  186.  
  187. # nanogyth's deblink.
  188. function ng_deblink(clip clp,
  189. \ float "ratio",
  190. \ int "level",
  191. \ clip "blinkmask"
  192. \){
  193. #Version 10 2012.04.22
  194.  
  195.     blink = default(blinkmask, clp.ng_blinkmask())
  196.  
  197.     ratio = default(ratio, 2.0 /3)
  198.     assert(ratio >= 0.0 && 1.0 >= ratio,
  199.     \      "[ng_deblink] 1.0 >= ratio >= 0.0, it was " + string(ratio))
  200.  
  201.     level = default(level, round(ratio * 257))
  202.     assert(level >= 0 && 257 >= level,
  203.     \      "[ng_deblink] 257 >= level >= 0, it was " + string(level))
  204.  
  205.     m01=mt_logic(blink.SelectEvery(4,0),
  206. \                blink.SelectEvery(4,1),
  207. \                mode="or").ConvertToRGB32()
  208.     m23=mt_logic(blink.SelectEvery(4,2),
  209. \                blink.SelectEvery(4,3),
  210. \                mode="or").ConvertToRGB32()
  211.  
  212.     f0=Layer(clp.SelectEvery(4,0),
  213. \            clp.SelectEvery(4,1).Mask(m01),
  214. \            level=level)
  215.     f1=Layer(clp.SelectEvery(4,1),
  216. \            clp.SelectEvery(4,0).Mask(m01),
  217. \            level=level)
  218.     f2=Layer(clp.SelectEvery(4,2),
  219. \            clp.SelectEvery(4,3).Mask(m23),
  220. \            level=(257-level) )
  221.     f3=Layer(clp.SelectEvery(4,3),
  222. \            clp.SelectEvery(4,2).Mask(m23),
  223. \            level=(257-level) )
  224.  
  225.     Interleave(f0,f1,f2,f3)
  226. }
  227.  
  228. function ng_blinkmask(clip clp,
  229. \ bool "TEST",
  230. \ bool "STABILIZE",
  231. \ bool "SHARP",
  232. \ bool "HYSTER",
  233. \ int "inpand",
  234. \ int "expand",
  235. \ int "ml"
  236. \){
  237. #Version 10 2012.04.22
  238.  
  239. #BLINK
  240. # Blinking is a block that alternates on/off each frame
  241. # SelectEven would only see either the on or the off
  242.  
  243. #FLASH
  244. # Flashing is a block that is only on for a single frame
  245. # SelectEven might miss the flash
  246.  
  247. #SHAKE
  248. # Shaking is a block that moves back/forth each frame
  249. # SelectEven would only see one position
  250.  
  251. # The goal of this function is to make a blink mask for use with
  252. # ng_deblink. For overly complicated scenes where a clean blinkmask
  253. # can't be found, just use TASBlend. Uniform softness looks better
  254. # than sharp artifacts.
  255.  
  256. # This function calculates flash and shake info for the test script,
  257. # but those effects should be handled in different ways.
  258. # Flash - choose frames to make sure the flash is in your final clip.
  259. # Shake - SelectEvery(4,0,2,1,3) or SelectEvery(4,1,0,2,3)
  260. # SelectEvery doesn't generally work because it messes with the fluidity
  261. # of motion. But that won't be noticable on a shaking screen.
  262. # Be careful if 2 frame blinking is present, as the selectevery can turn
  263. # it into 1 frame blinking.
  264.  
  265.     TEST      = default(     TEST, false)
  266.     STABILIZE = default(STABILIZE, true)
  267.     SHARP     = default(    SHARP, true)
  268.     HYSTER    = default(   HYSTER, false)
  269.     inpand    = default(   inpand, 1)
  270.     expand    = default(   expand, 1)
  271.     ml        = default(       ml, 128)
  272.  
  273. # The functions used to make the masks work in the YV12 colorspace. Once
  274. # the masks are created they can be used in the RGB32 colorspace direcly
  275.     src=clp.ConvertToYV12()
  276.  
  277. # Blinking is located by looking for blocks that don't exist in
  278. # consecutive frames. The motion vector will match blocks that exist in
  279. # both frames. The blocks that aren't in both will end up with huge
  280. # values that are picked out by the motion mask.
  281.     super = MSuper(src, pel=1)
  282.     fvec  = MAnalyse(super, isb=false, blksize=4)
  283.     bvec  = MAnalyse(super, isb=true , blksize=4)
  284.     fmask = Mmask(src, fvec, kind=1, ml=ml).mt_binarize()
  285.     bmask = Mmask(src, bvec, kind=1, ml=ml).mt_binarize()
  286.     blink = mt_logic(fmask, bmask, mode="and")
  287.  
  288. # Blinking usually occurs against a stable background. This is found
  289. # by looking at blocks 2 frames apart. This distinguishes a blink from
  290. # blocks that are just changing every frame.
  291.     ee_src   = src.SelectEven()
  292.     ee_super = MSuper(ee_src, pel=1)
  293.     ee_fvec  = MAnalyse(ee_super, isb=false, blksize=4)
  294.     ee_bvec  = MAnalyse(ee_super, isb=true , blksize=4)
  295.     ee_fmask = Mmask(ee_src, ee_fvec, kind=1, ml=ml).mt_binarize()
  296.     ee_bmask = Mmask(ee_src, ee_bvec, kind=1, ml=ml).mt_binarize()
  297.  
  298.     oo_src   = src.SelectOdd()
  299.     oo_super = MSuper(oo_src, pel=1)
  300.     oo_fvec  = MAnalyse(oo_super, isb=false, blksize=4)
  301.     oo_bvec  = MAnalyse(oo_super, isb=true , blksize=4)
  302.     oo_fmask = Mmask(oo_src, oo_fvec, kind=1, ml=ml).mt_binarize()
  303.     oo_bmask = Mmask(oo_src, oo_bvec, kind=1, ml=ml).mt_binarize()
  304.  
  305.     fmask_2   = Interleave(ee_fmask, oo_fmask)
  306.     bmask_2   = Interleave(ee_bmask, oo_bmask)
  307.     background = mt_logic(fmask_2.SelectEvery(1,1),
  308. \                         bmask_2.SelectEvery(1,-1),
  309. \                         mode="or")
  310.     stable_blink = mt_hysteresis(background.mt_invert, blink)
  311.     blink2 = (STABILIZE) ? stable_blink : blink
  312.  
  313. # Shrinking the blink mask can get rid of noise,
  314. # too much will lose signal as well.
  315.     blink3 = blink2.mt_inpand(mode=mt_diamond(inpand))
  316.    
  317. # Using just pixels that changed helps sharpen the mask
  318.     diff   = ng_diff(clp.SelectEvery(1,-1), clp)
  319.     diff_2 = mt_logic(diff, diff.SelectEvery(1,1), mode="and")
  320.  
  321. #Hysteresis
  322. # Matches continuous blocks of pixels.
  323. # Use with care, will match the whole screen on fades.
  324.     hyster_blink = mt_hysteresis(blink3, diff_2)
  325.  
  326. # Expand the mask to make up for shrinking it (or just use hysteresis)
  327.     blink4 = blink3.mt_expand(mode=mt_circle(expand))
  328.     sharp_blink = mt_logic(blink4, diff_2, mode="and")
  329.  
  330.     blink5 = (HYSTER) ? hyster_blink :
  331. \            (SHARP)  ? sharp_blink  : blink4
  332.  
  333.    
  334. # A flash won't match blocks 1 or 2 frames away.
  335.     sub_flash = mt_logic(fmask_2, bmask_2, mode="and")
  336.     flash     = mt_logic(blink, sub_flash, mode="and")
  337.    
  338. # A shake changes in one frame and changes back in the next.
  339. # This isn't detected by the motion vectors because the blocks exist in
  340. # both frames, they are just shifting around.
  341.     same   = ng_same(clp.SelectEvery(1,-1), clp.SelectEvery(1,1))
  342.     shake  = mt_logic(same, diff_2, mode="and")
  343.  
  344.     (TEST) ? stackhorizontal(clp, mergeRGB(blink5, flash, shake))
  345. \          : blink5.GreyScale()
  346. }
  347.  
  348. function ng_diff(clip A, clip B, int "thr"){
  349.     thr=default(thr,0)
  350.     TAD=ng_TAD(A,B)
  351.     return mt_binarize(TAD, threshold=thr)
  352. }
  353.  
  354. function ng_same(clip A, clip B, int "thr"){
  355.     thr=default(thr,0)
  356.     TAD=ng_TAD(A,B)
  357.     return mt_binarize(TAD, threshold=thr, upper=true)
  358. }
  359.  
  360. function ng_TAD(clip A, clip B){
  361.     R=ng_AD(A  .showRed("YV12"),B  .showRed("YV12"))
  362.     G=ng_AD(A.showGreen("YV12"),B.showGreen("YV12"))
  363.     B=ng_AD(A .showBlue("YV12"),B .showBlue("YV12"))
  364.     return ng_plus(R, ng_plus(G, B))
  365. }
  366.  
  367. function ng_AD(clip A, clip B){
  368.     return mt_lutxy(A,B,"x y - abs")
  369. }
  370.  
  371. function ng_plus(clip A, clip B){
  372.     return mt_lutxy(A,B,"x y +")
  373. }
  374.  
  375. # HD encodes need big subtitle fonts, but AviSynth can't enlarge the halo.
  376. # Here's the custom subtitle function by nanogyth
  377. # It's slow, but we have subtitles for a limited time only
  378. function ng_bighalo(
  379. \   clip clp,
  380. \ string text,
  381. \  float "x",
  382. \  float "y",
  383. \    int "first_frame",
  384. \    int "last_frame",
  385. \ string "font",
  386. \  float "size",
  387. \    int "text_color",
  388. \    int "halo_color",
  389. \    int "align",
  390. \    int "spc",
  391. \    int "lsp",
  392. \  float "font_width",
  393. \  float "font_angle",
  394. \    int "halo_radius",
  395. \ string "mode",
  396. \ string "halo",
  397. \ string "shadow"
  398. \){
  399.  
  400. #Version 16-17 2012/12/1
  401. # - added circle_12 as default
  402. # - reworked math to avoid bitwise functions that are only
  403. #   availible in experimental builds
  404. #Version 15 2012/12/1
  405. # - drop shadow added
  406. # - halo_radius still works, but calculating the points of
  407. #   a hollow circle for halo is much faster
  408. # - mode is depricated since memo-ing isn't as needed
  409.  
  410.     first_frame = default(first_frame, 0)
  411.     last_frame  = default( last_frame, first_frame + 299)
  412.     font        = default(       font, "Arial")
  413.     size        = default(       size, 112)
  414.     x           = default(          x, -1)
  415.     y           = default(          y, -1)
  416.     text_color  = default( text_color, $00DDDDDD)
  417.     halo_color  = default( halo_color, $80000000)
  418.     align       = default(      align, 5)
  419.     spc         = default(        spc, 0)
  420.     lsp         = default(        lsp, 0)
  421.     font_width  = default( font_width, 0)
  422.     font_angle  = default( font_angle, 0)
  423.     shadow      = default(     shadow, "")
  424.     w           = clp.width
  425.     h           = clp.height
  426. ###
  427.    ###
  428.       ##
  429.         #
  430.          #
  431.           #
  432.           #
  433.            #
  434.            #
  435.            #
  436.             #
  437.             #
  438. #           #
  439. circle_12="0 0 "+\
  440. "12 0 0 12 -12 0 0 -12 "+\
  441. "1 12 2 12 3 11 4 11 5 11 6 10 7 10 8 9 "+\
  442. "12 1 12 2 11 3 11 4 11 5 10 6 10 7 9 8 "+\
  443. "-1 12 -2 12 -3 11 -4 11 -5 11 -6 10 -7 10 -8 9 "+\
  444. "-12 1 -12 2 -11 3 -11 4 -11 5 -10 6 -10 7 -9 8 "+\
  445. "-1 -12 -2 -12 -3 -11 -4 -11 -5 -11 -6 -10 -7 -10 -8 -9 "+\
  446. "-12 -1 -12 -2 -11 -3 -11 -4 -11 -5 -10 -6 -10 -7 -9 -8 "+\
  447. "1 -12  2 -12 3 -11 4 -11 5 -11 6 -10 7 -10 8 -9 "+\
  448. "12 -1  12 -2 11 -3 11 -4 11 -5 10 -6 10 -7 9 -8 "
  449.     halo = (defined(halo_radius)) ? mt_circle(halo_radius) : circle_12
  450.  
  451.     invis = BlankClip(1, w, h, pixel_type="YV12")
  452.     tm = Subtitle(invis, text, x, y, 0, 0, font, size, $00FFFFFF,\
  453.         0, align, spc, lsp, font_width, font_angle)
  454.     text_mask = tm.mt_expand(mode="0 0 "+shadow, chroma="-128")
  455.     halo_mask = text_mask.mt_expand(mode=halo, chroma="-128")
  456.    
  457.     h0      = halo_color%$01000000
  458.     h_color = (h0>=0) ? h0 : $01000000+h0
  459.     t0      = text_color%$01000000
  460.     t_color = (t0>=0) ? t0 : $01000000+t0
  461.     h_alpha = (halo_color>=0) ? 255-(halo_color/$01000000) : (-halo_color-1)/$01000000
  462.     t_alpha = (text_color>=0) ? 255-(text_color/$01000000) : (-text_color-1)/$01000000
  463.     lut_str = string(h_alpha)+ " x * 255 / " +string(t_alpha)+\
  464.               " " +string(h_alpha)+ " - y * 255 / +"
  465.  
  466.     alpha_mask = mt_lutxy(halo_mask, text_mask, lut_str)
  467.  
  468.     hc = BlankClip(1, w, h, color=h_color)
  469.     tc = Subtitle(hc, text, x, y, 0, 0, font, size, t_color,\
  470.         0, align, spc, lsp, font_width, font_angle)
  471.     overlay = tc.Mask(alpha_mask.ConvertToRGB32())
  472.    
  473.     clp.ApplyRange(first_frame, last_frame, "Layer", overlay)
  474. }
  475.  
  476. # TASBlend.
  477. function TASBlend(clip c, float "ratio") {
  478.     # reduces framerate to 1/2 but leaves flicker effects partly visible
  479.     # blends frame pairs with alternating opacity
  480.     # The default for this is 2/3+1/3;1/3+2/3)
  481.     # optional "ratio" is the opacity of the first frame out of the four
  482.     ratio = default(ratio, 2.0 / 3)
  483.     opacity1 = round((1 - ratio) * 257)
  484.     opacity2 = round((ratio) * 257)
  485.     c
  486.     Interleave( \
  487.         Layer(SelectEvery(4, 0), SelectEvery(4, 1), level=opacity1), \
  488.         Layer(SelectEvery(4, 2), SelectEvery(4, 3), level=opacity2) \
  489.     )
  490. }
  491.  
  492. # Replace for partial blending.
  493. function Replace(clip c, int i, int j, clip d) {
  494.     Assert(i >= 0, "Replace: parameter i is negative")
  495.     Assert(j >= 0, "Replace: parameter j is negative")
  496.     p1 = c.Trim(0, -i)
  497.     p2 = d.Trim(i, j)
  498.     p3 = c.Trim(j + 1, 0)
  499.     p1 = (i == 0) ? c.Trim(0, -1).DeleteFrame(0) : p1
  500.     p3 = (j == 0) ? c.Trim(0, -1).DeleteFrame(0) : p3
  501.     p1 + p2 + p3
  502.     return (c.HasAudio) ? last.AudioDub(c) : last
  503. }
  504.  
  505. last
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement