Archive for February, 2009

Desmond, the Destiny Crasher

[To comment to my theory visit the main “Lost” theory site].

In the episode titled “316” we saw the protagonists “zapped” away from the plane, rather than seeing the plane actually crashing. On the same episode it was revealed that the Oceanic 6 must re-create the circumstances of the Oceanic 815 flight as much as possible in order to make it to the island.

What if the island was “pre-programmed” to search for certain “patterns” on flights that happen to fly above the invisible island? Just like the “grep” command on UNIX. In the flight 815 there were these few special people on it that the island expected them to arrive for a long time. The plan was to zap them out of the plane in order to have them fulfill their destiny on the island. Instead, the plane crashed. So, what happened?

Desmond happened.

The “expected” timeline was changed by the only person that is able to affect timelines, Desmond. By not entering the numbers on the computer in time, the island released a big amount of electromagnetism affecting the operational abilities of the island itself. This temporary interference disabled the “zapping” abilities of the island, and the electromagnetism broke the plane in pieces instead. The island only had enough time to make sure the safety of as many people as it could, hoping that among the survivors the special persons will survive too. In the series it was said that no one should have survived that crash, and yet, enough of them did. Because the island intervened just in time.

This theory also explains why the red-shirts Oceanic 815 survivors ultimately died. It’s because they should have not survived (or crash there) in the first place! This is also enforced by Ben’s “who cares?” in the episode “316” when Jack asked them what would happen to the rest of the people in flight 316. The island is not interested in them, and so it’s possible that flight 316 never crashed anywhere. The co-pilot took over when Frank zapped out of there along the rest, and no one noticed anything more than a temporary disturbance. This is what it should have happened in Oceanic 815 too, if it was not for Desmond.

Because more people than it was required survived, a different timeline emerged. The original plan might have been for the Others to pick up the people zapped in the island (people who were in “the list”, like in the case of the abduction of some of the tailees), give them a tutorial as to what the heck happened to them, and then let them fulfill their destiny (which according to some it will be a “saving the world” scenario). Instead, we had many survivors, they created their own little team, and combated the Others. Coupling this with Ben’s behavioral shortcoming to give up the leadership to Locke early on, the Others and the Losties created a scenario that didn’t serve anyone. The island right now is probably not happy with any of the two sides…

Some will ask why the island was pre-programmed to search about these special people, but given that time travel is possible on Lost, it could be a self-fulfilling prophecy plot: someone from the future (Jacob?) went back in time, in the ancient era when Egyptians colonized the island, and made sure the island knows about these special people that it needs to bring together when it recognizes some patterns in the sky. The island might just be a big computer (or a spaceship) of a sort. And Richard Alpert is the ageless keeper of the island making sure it’s safe, while it’s waiting for these special people to arrive and fulfill their destiny. Alpert and Ben do not know who the special people among the survivors are (except for the case of Locke), they only know what Jacob allows them to eventually know via “the list”.

However, if the destiny of these special people was just to be fulfilled as originally planned, we would have not had TV suspense. Every character would just do what they were meant to do and that would be that. But you can’t constraint a twisted TV show like “Lost” is to having the heroes just do what they were supposed to do. There has to be a twist, a twist that changes the rules, and brings chaos to “what was supposed to happen”. That’s the suspense that the show actually brings us: not a boring, canned version of what’s supposed to happen, but what actually happened. And Desmond with his timeline-changing abilities is the plot device for this twist. As in a Greek tragedy, Desmond unknowingly, but ironically, paid back the island –a place that he so much despises– with a huge platter of revenge for keeping him prisoner there for 3 years. This theory makes Desmond the “variable” to the “Lost” saga, another ironic reference as the direct opposite of the popular Desmond-centric “The Constant” episode. “The Variable” is also the title of an upcoming episode!

The beauty of all of it is that both science and faith are important to understand the mechanics of it all. Locke’s faith, and Jack’s scientific disbelief fit perfectly, as this theory entertains both the destiny/fate element in the show (that Locke’s so fond of), and the scientific/technological point of view that Jack will ultimately unveil as being behind it all. So both of the two lead characters are right. And both are wrong, by being blindly devoted to abstract notions (Locke), or disturbingly close minded (Jack).

Butter-smooth slow motion

The following tutorial shows you the best way to get as smooth slow motion video out of your footage. It’s a bit involved, but it’s worth it if the slow motion scenes of your videos are central to what you are trying to show (e.g. skateboarding slow-mo). This method uses the bob+weave de-interlacing algorithm that makes 50i or 60i interlacing streams to become 50p or 60p (progressive), before we slow them down. This way, the slow-motion algorithms have more frames to work with, therefore creating a smoother slow-mo effect similar to what some get from expensive high-frame rate cameras. Here’s how this 60p method looks like, compared to the default slo-mo methods of Sony Vegas:

Sony Vegas can do this too, but it requires a train of thought that most users don’t know about. So, if you want to use the more complicated but video editor-agnostic AviSynth/VirtualDub method, use the one directly below. If you want to use the easier Sony Vegas-only method, go to the bottom of the article.

Preparation (needed for both methods)

1. For footage that you know you want to slow-mo later, record at the highest frame rate that your camera is capable of (e.g. 50i or 60i for most camcorders), and at high shutter speed. Anything between ~1/300th to 1/1000th is good. If your camera does not have shutter speed manual control, then you are using the wrong tool for the job.


Method 1: Software setup (needs to be done only once)

1. Install the stable 2.5.7 version of the AVISynth application. Follow the default options during installation. Once it’s installed, you can safely delete its downloaded installation file.

2. Download the DGIndex application. Unzip that downloaded .zip file, select all files and folders in it, and drag-n-drop them on C:\Tools\DGIndex\ (create the folders if they don’t exist). From within that last folder, copy the file called “DGDecode.dll” and paste it on the C:\Program Files\AviSynth 2.5\plugins\ folder (make sure you do a “copy” and not a “move”). You can delete that downloaded .zip file now.

3. Download and unzip the MPASource plugin. Inside that zipped folder, you will find a file called mpasource.dll. Drag-n-drop that .dll file on the C:\Program Files\AviSynth 2.5\plugins\ folder. You can safely delete that downloaded .zip file now.

4. Download the Lagarith lossless codec. Unzip that downloaded .zip file, and drag-n-drop on your desktop the two files that their names are starting with the word “lagarith” (these are: lagarith.inf and lagarith.dll). Right-click on the file that’s called either plainly “lagarith” or “lagarith.inf”. From that right-click menu select “Install”. After about 10 seconds, the Lagarith codec will be installed. You can safely delete the two lagarith files from your Desktop, and their downloaded .zip file.

5. Download VirtualDub from here. Unzip that downloaded .zip file, select all files and folders in it, and drag-n-drop them on C:\Tools\VirtualDub\ (create that folder if it doesn’t exist). You can delete that downloaded .zip file now.

6. Download the Smooth Deinterlace plugin for VirtualDub. Unzip that downloaded .zip file, select all files and folders in it, and drag-n-drop them on C:\Tools\VirtualDub\plugins\ folder. You can delete that downloaded .zip file now.

7. In a text editor, type the following (just copy/paste it from below). Then save the above script file on C:\Tools\ with the name “avisynth.avs” (make sure its suffix is .avs and not .txt).
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
MPEG2Source("F:\Tools\Videos\XXXXX.d2v")
ConvertToRGB(matrix="rec709")
SeparateFields()

Method 1: Procedure

1. Double-click to load the C:\Tools\DGIndex\DGIndex.exe file. Select “File”, “Open”, change the “Files of type” to “All Files”, select the .M2T HDV file you want to open, and press “Open”. Click “Ok”. If a “Warning! Opening GOP is not closed” error message appears, ignore it. Then click “Video”, then “YUV->RGB”, and then “TV Scale”. Then, press “File”, “Save Project”, and save this .d2v file on C:\Tools\Videos\ (create the folder if it doesn’t exist). When the dialog says “FINISH” you can close down DGIndex.

2. Load the C:\Tools\avisynth.avs file with a text editor, and replace the XXXXX word with the file name of the d2v file that DGIndex produced above in the C:\Tools\Videos\ folder. Each time you work on a different video file you need to manually replace the filename inside this avisynth script file. Save the file.

3. Double-click to load the C:\Tools\VirtualDub\VirtualDub.exe file. Then click “File”, “Open video file”, and load the C:\Tools\avisynth.avs file. Click “Video”, then “Frame rate”, and make sure that it reads “59.940 fps” for your NTSC footage (or 50 fps if you are on PAL). Click “Cancel” to discard that dialog. Click “Video” again, and then “Filters”, then “Add…”. From the list, select the “deinterlace – smooth v1.1” option, and click “Ok”. Click “Ok” in the new dialog to load the plugin, and then “ok” again to discard the Filters dialog. Now, click “Video” again, and then click “Compression”. From the long list, select the “Lagarith lossless codec” and then click “Configure”. Select “Use Multithreading” if you are using a somewhat modern PC, and then select either the “RGB (Default)” mode or the “YUY2” mode. The RGB one has a tiny bit better quality, but it creates 2-3 times the filesize. We are talking about GBs per minute here, so you need to make sure you have a lot of free hard drive space! Click “Ok”, then “Ok” again.

4. If you want to slow-mo only parts of your .m2t HDV file, then you can set “start” and “end” points on VirtualDub. Move the slider in the VirtualDub timeline on where you want the starting point to be, and then click “Edit” and “Set selection start”. Then move the slider to the finishing point, and then select “Edit” and “Set selection end”. This is now marked with a blue-ish color, and if you attempt to render out, it will only render that part of your video. If you want to render out the whole thing, just go directly to the rendering part: select “File”, “Save as avi”, give it a filename of your choosing, and save on a folder that it’s easy to find back. After a while, you will be having a big .avi file. You can now safely close down VirtualDub.

5. Load Sony Vegas. On Vegas, it’s very important to have the right project settings before you start editing. From the File or Project menu select “Project Properties”, and a new dialog will pop up. In there, click the right outmost icon called “Match Media”, the one that looks like a yellow folder. From there, select the .avi file produced on step 3, and click “open”. Vegas will now automatically fill up most of the project settings for you, after analyzing the video file you picked. You will notice that the frame rate is reading either 59.940 (NTSC) or 50.000 (PAL), and it’s progressive! Finally, do a few changes manually to that dialog: For the de-interlacing option select “interpolate”, and for the Quality option select “Best”. You can save a new template with these settings (e.g. name it “slow-motion”), so each time you start a new project with the same kind of footage, you can just pick it from the list! So, after your project settings are set, click “Ok”.

6. Now bring that huge .avi file on the Vegas timeline. Slow-motion it the way you want to (there are three ways to do slow-mo on Vegas, pick any — and if you don’t know what I am talking about, read its help files). When you have it slow-mo in the timeline, right click on the clip, click “Switches”, and then “Disable resample”. Now it’s ready to render it out. Select “Project” or “File”, and then click on “Render As”. Select the “Video for Windows (avi)” in the “Save as type” option, and then click “Custom”. In the new dialog that poped up, select “Best” for “Video rendering quality”. In the second tab named “Video”, select the following options: 1440×1080 frame size, 29.970 (NTSC) or 25 (PAL) or 23.976 (film) frame rate (export at the same frame rate as your main project this clip will be incorporated into), “None (progressive scan)” field order, 1.3333 aspect ratio, and then select either the Cineform or the Lagarith option from the “video format” menu (any will do, although Cineform is faster and smaller). Then click “ok” to close this dialog window. Finally, give a filename to your “Render As” dialog (e.g. slowmotion.avi), and click “Save” to save it in a folder that you can easily find back. After a while, the video will be ready.

7. Now, bring that slow motion avi file to your main Sony Vegas project! If Vegas doesn’t recognize the file as progressive (some Cineform files are not recognized as such), then right click on the clip in the Media Bin (before is dropped in the timeline), and click “Properties”, and set its progressiveness in that dialog. Just make sure your main project is also correctly setup in the Vegas’ “Project Properties” dialog (your exported avi file above should have been exported at the same frame rate as your main project). Now, edit as you please and enjoy!

Method 1: Important Notes

1. If you are using AVCHD instead of HDV footage, you must buy CoreAVC’s Professional Edition decoder ($15). Install it, register it with the system, and then load its “Preferences” dialog, and disable de-interlacing (select “None”), and also disable “Aggressive de-interlacing” in there. Then, omit the first step about DGIndex in the procedure, and use this avisynth script instead:
DirectShowSource("C:\Tools\Videos\XXXXX.m2ts")
ConvertToRGB(matrix="rec709")
ComplementParity()
SeparateFields()

Replace the XXXXX.m2ts with the .m2ts or .mts filename you want processed. If your footage appears to be jumpy, remove the ComplementParity() line and retry. On step 5, you might want to be careful about the frame size you export (it might be 1440×1080 with aspect ratio 1.3333, or 1920×1080 with aspect ratio 1.000 — use the same size as Vegas auto-configured in the Project Properties dialog earlier). Every other step is the same as in my tutorial. BTW, I do suggest you buy CoreAVC Pro and not use the freeware AVCHD decoders, because they crap out the frame rate decoding, and so it becomes impossible to get good 60p out of them. CoreAVC Pro is cheap, and it’s worth every dime.

2. If you are using plain miniDV (DV AVI) footage, use this avisynth script instead:
AviSource("C:\Tools\Videos\XXXXX.avi")
ComplementParity()
SeparateFields()

Again, replace the XXXXX.avi with the right .avi filename of your video. If your footage appears to be jumpy, remove the ComplementParity() line and retry. Pay attention to the frame rate, resolution and aspect ratio you need to use & export from Vegas, depending if you are using NTSC or PAL, and if it’s widescreen or not. For widescreen miniDV footage you might need to manually set the right aspect ratio in the clip’s properties the first time you import it on Vegas (before you drop it in the timeline).

3. Audio is not included in the procedure described above. Not much of a point most of the times, but if you need it, use the following .avs script instead. You will have two XXXXX filenames to replace in that .avs file each time (one for the .d2v and one for the .mpa). Also, sometimes DGIndex craps out on the m2t files, and it creates shorter waveforms compared to the video, so this introduces an audio/video synch problem.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
video=MPEG2Source("F:\Tools\Videos\XXXXX.d2v")
audio=mpasource("F:\Tools\Tools\Videos\XXXXX.mpa")
AudioDub(video,audio)
ConvertToRGB(matrix="rec709")
SeparateFields()

4. Sony Vegas is not required to follow the tutorial. Any video editor that allows you to disable resampling (aka motion estimation/compensation), and let’s you define a progressive 50p or 60p timeline, it’s fair game. Such editors include Premiere, After Effects, FCP etc. iMovie, Ulead and most other basic editors that don’t let you define less popular frame rates won’t do though.

5. If you are using a 64bit variant of Windows, then you need to replace all instances of “C:\Program Files\” in the tutorial to become “C:\Program Files (x86)\”.


Method 2: Sony Vegas-only way

1. Load Sony Vegas. On Vegas, it’s very important to have the right project settings before you start editing. From the File or Project menu select “Project Properties”, and a new dialog will pop up. In there, click the right outmost icon called “Match Media”, the one that looks like a yellow folder. From there, select the video file you want to slow-motion, and click “open”. Vegas will now automatically fill up most of the project settings for you, after analyzing the video file you picked. Now, you need to do a few changes manually to that dialog: For the de-interlacing option select “interpolate”, and for the Quality option select “Best”. For frame rate use 59.940 for NTSC videos, or 50.000 for PAL videos. Then, change the field order to “none (progressive)”. You can save a new template with these settings (e.g. name it “slow-motion”), so each time you start a new project that’s destined to become slow motion, you can just pick it from the list! So, after your project settings are set, click “Ok”.

2. Load your file in the Vegas timeline. Make sure that resampling is set to “smart resampling” (in the clip’s properties dialog). Now it’s ready to render it out. Select “Project” or “File”, and then click on “Render As”. Select the “Video for Windows (avi)” in the “Save as type” option, and then click “Custom”. In the new dialog that poped up, select “Best” for “Video rendering quality”. In the second tab named “Video”, select the following options: 1440×1080 or 1920×1080 frame size (same as what Vegas used in your project properties dialog), 59.940 (NTSC) or 50 (PAL) frame rate, “None (progressive scan)” field order, 1.3333 or 1.000 aspect ratio (same as your project properties), and then select either the Cineform or the Lagarith codec option from the “video format” menu (any will do, although Cineform is faster and smaller — Lagarith’s installation procedure is detailed in method 1 above). Then click “ok” to close this dialog window. Finally, give a filename to your “Render As” dialog (e.g. slowmotion1.avi), and click “Save” to save it in a folder that you can easily find back.

3. Create a new project on Vegas. Use again the “Match Media” function on Vegas’ Project Properties dialog, and select the new slowmotion1.avi file. Make sure field order is still “none (progressive)” and frame rate of NTSC 59.940 fps or PAL 50 fps (or just use the “slowmotion preset that you might have created in step 1). If Vegas doesn’t recognize the file as progressive (some Cineform files are not recognized as such), then right click on the clip in the Media Bin (before is dropped in the timeline), and click “Properties”, and set its progressiveness in that dialog. Then, drop the slowmotion1.avi in the timeline. Slow-motion it the way you want to. Then, right click on the clip, click “Switches”, and then “Disable resample”. Now it’s ready to render it out. Select “Project” or “File”, and then click on “Render As”. Select the “Video for Windows (avi)” in the “Save as type” option, and then click “Custom”. In the new dialog that popped up, select “Best” for “Video rendering quality”. In the second tab named “Video”, select the following options: 1440×1080 or 1920×1080 frame size (same as what Vegas used in your project properties dialog), 29.970 (NTSC) or 25 (PAL) or 23.976 (film) frame rate (export at the same frame rate as your main project this clip will be incorporated into), “None (progressive scan)” field order, 1.3333 or 1.000 aspect ratio (same as your project properties), and then select either the Cineform or the freeware Lagarith option from the “video format” menu (any of the two will do, although Cineform is faster and smaller — Lagarith’s installation procedure is detailed in method 1 above). Then click “ok” to close this dialog window. Finally, give a filename to your “Render As” dialog (e.g. slowmotion2.avi), and click “Save” to save it in a folder that you can easily find back. After a while, the video will be ready.

4. Now, bring that new slowmotion2.avi file to your main Sony Vegas project! If Vegas doesn’t recognize the file as progressive (some Cineform files are not recognized as such), then right click on the clip in the Media Bin (before is dropped in the timeline), and click “Properties”, and set its progressiveness in that dialog. Just make sure your main project is also correctly setup in the Vegas’ “Project Properties” dialog (your exported avi file above should have been exported at the same frame rate as your main project). Also, in the final edit prefer “interpolation” as the de-interlacing algorithm, and don’t forget to disable resampling on all clips in the timeline. Now, edit as you please and enjoy!

Method 2: Important Notes

1. To use the Vegas method with miniDV footage, you need to change all resolutions and aspect ratios mentioned in the tutorial to mirror your camera’s format. E.g. MiniDV NTSC Widescreen would be 720×480 with aspect ratio 1.2121. For the rest of the combinations Vegas has the info you need if you look hard enough.