Thursday, February 26, 2009

How Derek Edits His Videos

You don't want to know. I had a computer (the Mac) crash over a year ago, so I started editing with AviSynth on the PC. It's insane. It's not an editor where you point and click and drag stuff around. You have to script commands line by line. Why didn't I just fork over the dough for a new editor? I don't know. Either it's because I'm stubborn or because I enjoy a challenge. Once in a while people ask, so here it is. Here is the madness that ended up being my latest video, "How a Bill Becomes a Log," a technical test for later episodes, which will be based on this script:

a=MPEG2Source("a.d2v").BicubicResize(1280,1080).TFM().TDecimate().BicubicResize(1280,720).Convolution3d(preset="moviehq")
a=AudioDub(a, NicMPASource("a MPA PID 814 DELAY 4ms.mpa")) .DelayAudio(0.004)
b=MPEG2Source("b.d2v").BicubicResize(1280,1080).TFM().TDecimate().BicubicResize(1280,720).Convolution3d(preset="moviehq")
b=AudioDub(b, NicMPASource("b MPA PID 814 DELAY 23ms.mpa")) .DelayAudio(.023)
Canal=MPEG2Source("canal.d2v").BicubicResize(1280,1080).TFM().TDecimate().BicubicResize(1280,720).Convolution3d(preset="moviehq")
Canal=AudioDub(canal,blankclip(a)).ConvertToRGB32().Trim(24,-144)

footage=(a++b).ConvertToRGB32()
slug=blankclip(footage)

fA=footage.Trim(346,4213-24)
fB=footage.Trim(4869,10904+240)

intro=AudioDub( AviSource("Intro.avi").ConvertToRGB32() , blankclip(footage) )
logo=ImageSource("logo.png",pixel_type="rgb32").AssumeFPS(footage)
fA=layer(fA,logo,"add",128)
canal=layer(canal,logo,"add",128)
#footage=layer(footage.ConvertToRGB32(),logo,"add",128)

fA=Dissolve(intro.Trim(0,239+48),fA,48)
fA=Dissolve(fA,Canal,24)
fA=FadeOut0(fA,12)

fB=Dissolve(fB.Trim(0,6034+48),fB.levels(60,1,255,0,164).Trim(6035,0),48)
fB=Fadeout0(fB,72)
fB=layer(fB,logo,"add",128)
fB=FadeIn0(fB,12)

cred=ImageSource("credits.png",pixel_type="rgb32").Trim(0,-240).\
KenBurnsEffect(startpany=1551,endpany=-1551).Crop(0,0,1280,720)
credA=ImageSource("credits.png",pixel_type="rgb32").ShowAlpha().Trim(0,-240).\
KenBurnsEffect(startpany=1551,endpany=-1551).Crop(0,0,1280,720)
cred=Audiodub(mask(cred,creda),blankclip(footage))
cred=cred.Trim(64,0)

fB=fB.Trim(0,6082)++layer(fB.Trim(6083,0),cred)

bills=MPEG2Source("comm\bils.d2v").BicubicResize(852,1080).TFM().TDecimate().BicubicResize(852,480).Convolution3d(preset="moviehq")
calc=MPEG2Source("comm\calc.d2v").BicubicResize(852,1080).Bob().BicubicResize(852,480).AssumeFPS(24000,1001).Convolution3d(preset="moviehq")
notice=MPEG2Source("comm\notice.d2v").BicubicResize(852,1080).TFM().TDecimate().BicubicResize(852,480).Convolution3d(preset="moviehq")
phonev=MPEG2Source("comm\phone.d2v").BicubicResize(852,1080).TFM().TDecimate().BicubicResize(852,480).Convolution3d(preset="moviehq")
cig=MPEG2Source("comm\cig.d2v").BicubicResize(852,1080).TFM().TDecimate().BicubicResize(852,480).Convolution3d(preset="moviehq")

bills=bills.Trim(48,-240).Crop(212,0,640,480).ConvertToRGB32()
calc=(calc.Trim(1027,-120)++calc.Trim(1027,-120).Reverse()).Crop(60,0,640,480).ConvertToRGB32()
notice=notice.Trim(90,-240).Crop(106,0,640,480).ConvertToRGB32()
phonev=phonev.Trim(173,-240).Crop(106,0,640,480).ConvertToRGB32()
cig=cig.Trim(48,-240).Crop(106,0,640,480).ConvertToRGB32()
bg=bills++phonev++notice++calc++cig

graph1=ImageSource("comm\mooch1.png",pixel_type="RGB32").AssumeFPS(24000,1001).Trim(0,-16)
graph2=ImageSource("comm\mooch2.png",pixel_type="RGB32").AssumeFPS(24000,1001).Trim(0,-16)
graph=(graph2++graph1).Loop().Trim(0,-240)
phone=ImageSource("comm\phonenumber.png",pixel_type="RGB32").AssumeFPS(24000,1001).Loop().Trim(0,-1200)
break=blankclip(phone).Trim(0,-12)++layer(bg,phone)++graph++blankclip(phone).Trim(0,-12)

Break=break.Spline36Resize(960,720).AddBorders(160,0,160,0)

(fA++audiodub(break,blankclip(fA))++fB)
Yes, believe it or not when that script is dragged into VirtualDub, out comes the video. Even the opening sequence was designed with another script. I don't just sit down and type it though once. First I start by loading the clips. After seeing how it looks, I trim them to just the parts I want. I design the graphics in GIMP, save them as PNG's, and load and layer them in the script. Then it's trial and error. Let's see how it looks when I dissolve on this frame. No, maybe a second earlier. Oh, these two clips have different framerates so I have to make them match to join them together. After a lot of tweaking and fiddling, I settle on the final script. It takes a while to render though, and I fine tune the audio with Audacity during that rendering.

So in conclusion, Derek W. Truesdale's productions are like sausage. It's a pretty nice product, but you don't need to see how it's made. That goes for the equipment too. If you saw my "studio," you'd laugh. "That's where you make videos?" It proves it's not the equipment you have: it's how you use it.

No comments: