# The Last Unicorn AVS # 'The Last Unicorn' is 85 minutes, and takes up two laserdisc sides, resulting in # two capture files. Both of these captures are used to create the final AVI. AVISource("e:\Scratch Space\TLU1.avi") ++ AVISource("e:\Scratch Space\TLU2.avi") # 'The Last Unicorn' is a wonderful movie that, until recently, was given extremely # pitiful attention by its home video distributors. A letterboxed DVD edition with # a newly remastered and remixed surround soundtrack was finally released in 2001, # but only in Germany. The U.S. has so far only ever seen VHS and laserdisc # editions. While the laserdisc release is better than the VHS release, it is # extremely rare, so rare that copies have sold for over $150 on eBay. Sadly, it is # also the worst laserdisc production I have ever seen. The audio has been run # through a normalizer, making any home theater system sound like a cheap car radio. # The video transfer is even more of a joke; more information about that later on in # this file. Suffice it to say, the laserdisc does not offer a good way to watch # this movie. But, it's the best there is in the States, at least until we finally # get a DVD release. So, I made an AVI from it. # These frames must be manipulated to preserve the telecine pattern: # 31263 delete this frame # 50123 repeat this frame \ I normally ignore these one-frame hiccups, but # 50124 delete this frame / for the tricks documented below, it's necessary. # 57009 repeat this frame # 57010 repeat this frame # 64797 repeat this frame # 76456 repeat this frame # 85388 delete this frame # 85390 delete this frame # 126731 repeat this frame # 146585 delete this frame # 146589 delete this frame # 155995 delete this frame # 155996 delete this frame # # Note: AVISynth does not have "soft" line breaks, so it is necessary for all # this to be on a single line: Trim(0,31262) ++ Trim(31264,50123) ++ Trim(50123,50123) ++ Trim(50125,57009) ++ Trim(57009,57010) ++ Trim(57010, 64797) ++ Trim(64797,76456) ++ Trim(76456,85387) ++ Trim(85389,85389) ++ Trim(85391,126731) ++ Trim(126731,146584) ++ Trim(146586,146588) ++ Trim(146590,155994) ++ Trim(155997,0) # For certain routines, AVISynth internally divides each video frame into two # "fields." One field contains the frame's even rows of pixels, while the other # field has the odd rows. When untelecining a movie, the appropriate AVISynth # functions use these fields to stitch the frames containing mixed pictures into # frames containing single pictures. However, this requires not only knowing which # frames contain mixed pictures (defined by the Doubleweave and Pulldown functions # below), but also knowing which of the two possible ways the fields within those # frames should be spliced together with surrounding fields to restore the original # pictures. AVISynth assumes one way, but sometimes the other way is needed. # # To make a long explanation shorter, the AssumeFrameBased and ComplementParity # functions below allows these captures to be properly untelecined. AssumeFrameBased.ComplementParity # A small amount of visual noise filtering. TemporalSoften(5,3,6) # Untelecine. DoubleWeave().Pulldown(1,3) # To figure out how to make Pulldown match the telecine pattern, define five clips, # each one using one of the five possible Pulldown routines. Then, stack these five # clips on top of each other to compare them, using StackVertical. To make sure the # resulting picture isn't too big, crop each individual picture down to its first # 100 rows of pixels: # a = Crop(0,0,640,100).Pulldown(0,2) # b = Crop(0,0,640,100).Pulldown(0,3) # c = Crop(0,0,640,100).Pulldown(1,3) # d = Crop(0,0,640,100).Pulldown(1,4) # e = Crop(0,0,640,100).Pulldown(2,4) # StackVertical(a,b,c,d,e) # # Next, save the AVS script and open it in VirtualDub or other player capable of # examining AVIs frame by frame. When advancing the movie by single frames, two # of the five pictures will look alright. The rest will show frames that are still # mixed together. Either of the two successful Pulldowns can be used. # # If all five pictures still show mixed frames, use the AssumeFrameBased and # ComplementParity functions described above and try again. # Now back to the poor video. The original film's picture was not aligned # properly when being transferred to a home video master, resulting in some # unintentional letterboxing through-out the entire movie. What's more, the # alignment often changes from scene to scene, making the borders above and below # the picture vary in thickness. Then there is the matter of the picture jumping # from time to time. Also, the picture was intentionally stretched during the # opening and closing credits, so that all the words could fit on screen without the # picture actually being letterboxed. However, the closing credits were # inexplicably windowboxed even after the stretching! (Check out my 'Doc Hollywood' # AVISynth script for an explanation of what windowboxing is.) # # In these commands, I have cropped the entire movie to a resolution fo 640x464. # This gets rid of all the obvious alignment flaws, while sacrificing only a minimal # amount of picture in some frames. Scenes that jumped have been repositioned to # keep the entire movie as centered as possible. Scenes that suffered a greater # misalignment have been padded with extra letterboxing. Finally, the closing # credits have been cropped of their windowboxing, and both sets of credits have # been resized and letterboxed to get rid of the vertical stretching. # # Note that the frame numbers given in these commands are different than those given # above, now that the movie has been untelecined and the frame rate has changed. a = Trim(0,3208).Crop(0,8,640,464) b = Trim(3209,3528).Crop(0,0,640,464) c = Trim(3529,3644).Crop(0,16,640,440).AddBorders(0,8,0,16) d = Trim(3645,3817).Crop(0,8,640,464) e = Trim(3818,4167).Crop(0,8,640,464).BicubicResize(640,368,0,0.5).AddBorders(0,48,0,48) f = Trim(4168,7469).Crop(16,24,600,432).BiCubicResize(640,368,0,0.5).AddBorders(0,48,0,48) g = Trim(7470,26962).Crop(0,8,640,464) h = Trim(26963,29652).Crop(0,0,640,464) i = Trim(29653,30453).Crop(0,8,640,464) j = Trim(30454,30702).Crop(0,0,640,464) k = Trim(30703,34620).Crop(0,8,640,464) l = Trim(34621,34716).Crop(0,16,640,440).AddBorders(0,8,0,16) m = Trim(34717,40098).Crop(0,8,640,464) n = Trim(40099,40140).Crop(0,0,640,448).AddBorders(0,8,0,8) o = Trim(40141,43180).Crop(0,0,640,464) p = Trim(43181,43214).Crop(0,8,640,440).AddBorders(0,8,0,16) q = Trim(43215,68766).Crop(0,8,640,464) r = Trim(68767,69071).Crop(0,0,640,464) s = Trim(69072,70507).Crop(0,8,640,464) t = Trim(70508,70787).Crop(0,16,640,440).AddBorders(0,8,0,16) u = Trim(70788,72599).Crop(0,8,640,464) v = Trim(72600,72665).Crop(0,16,640,440).AddBorders(0,8,0,16) w = Trim(72666,73148).Crop(0,8,640,464) x = Trim(73149,73183).Crop(0,16,640,440).AddBorders(0,8,0,16) y = Trim(73184,75726).Crop(0,8,640,464) z = Trim(75727,75934).Crop(0,16,640,440).AddBorders(0,8,0,16) aa = Trim(75935,81256).Crop(0,8,640,464) bb = Trim(81257,81370).Crop(0,16,640,440).AddBorders(0,8,0,16) cc = Trim(81371,86708).Crop(0,8,640,464) dd = Trim(86709,86883).Crop(0,0,640,464) ee = Trim(86884,88460).Crop(0,8,640,464) ff = Trim(88461,88988).Crop(0,0,640,464) gg = Trim(88989,94665).Crop(0,8,640,464) hh = Trim(94666,94743).Crop(0,16,640,440).AddBorders(0,8,0,16) ii = Trim(94744,94809).Crop(0,0,640,464) jj = Trim(98810,97081).Crop(0,8,640,464) kk = Trim(97082,97184).Crop(0,16,640,440).AddBorders(0,8,0,16) ll = Trim(97185,97274).Crop(0,0,640,464) mm = Trim(97275,122018).Crop(0,8,640,464) nn = Trim(122019,122069).Crop(0,0,640,464) oo = Trim(122070,123011).Crop(0,8,640,464) pp = Trim(123012,123065).Crop(0,0,640,464) qq = Trim(123066,123152).Crop(0,8,640,464) rr = Trim(123153,123182).Crop(0,16,640,440).AddBorders(0,8,0,16) ss = Trim(123183,130151).Crop(0,8,640,464) tt = Trim(130152,130374).Crop(0,16,640,440).AddBorders(0,8,0,16) uu = Trim(130375,131614).Crop(0,8,640,464) vv = Trim(131615,0).Crop(48,40,552,400).BicubicResize(640,368,0,0.5).AddBorders(0,48,0,48) a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z + aa + bb + cc + dd + ee + ff + gg + hh + ii + jj + kk + ll + mm + nn + oo + pp + qq + rr + ss + tt + uu + vv