Editing the 'Slo-Mo'

..defining the slow motion characteristics

Home
Page
Setting up
Virtualdub
Converting
the Video
Installing
AviSynth
Using
AviSynth
Editing
the 'Slo-Mo'
Output
the Files

The clip below is a small section of the sample video posted on the Home Page...(There is no audio on this clip)...

..Sorry - your browser doesn't seem to support iframes..

The original camera clip was converted to HQX, and that new clip then opened in Virtualdub2.
As HQX is an intraframe format, all frames are now keyframes, and it is very simple to move along the timeline to identify the exact frames where you want your slo-mo to 'happen'.
For this clip, it was decided to run the clip at normal speed for the first 160 frames - then slow down by 5 times over the next 10 frames - then remain at this 5x speed reduction until frame 210.... A pick up in speed from frame 210 - and back to full speed by frame 260 until the end of the clip.
The AviSynth/MVTools script needed to perform those instructions is shown below...

You will see that this script is a lot more complex than the example shown on the previous Using AviSynth page...but, as already explained, most of it - the difficult part - is simply copied from a script found on the Doom 9 Forum, having been posted there by member 'lecapitan' in 2011....That's where the skill for this script lies....
(Not forgetting the MVTools authors as well of course - Manao, Fizick(Alexander Balakhnin), Tsp, TSchniede - the really clever guys!)..

All we are doing here is adjusting the values in the 'return Slowdn' line near the top of the script, to meet our selected requirements -

* Run the clip at normal speed for the first 160 frames: Slowdn(source, 0, 160, 1.0, 1.0)
* Slow down by 5 times over the next 10 frames: ++ Slowdn(source, 160, 170, 1.0, 0.2)
* Remain at this 5 times speed reduction until frame 210: ++ Slowdn(source, 170, 210, 0.2, 0.2)
* Pick speed from frame 210 until frame 260: ++ Speedup(source, 210, 260, 0.2, 1.0)
* Back to full speed from frame 260 until the end of the clip: ++ Speedup(source, 260, Framecount(source), 1.0, 1.0)


The more complex MVTools 'optical flow' frame interpolation work is carried out by the remaining script, which we can leave untouched if we wish. (There are other parameters you can change of course... depends on how involved you wish to get!..)

The end result of running that script through Virtualdub produces the clip below...(again, there's no audio on the clip)..

..Sorry - your browser doesn't seem to support iframes..


You can download that script by right clicking on the script window above and selecting - 'view frame source' - then right click again and - 'save as'. Save the file with a '.avs' extension.
Then copy the full path name - including the inverted commas - of your own HQX clip between the brackets the 'Source=AviSource()' line.. (remember - hold down the shift key.. right click.. and select 'copy as path' ).. then adjust the 'return Slowdn'() line values to suit your requirements...

Couple of extra points to note...
To run the script, first check it out with AvsPmod, as described in the previous 'Using AviSynth' page. Notice that unlike our earlier 'Dissolve' example, this one won't run in real time... MVTools creates a lot of new frames while processing the script. It's this 'optical flow' technique that makes it so much better than the simple frame interpolation normally found in consumer slo-mo techniques.
But that requires a lot of computing power, and can slow things right down.. even on a powerful machine..
So, once you know the script is OK (AvsPmod will confirm that for you) simply right click on the .avs file and choose 'Open in Virtualdub' from the menu.
You will then need to set Virtualdub up with some appropriate settings.. The easiest option is to select 'Video' from the top menu...then 'Compression' from the drop down menu and finally 'Grass Valley HQX' from the codec list... Then again from the top 'File' menu - 'Save as AVI'.
That will give you an HQX copy of your slo-mo file. What you do with that file we shall deal with in the final Output the File page.

One final point about this part of the process - Audio
When you output your new slo-mo file from the script, the audio will probably be all over the place!
Your new slo-mo video file will off course take up more time than the original clip, and although MVTools will have added appropriate new frames to 'slow' your clip down smoothly, it will not have processed the audio.
So there will be 'gaps' in the audio track. This - as with all other slo-mo processes - will require the audio to be edited separately - or ignored, if you prefer.
We shall deal more with this in the last Output the Files page....which you can go to by clicking on the header below, or at the top of the page...


Home
Page
Setting up
Virtualdub
Converting
the Video
Installing
AviSynth
Using
AviSynth
Editing
the 'Slo-Mo'
Output
the Files

© RJS 2021