SHARE
TWEET

AviSynth for Schorman's SW HDTV - ANH

a guest May 29th, 2014 313 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Schorman's Star Wars DVD/HDTV Preservation - A New Hope
  2.  
  3. #SOURCES
  4.  
  5. #German HDTV Source
  6. AVCSource("anh hdtv ger.dga").CropBottom(8).AssumeFPS(23.976024)
  7. A=last.BlankClip(49)+last.Trim(0,158989)+last.Trim(158990,179371)+last.BlankClip(50)
  8.  
  9. #Blu Ray Source
  10. AVCSource("anh brd.dga").Blur(.2).Tweak(hue=.1,bright=-3,cont=1.01,coring=false).AssumeFPS(23.976024)
  11. B=last.BlankClip(23)+last.Trim(0,28328)+last.BlankClip(8)+last.Trim(28329,73215)+last.BlankClip(7)+last.Trim(73216,73223)+last.BlankClip(4)+last.Trim(73224,179428)
  12.  
  13. #English HDTV Source
  14. AVCSource("anh hdtv eng.dga").AssumeFPS(23.976024).Spline64Resize(1916,816).Tweak(hue=.5,coring=false).MSharpen(7,50,highq=true).AddBorders(2,132,2,132)
  15. C=last.BlankClip(71)+last.Trim(0,0)+last.BlankClip(29)
  16.  
  17. #Crawl
  18. D=B.ConvertToRGB().Letterbox(0,0,1,0).ConvertToYV12().MergeChroma(StackHorizontal(B.Crop(0,0,-1918,0),StackVertical(B.CropBottom(948),C.Crop(0,132,0,-132).AddGrain(sse2=true).Letterbox(0,0,2,2),B.Crop(0,948,0,0)).Crop(2,0,0,0)))
  19.  
  20. #Subtitles & patches
  21. E=B.ConvertToRGB().Letterbox(0,0,1,0).ConvertToYV12().MergeChroma(Median1(A,B,C).AddGrain(sse2=true))
  22.  
  23. F=Merge(E,E.ConvertToRGB().ColourLike("p2.txt","g2.txt").ConvertToYV12())
  24.  
  25. G=StackHorizontal(B.ConvertToRGB().Letterbox(0,0,1,0).ConvertToYV12().MergeChroma(B).Crop(0,0,-1918,0),StackVertical(B.CropBottom(948),C.Crop(0,132,0,-132).AddGrain(sse2=true).Letterbox(0,0,2,2).tweak(bright=-1,coring=false),B.Crop(0,948,0,0)).Crop(2,0,0,0))
  26.  
  27. H=StackHorizontal(A.Crop(0,0,-1456,0), StackVertical(A.Crop(464,0,-464,-284), G.Crop(464,796,-464,-132), A.Crop(464,948,-464,0)), A.Crop(1456,0,0,0))
  28.  
  29. I=StackHorizontal(A.Crop(0,0,-1484,0), StackVertical(A.Crop(436,0,-436,-212), G.Crop(436,868,-436,-132), A.Crop(436,948,-436,0)), A.Crop(1484,0,0,0))
  30.  
  31. J=StackHorizontal(B.ConvertToRGB().Letterbox(0,0,1,0).ConvertToYV12().MergeChroma(B).Crop(0,0,-1918,0),StackVertical(B.CropBottom(948),C.Crop(0,132,0,-132),B.Crop(0,948,0,0)).Crop(2,0,0,0))
  32.  
  33.  
  34. #PIECES TO ENCODE
  35.  
  36. Part1=A.Trim(0,437)+A.Trim(437,437).Merge(A.Trim(439,439)).Merge(E.Trim(438,438))+A.Trim(439,533)+D.Trim(534,3544)+A.Trim(3545,71786)+A.Trim(71787,71910).Letterbox(0,130,0,0)+F.Trim(71911,71913)+StackHorizontal(A.Trim(71914,71973).Crop(0,0,-1452,0), StackVertical(A.Trim(71914,71973).Crop(468,0,-468,-212), AVISource("patch.avi").Tweak(bright=-1,coring=false).Trim(3,0).Crop(468,868,-468,-132), A.Trim(71914,71973).Crop(468,948,-468,0)), A.Trim(71914,71973).Crop(1452,0,0,0))+I.Trim(71974,71976)+A.Trim(71977,72105)+I.Trim(72106,72149)+H.Trim(72150,72212)+F.Trim(72213,72213)+H.Trim(72214,72422)+A.Trim(72423,72475)+H.Trim(72476,72567)+A.Trim(72568,72648)+I.Trim(72649,72770)+F.Trim(72771,72771)+H.Trim(72772,72774)+G.Trim(72775,72775)+H.Trim(72776,72836)+A.Trim(72837,72876)+A.Trim(72877,72928)+F.Trim(72929,72929)+H.Trim(72930,73030)+A.Trim(73031,73085)+I.Trim(73086,73114)+F.Trim(73115,73115)+H.Trim(73116,73212)+A.Trim(73213,73265)+F.Trim(73266,73266)+A.Trim(73267,75848)+I.Trim(75849,75923)+A.Trim(75924,76068)+I.Trim(76069,76069)+F.Trim(76070,76070)+I.Trim(76071,76117)+A.Trim(76118,76228)+I.Trim(76229,76388)+H.Trim(76389,76469)+I.Trim(76470,76473)+A.Trim(76474,76578)+I.Trim(76579,76664)+H.Trim(76665,76866)+I.Trim(76867,76913)+A.Trim(76914,77231)+I.Trim(77232,77426)+A.Trim(77427,77475)+I.Trim(77476,77528)+H.Trim(77529,77758)+A.Trim(77759,77859)+I.Trim(77860,77886)+A.Trim(77887,122203)+E.Trim(122204,122241).ConvertToRGB().ColourLike("p3.txt","g3.txt").ConvertToYV12()+A.Trim(122242,158989)+J.Trim(158990,158990)
  37.  
  38.  
  39. Part2=A.Trim(158991,159915)+E.Trim(159916,159964).ConvertToRGB().ColourLike("p5.txt","g5.txt").ConvertToYV12()+A.Trim(159965,173394)+E.Trim(173395,173395)+A.Trim(173396,173442)+E.Trim(173443,173443)+A.Trim(173444,174162)+E.Trim(174163,174188)
  40.  
  41.  
  42. Part3=A.Trim(174189,174235)+E.Trim(174236,174236)+A.Trim(174237,174283)+E.Trim(174284,174284)+A.Trim(174285,174379)+E.Trim(174380,174380)+A.Trim(174381,178529)+E.Trim(178530,178530)+A.Trim(178531,178577)+E.Trim(178578,178578)+A.Trim(178579,178965)+E.Trim(178966,179010)+A.Trim(179011,179470)
  43.  
  44. ####NOTE - When encoding, encode each part separately, then join using tsmuxer or mkvmerge.
  45.  
  46. Final=Part1+Part2+Part3
  47.  
  48. Final
  49.  
  50. last.Letterbox(130,130,0,0)
  51.  
  52.  
  53. #MEDIAN SCRIPT
  54.  
  55. Function Median1(clip input_1, clip input_2, clip input_3, string "chroma")
  56. {# median of 3 clips from Helpers.avs by G-force
  57.  
  58. chroma = Default(chroma,"process") #default is "process". Alternates: "copy first" or "copy second"
  59.  
  60. Interleave(input_1,input_2,input_3)
  61. chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
  62. SelectEvery(3,1)
  63.  
  64. chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
  65.  
  66. Return(last)
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top