#sw01 - A New Hope avg=4683, max=9603, audio=192 #sw02 - The Empire Strikes Back avg=4495, max=9603, audio=192 #sw03 - Return of the Jedi avg=4321, max=9603, audio=192 m="sw01" eval("v=movie_"+m+"()") v=resize16x9(v) #apply text after resize for better clarity eval("v=subs_"+m+"(v)") return v function movie_sw01() { #A New Hope (2006 DVD release) loadplugin("C:\video\dgMPEGdec\dgdecode.dll") loadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll") v=MPEG2Source("G:\DVD\MainMovie\STAR WARS\VTS_01_1.d2v") aud=NicAC3Source("G:\DVD\MainMovie\STAR WARS\VTS_01_1 T01 2_0ch 192Kbps DELAY 0ms.ac3") v=audiodub(v,aud) #v=v.crop(0,100,720,-102).addborders(0,100,0,102, $00ff00)# green test v=v.crop(0,102,720,-104).addborders(0,102,0,104, $000000) return v } function movie_sw02() { #The Empire Strikes Back (2006 DVD release) loadplugin("C:\video\dgMPEGdec\dgdecode.dll") loadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll") v=MPEG2Source("G:\DVD\MainMovie\THE EMPIRE STRIKES BACK\VTS_01_1.d2v") aud=NicAC3Source("G:\DVD\MainMovie\THE EMPIRE STRIKES BACK\VTS_01_1 T01 2_0ch 192Kbps DELAY 0ms.ac3") v=audiodub(v,aud) #v=v.crop(0,102,720,-100).addborders(0,100,0,102, $00ff00)# green test v=v.crop(0,104,720,-102).addborders(0,102,0,104, $000000) return v } function movie_sw03() { #Return of the Jedi (2006 DVD release) loadplugin("C:\video\dgMPEGdec\dgdecode.dll") loadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll") v=MPEG2Source("G:\DVD\MainMovie\RETURN OF THE JEDI\VTS_01_1.d2v") aud=NicAC3Source("G:\DVD\MainMovie\RETURN OF THE JEDI\VTS_01_1 T01 2_0ch 192Kbps DELAY 0ms.ac3") v=audiodub(v,aud) #141781 - 141784 charging Ewok (interlaced frames) #v=v.crop(0,100,720,-102).addborders(0,100,0,102, $00ff00)# green test v=v.crop(0,102,720,-104).addborders(0,102,0,104, $000000) return v } function resize16x9(clip v) { v=v.crop(0,60,720,360) #v=v.bicubicResize(720,480) #v=v.bilinearResize(720,480) #v=v.Lanczos4Resize(720,480) v=v.Spline36Resize(720,480) return v } function text(clip v,string t,int start_frame, int end_frame) { #use these values if no resize16x9 #s=1.25 #ts=int(30*s) #ty=int(370*s)#408 #use these values if resize16x9 s=1 ts=38 ty=410 tx=360 w=width(v) h=height(v) sub=blankclip(length=1, width=w, height=int(h*s), color=$0F0F0F, audio_rate=48, pixel_type="RGB24") msk=blankclip(length=1, width=w, height=int(h*s), color=$000000, audio_rate=48, pixel_type="RGB24") sub=sub.subtitle(t, \ font="Alternate Gothic No.2 BT", size=ts, text_color=$C0C0C0, halo_color=$0F0F0F, align=5, x=tx, y=ty)#text sub=sub.bilinearResize(w,h) msk=msk.subtitle(t, \ font="Alternate Gothic No.2 BT", size=ts, text_color=$FFFFFF, halo_color=$000000, align=5, x=tx, y=ty)#text msk=msk.bilinearResize(w,h) msk=overlay(msk,msk,2,1,mode="Add").levels(19,1,255,0,255) segment=v.trim(start_frame, end_frame) segment_sub=overlay(segment, sub, x=0, y=0, mask=msk) v=v.trim(0,start_frame-1) + segment_sub + v.trim(end_frame+1,0) return v } function subs_sw01(clip v) { v=text(v,"Going somewhere, Solo?", 70657,70696) v=text(v,"It's too late.", 70824,70863) v=text(v,"You should have paid him when you had the chance.", 70871,70929) v=text(v,"Jabba's put a price on your head so large...", 70939,71010) v=text(v,"...every bounty hunter in the galaxy will be looking for you.", 71016,71083) v=text(v,"I'm lucky I found you first.", 71097,71135) v=text(v,"If you give it to me, I might forget I found you.", 71201,71281) v=text(v,"Jabba's through with you.", 71364,71404) v=text(v,"He has no time for smugglers who drop their shipments...", 71434,71521) v=text(v,"...at the first sign of an imperial cruiser.", 71527,71566) v=text(v,"You can tell that to Jabba. He may only take your ship.", 71655,71746) v=text(v,"That's the idea.", 71802,71829) v=text(v,"I've been looking forward to this for a long time.", 71842,71927) return v } function subs_sw02(clip v) { #This movie has no subs, but this function was necessary. return v } function subs_sw03(clip v) { v=text(v,"There will be no bargain.", 14383, 14470 ) v=text(v,"I will not give up my favorite decoration.", 14540, 14701 ) v=text(v,"I like Captain Solo where he is.", 14779, 14857 ) v=text(v,"I have come for the bounty on this Wookie.", 20526, 20626 ) v=text(v,"At last we have the mighty Chewbacca.", 20768, 20899 ) v=text(v,"I want fifty thousand. No less.", 21505, 21554 ) v=text(v,"This bounty hunter is my kind of scum...", 22554, 22665 ) v=text(v,"...fearless and inventive.", 22685, 22756 ) v=text(v,"It's too late for that, Solo.", 28767, 28853 ) v=text(v,"You may have been a good smuggler...", 28876, 28970 ) v=text(v,"But now you're Banta fodder.", 28980, 29056 ) v=text(v,"Take him away.", 29223, 29271 ) v=text(v,"Bring her to me.", 29458, 29502 ) v=text(v,"I'm sure.", 29750, 29794 ) v=text(v,"I told you not to admit him.", 33466, 33567 ) v=text(v,"He must be allowed to speak.", 33623, 33682 ) v=text(v,"You weak-minded fool!", 33703, 33774 ) v=text(v,"He's using an old Jedi mind trick.", 33830, 33926 ) v=text(v,"Your mind powers will not work on me, boy.", 34162, 34280 ) v=text(v,"There will be no bargain, young Jedi.", 34691, 34795 ) v=text(v,"I shall enjoy watching you die.", 34874, 34946 ) v=text(v,"Bring me Solo and the Wookie.", 39731, 39814 ) v=text(v,"They will all suffer for this outrage.", 39823, 39942 ) v=text(v,"Soon you will learn to appreciate me.", 43150, 43298 ) v=text(v,"Move him into position", 45220, 45285 ) v=text(v,"Put him in.", 45873, 45920 ) return v }