You are on page 1of 5

Butter-smooth slow motion

Posted on Mon 9 Feb 2009 at 11:27 AM PST. Filed under Filmmaking, Software.

The following tutorial shows you the best way to get as smooth slow motion video out of your footage. Its a bit involved, but its method uses the bob+weave de-interlacing algorithm that makes 50i or 60i interlacing streams to become 50p or 60p a smoother slow-mo effect similar to what some get from expensive high-frame rate cameras. Heres how this 60p method looks like, compared to the default slo-mo methods of Sony Vegas:

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 (progressive), before we slow them down. This way, the slow-motion algorithms have more frames to work with, therefore creating

Sony Vegas can do this too, but it requires a train of thought that most users dont 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 have shutter speed manual control, then you are using the wrong tool for the job.

60i for most camcorders), and at high shutter speed. Anything between ~1/300th to 1/1000th is good. If your camera does not

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 its 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 dont exist). From within that last folder, copy the file called DGDecode.dll and downloaded .zip file now. 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

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 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.

names are starting with the word lagarith (these are: lagarith.inf and lagarith.dll). Right-click on the file thats called either plainly

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 doesnt 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 MPEG2Source("F:\Tools\Videos\XXXXX.d2v") ConvertToRGB(matrix="rec709") SeparateFields()

2.5\plugins\DGDecode.dll")

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 doesnt 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 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 fps if you are on PAL). Click Cancel to discard that dialog. Click Video again, and then Filters, then Add. From the list, 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 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 a while, you will be having a big .avi file. You can now safely close down VirtualDub.

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 rendering part: select File, Save as avi, give it a filename of your choosing, and save on a folder that its easy to find back. After

5. Load Sony Vegas. On Vegas, its 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 its 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 So, after your project settings are set, click Ok. (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!

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 dont 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 its ready to render it out. Select Project or File, and dialog that poped up, select Best for Video rendering quality. In the second tab named Video, select the following options:

then click on Render As. Select the Video for Windows (avi) in the Save as type option, and then click Custom. In the new 14401080 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 doesnt 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 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

Properties, and set its progressiveness in that dialog. Just make sure your main project is also correctly setup in the Vegas

1. If you are using AVCHD instead of HDV footage, you must buy CoreAVCs 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 deinterlacing 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 14401080 with aspect ratio 1.3333, or 19201080 with aspect ratio 1.000 use the same size as Vegas auto-configured in the 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 its worth every dime. 2. If you are using plain miniDV (DV

Project Properties dialog earlier). Every other step is the same as in my tutorial. BTW, I do suggest you buy CoreAVC Pro and not

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 manually set the right aspect ratio in the clips properties the first time you import it on Vegas (before you drop it in the timeline).

Vegas, depending if you are using NTSC or PAL, and if its widescreen or not. For widescreen miniDV footage you might need to

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 introduces an audio/video synch problem.

the .mpa). Also, sometimes DGIndex craps out on the m2t files, and it creates shorter waveforms compared to the video, so this

LoadPlugin("C:\Program Files\AviSynth video=MPEG2Source("F:\Tools\Videos\XXXXX.d2v") audio=mpasource("F:\Tools\Tools\Videos\XXXXX.mpa") AudioDub(video,audio) ConvertToRGB(matrix="rec709") SeparateFields()

2.5\plugins\DGDecode.dll")

4. Sony Vegas is not required to follow the tutorial. Any video editor that allows you to disable resampling (aka motion

estimation/compensation), and lets you define a progressive 50p or 60p timeline, its fair game. Such editors include Premiere, After Effects, FCP etc. iMovie, Ulead and most other basic editors that dont let you define less popular frame rates wont 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, its 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, automatically fill up most of the project settings for you, after analyzing the video file you picked. Now, you need to do a few 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 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 thats 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 clips properties dialog). Now its 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: 14401080 or 19201080 frame size (same as what Vegas used in your project 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 Lagariths installation procedure is detailed in method 1 above). Then click ok to folder that you can easily find back. 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 properties dialog), 59.940 (NTSC) or 50 (PAL) frame rate, None (progressive scan) field order, 1.3333 or 1.000 aspect ratio (same

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 doesnt 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 its 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: 14401080 or 19201080 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 or the freeware Lagarith option from the video format menu (any of the two will do, although Cineform is faster and smaller 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. (progressive scan) field order, 1.3333 or 1.000 aspect ratio (same as your project properties), and then select either the Cineform Lagariths installation procedure is detailed in method 1 above). Then click ok to close this dialog window. Finally, give a filename

4. Now, bring that new slowmotion2.avi file to your main Sony Vegas project! If Vegas doesnt 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), Vegas Project Properties dialog (your exported avi file above should have been exported at the same frame rate as your main 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 cameras format. E.g. MiniDV NTSC Widescreen would be 720480 with aspect ratio 1.2121. For the rest of the combinations Vegas has the info you need if you look hard enough. and click Properties, and set its progressiveness in that dialog. Just make sure your main project is also correctly setup in the project). Also, in the final edit prefer interpolation as the de-interlacing algorithm, and dont forget to disable resampling on all

6 Comments

Efren Gutierrez wrote on February 9th, 2009 at 2:37 PM PST: thanks for your articles, i am a vegas user, and always have been following your blog, thanks again from Mexico.

Marlo Casabar wrote on February 10th, 2009 at 2:26 PM PST: Great info, thank you so much! For some reason, using the Cineform codec caused the avi file to show these red and blue lines throughout the video. Fortunately, installing the Lagarith codec fixed the problem! Thanks you! Marlo

Brendan Pyatt wrote on February 12th, 2009 at 1:42 AM PST: Can you give me some tips for doing this on a mac? With FCP? Thanks. Good to see you posting on your blog again!!

Eugenia wrote on February 12th, 2009 at 1:03 PM PST: Sorry, I dont use FCP. But I have read online that one of the external tools of FCP (that comes with it) is able to do this, but I dont know the details. FCP itself cant do it though.

Graham wrote on February 12th, 2009 at 9:41 PM PST: Thanks Eugenia . excellent thorough and well drafted tutorial. BTW which, in your opinion, gives the best outcome Method 1 or 2? Graham New Zealand

Eugenia wrote on February 13th, 2009 at 12:31 PM PST: They are the same. If you are using Vegas, use the second method, so you dont have to jump colorspaces in the process.

You might also like