Evangelion 3.33 trailer

So a pretty nice trailer for the third Rebuild of Evangelion movie was uploaded to YouTube (a mere five years after the movie). Unfortunately it has the movie name plastered on it the whole time, so I recreated the video. (I haven’t found a clean version on BDs either.) Here’s the VapourSynth script, usable with either the Coalgirls or the UTW-THORA release. And here’s a torrent; the video can’t be uploaded to YouTube as it’s blocked instantly.

Required files

Arguments to vspipe

Required Vapoursynth plugins


import functools
import vapoursynth as vs

try:
    aspect_ratio = aspect_ratio.decode()
except NameError:
    aspect_ratio = '2.35:1'
if aspect_ratio not in ['2.35:1', '16:9']:
    raise ValueError("invalid aspect ratio")

try:
    output_depth = int(output_depth)
except NameError:
    output_depth = 10
except ValueError:
    raise ValueError("invalid output depth")

try:
    release = release.decode()
except NameError:
    release = 'Coalgirls'
if release not in ['Coalgirls', 'UTW-THORA']:
    raise ValueError("invalid release")

scenes = [              #   start/movie   start/mv
    (113334, 113397),   #  01:18:42.250  00:37.838
    (113032, 113046),   #  01:18:29.667  00:40.474
    (113070, 113090),   #  01:18:31.250  00:41.041
    ( 29117,  29178),   #  00:20:13.208  00:41.875
    (111660, 111712),   #  01:17:32.458  00:44.411
    (111545, 111570),   #  01:17:27.708  00:46.580
    (118157, 118176),   #  01:22:03.208  00:47.648
    (117734, 117757),   #  01:21:45.583  00:48.415
    (  9877,   9905),   #  00:06:51.542  00:49.383
    (120289, 120354),   #  01:23:32.042  00:50.550
    (  5653,   5692),   #  00:03:55.542  00:53.253
    ( 29596,  29616),   #  00:20:33.167  00:54.888
    ( 30041,  30065),   #  00:20:51.708  00:55.722
    ( 30109,  30140),   #  00:20:54.542  00:56.723
    ( 24995,  25018),   #  00:17:21.458  00:58.025
    ( 45760,  45779),   #  00:31:46.667  00:58.992
    ( 45803,  45836),   #  00:31:48.458  00:59.760
    ( 45746,  45760),   #  00:31:46.083  01:01.161
    ( 15839,  15860),   #  00:10:59.958  01:01.728
    ( 16218,  16242),   #  00:11:15.750  01:02.562
    ( 95285,  95310),   #  01:06:10.208  01:03.563
    (  5231,   5253),   #  00:03:37.958  01:04.598
    (  7386,   7427),   #  00:05:07.750  01:05.532
    (107054, 107075),   #  01:14:20.583  01:07.234
    ( 45951,  45982),   #  00:31:54.625  01:08.101
    ( 43587,  43607),   #  00:30:16.125  01:09.403
    (123852, 123878),   #  01:26:00.500  01:10.237
    (117961, 117991),   #  01:21:55.042  01:11.338
    ( 29378,  29396),   #  00:20:24.083  01:12.573
    ( 33648,  33668),   #  00:23:22.000  01:13.340
    ( 33820,  33843),   #  00:23:29.167  01:14.174
    ( 46179,  46210),   #  00:32:04.125  01:15.108
    ( 24624,  24678),   #  00:17:06.000  01:16.410
    ( 25958,  25978),   #  00:18:01.583  01:18.679
    ( 18517,  18537),   #  00:12:51.542  01:19.513
    ( 25441,  25462),   #  00:17:40.043  01:20.347
    ( 98778,  98796),   #  01:08:35.750  01:21.214
    ( 26873,  26909),   #  00:18:39.708  01:21.949
    ( 28607,  28632),   #  00:19:51.958  01:23.450
    ( 32760,  32789),   #  00:22:45.000  01:24.518
    ( 33427,  33451),   #  00:23:12.792  01:25.719
    (107832, 107851),   #  01:14:53.000  01:26.720
    (107857, 107883),   #  01:14:54.042  01:27.521
    (105332, 105360),   #  01:13:08.833  01:28.588
    (116032, 116061),   #  01:20:34.667  01:29.756
    (111472, 111492),   #  01:17:24.625  01:30.958
    ( 99455,  99477),   #  01:09:03.958  01:31.792
    (118465, 118492),   #  01:22:16.042  01:32.726
    (118420, 118439),   #  01:22:14.167  01:33.860
    (104697, 104711),   #  01:12:42.375  01:34.628
    (100917, 100931),   #  01:10:04.875  01:35.228
    ( 98756,  98778),   #  01:08:34.833  01:35.796
    ( 28867,  28894),   #  00:20:02.792  01:36.730
    (106446, 106460),   #  01:13:55.250  01:37.864
    (115372, 115403),   #  01:20:07.167  01:38.432
    (105700, 105740),   #  01:13:24.167  01:39.733
    (113205, 113258),   #  01:18:36.875  01:41.401
    (112387, 112420),   #  01:18:02.792  01:43.603
    (115206, 115242),   #  01:20:00.250  01:44.938
    ( 98574,  98604),   #  01:08:27.250  01:46.440
    (  4366,   4403),   #  00:03:01.917  01:47.708
    ( 95770,  95809),   #  01:06:30.417  01:49.242
    (107136, 107167),   #  01:14:24.000  01:50.877
    ( 30534,  30558),   #  00:21:12.250  01:52.145
    ( 31186,  31202),   #  00:21:39.417  01:53.146
    (107565, 107603),   #  01:14:41.875  01:53.814
    ( 31967,  31990),   #  00:22:11.958  01:55.415
    (105034, 105076),   #  01:12:56.417  01:56.383
    (  8977,   9022),   #  00:06:14.042  01:58.118
    (114470, 114508),   #  01:19:29.583  01:59.987
    (108117, 108143),   #  01:15:04.875  02:01.588
    ( 25761,  25777),   #  00:17:53.375  02:02.656
    (108492, 108544),   #  01:15:20.458  02:03.323
    (  4545,   4570),   #  00:03:09.375  02:05.492
    (116902, 116931),   #  01:21:10.917  02:06.560
    (106916, 106956),   #  01:14:14.792  02:07.761
    (105404, 105426),   #  01:13:11.833  02:09.429
    (  9542,   9580),   #  00:06:37.583  02:10.330
    ( 32992,  33012),   #  00:22:54.667  02:11.932
    ( 72682,  72733),   #  00:50:28.417  02:12.766
    (105542, 105582),   #  01:13:17.583  02:14.901
    (101714, 101728),   #  01:10:38.083  02:16.570
    (112244, 112284),   #  01:17:56.833  02:17.137
    (115314, 115329),   #  01:20:04.750  02:18.805
    (115601, 115624),   #  01:20:16.708  02:19.439
    (116116, 116142),   #  01:20:38.167  02:20.407
    (117840, 117855),   #  01:21:50.000  02:21.475
    (122741, 122764),   #  01:25:14.208  02:22.109
    (117414, 117434),   #  01:21:32.250  02:23.076
    (100668, 100686),   #  01:09:54.500  02:23.910
    (119624, 119647),   #  01:23:04.333  02:24.644
    (102910, 102926),   #  01:11:27.917  02:25.612
    (  9039,   9089),   #  00:06:16.625  02:26.246
    (113493, 113510),   #  01:18:48.875  02:28.315
    (125141, 125177),   #  01:26:54.208  02:29.016
    (114101, 114134),   #  01:19:14.208  02:30.517
    (124349, 124369),   #  01:26:21.208  02:31.918
    (108608, 108623),   #  01:15:25.333  02:32.753
    (117715, 117732),   #  01:21:44.792  02:33.353
    (114443, 114464),   #  01:19:28.458  02:34.087
    (114327, 114349),   #  01:19:23.625  02:34.955
    (117502, 117547),   #  01:21:35.917  02:35.856
    (120465, 120553),   #  01:23:39.375  02:37.758
    (122200, 122238),   #  01:24:51.667  02:41.428
    (122248, 122334)    #  01:24:53.667  02:42.996
]

if release == 'Coalgirls':
    movie = vs.core.ffms2.Source(r'[Coalgirls] Evangelion 3.33 You Can (Not) Redo [BD 1080p][010A5269].mkv')

# The UTW-THORA release is 814px high (Coalgirls is 816px), so 4:4:4 subsampling
# is required for some Crop and AddBorders calls to work.
if release == 'UTW-THORA':
    movie = vs.core.ffms2.Source(r'[UTW-THORA] Evangelion 3.33 You Can (Not) Redo [BD 1080p][F2060CF5].mkv')[171:]
    movie = vs.core.fmtc.resample(movie, css='444')

if aspect_ratio == '16:9':
    borderheight = (1080 - movie.height) // 2
    movie = vs.core.std.AddBorders(movie, top=borderheight, bottom=borderheight)

def process_youtube_clip(file, frames, crop):
    source = vs.core.ffms2.Source(file)
    source = vs.core.std.AssumeFPS(source, movie)
    clip = source[frames[0]]
    for i in frames[1:]:
        clip += source[i]
    if release == 'Coalgirls':
        clip = vs.core.fmtc.bitdepth(clip, csp=movie.format)
    if release == 'UTW-THORA':
        clip = vs.core.fmtc.resample(clip, csp=movie.format)
    if crop:
        cropheight = (clip.height - movie.height) // 2
        clip = vs.core.std.Crop(clip, top=cropheight, bottom=cropheight)
    return clip

intro_static = process_youtube_clip('intro.mkv', [29, 40, 75], True)
intro_moviename = process_youtube_clip('intro.mkv',
    [i for i in range(76, 1134) if i % 5 != 4], True)
outro = process_youtube_clip('outro.mkv', [0, 97, 210, 247, 346, 397], False)

clip = movie[720] * 23        # khara
clip += intro_static[0]       # black
clip += intro_static[1] * 36  # song name?
clip += intro_static[2]       # black
clip += intro_moviename

for scene in scenes:
    start, end = scene
    clip += movie[start:end]

croph = (outro.height - clip.height) // 2
crop_fun = functools.partial(vs.core.std.Crop, top=croph, bottom=croph)
clip += crop_fun(outro[0])        # black
clip += crop_fun(outro[1]) * 167  # blu-ray out 4/2013 yay
clip += crop_fun(outro[2])        # black

walloftext = outro[3]
if aspect_ratio == '2.35:1':
    croph = 84
    scale = clip.height / (outro.height - 2 * croph)
    walloftext = vs.core.std.Crop(walloftext, top=croph, bottom=croph)
    walloftext = vs.core.fmtc.resample(walloftext, scale=scale, css='444',
                                       kernel='lanczos')
    borderw = (clip.width - walloftext.width) // 2
    walloftext = vs.core.std.AddBorders(walloftext, left=borderw, right=borderw)
    walloftext = vs.core.fmtc.resample(walloftext,
        csp=clip.format.replace(bits_per_sample=16))
    walloftext = vs.core.fmtc.bitdepth(walloftext, csp=clip.format)

clip += walloftext * 108
clip += crop_fun(outro[4])        # black
clip += crop_fun(outro[5]) * 108  # link

if release == 'UTW-THORA':
    clip = vs.core.fmtc.resample(clip, css='420')

clip = vs.core.fmtc.bitdepth(clip, bits=output_depth)
clip.set_output()