How to get beautiful smooth slow-mo....

TheDeanster wrote on 12/14/2008, 1:35 PM
Hi guys - I'm working with the Sony Z7 (I love this camera). I'm curious to know what is the best settings for getting the best slow motion in post. Should I be shooting interlaced or progressive? Should I use a fast shutter speed? Right now I shoot 30P and I love this look. But when I slow it down for slow-mo on the timeline, it tends to be a little more jerky then I'd like. I plan to do some testing but I thought I'd get some starting points from you guys first!

My final output is for internet use only at 30P

Thanks!!!

Comments

farss wrote on 12/14/2008, 2:02 PM
Shooting 60i will give you more temporal data to work with. Yes, use a faster shutter speed. There's only one way to truly get good slomo and that's with a high speed camera. 150fps is the starting point for sports slomo.
You can also use interpolation to create tweened frames for slomo. I believe AviSynth can do this for free or these's expensive plugins for AE that also do it. Both would have to be render hogs and results variable depending on the subject.


Bob.
fausseplanete wrote on 12/14/2008, 7:08 PM
Also "MotionPerfect" (edit: originally) from DynaPel (edit: now apparently from Gooder Video http://www.goodervideo.com/products/MP.html). For DV I save to HuffYuv, for HD I save to Cineform.

Interpolated frames can sometimes be indistinguishable from reality, but sometimes they can give a "jellocam" effect, even from non rolling-shutter sources such as CCD cameras. Not "italic" but nevertheless "gooey" (jello seen from above?) . I guess the algorithms place the scene details on a conceptual "elastic fabric". Doesn't always happen and sometimes nevertheless the best tradeoff
johnmeyer wrote on 12/15/2008, 7:39 AM
For the ultimate in slow mo from a normal-speed camera (although I think your camera does provide 3 sec 120fps shooting, which is what I'd do, and then up-res the result, since the 120fps is done at lower res) use motion estimation software. Motionperfect, Twixtor, After Effects are the expensive ones. I use AVISynth with MVTools both of which are free and quite frankly do a better job than some of these others.

I then put the slow mo back on the Vegas timeline, along with the original footage which has been slowed down to the same speed using Vegas's slo-mo. I then look for those "jello" artifacts, and when I see them (they usually occur on picket fences, people walking and other moving, well-defined vertical objects), I use Vegas's bezier curves to let the Vegas slo-mo replace just those objects that have become distorted. If you have ten hours of slo-mo, this is probably too much work, but most of the time this is a 10-30 second clip, and this fix-up only takes a few minutes of work, especially because you don't have to be precise at all in making the Bezier mask (it is basically the same as making a garbage matte).
2G wrote on 12/17/2008, 5:19 PM
Do any of these tools work with HDV? I downloaded the trial version of MotionPerfect, and it doesn't recognize m2t files. I figure I could try renaming,etc. to see if it's just a file extension issue. But there is nothing said anywhere that indicates anything other than avi.

Likewise, I looked over the AVISynth info on the web site. I couldn't find a mention of HD.

I'd really like to get something to smooth out my slo-mo. But I'm shooting HD now.

Suggestions?
johnmeyer wrote on 12/17/2008, 8:05 PM
AFIK, Motionperfect hasn't been upgraded in a LONG time (five years or more).

AVISynth can handle anything; it just depends on what codecs are installed. You use MVTools. There are some very simple scripts (I can post one) that work pretty well, and then you can tweak from there. Twixtor is pricey, but I guess works well, although I was surprised at how many artifacts were obvious in their demos.
2G wrote on 12/18/2008, 7:01 AM
Thanks, John. I'm a programmer and I can learn AVISynth. However, t when I looked at the AVISynth web site, I wasn't really interested in learning a new programming language just to smooth out a couple of clips. Any canned scripts that you can post that's at least a starter turnkey process would be wonderful.

Thanks.
johnmeyer wrote on 12/18/2008, 9:36 AM
The documentation for MVTools does contain several starter scripts for doing slow motion. You have to get your head in the right place to understand the Russian programmer's way of thinking. To him, you do slow motion by increasing the frames per second. This is, of course, not correct using our conventions. However, he makes the assumption (which we would not make) that you will always play back at a fixed rate (25 or 29.97 fps). Thus, the examples talk about increasing to 50 fps (for PAL). This results in half speed when played back at 25 fps.

The sample scripts given in the documentation work fine, and are really just three lines. The first line compares the current frame of video to the previous frame, and develops "motion vectors" for each block of pixels, and tracks where they go from the previous frame to this frame. It is these vectors that will be used to synthesize a new frame (or frames) between the last frame and this one. The next line does exactly the same thing between the current frame and the next frame.

The third line simply takes that information and creates as many intermediate frames as necessary to create the total number of frames you want. You then typically put an AssumeFPS() statement after this to make sure that the resulting video header is set to the normal playback speed (23.976, 24, 25, or 29.97).

So, here's the sample from the documentation:

# assume progressive PAL 25 fps or NTSC Film 23.976 source
backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1)
source.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(source), den=FramerateDenominator(source), mask=0, idx=1)

The numerator and denominator are just variables that you set. Normally I just use the actual numbers. For instance to slow down to 50%, I double the frames. To do this for NTSC, the numerator is 60000 and the denominator is 1001. You do this because the script seems to like integers, and as I'm sure you know, the correct NTSC framerate is 30/1.001. If you scale this to eliminate the decimal, you get 30000/1001. And then you double that. For PAL, you just use 50 and 1 to double the speed.

Now, for interlaced video, you have to do each field separately. This is where many of the scripts get complicated, because they often deinterlace, do the slo-mo, and then re-interlace. So, the cheap, fast way is to just separate the fields, do the slo-mo and the put things back together. Slightly better is to use Bob. Best is to use one of the exotic deinterlacers available for AVISynth (and there are some great ones). Here's a commented script (this is actually my script) showing some of the options. Again, this is for interlaced video. I'm not sure why I used 30 fps instead of 29.97, but I think I adapted this from someone else's script and didn't change this part of it because when doing slo-mo, you won't be using the sound directly from the video, so who really cares? As you can see, if you comment out the separatefields, and then use bob instead, you can experiment to see if that produces better results. Also, since this is my script, I've included ALL the code, including the explicit load of the MVTools plugin (not needed if you configure AVISynth to use a common plugin directory), and also the command to load the video file you will be using as input to the slo-mo process. Note that in AVISynth you can either just pass one line to the next; or you can assign the output of one line to a variable and then, using that variable, feed that modified video to the next line. This in turn can be done either by putting that video as the first statement:

fieldvideo = source.separatefields()

OR

fieldvideo = separatefields(source)

loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools.dll") 

a=AVISource("K:\Coach Slo-Mo (input to slo-mo).avi")
# the following is for HDV, change to bff for DV
b=assumetff(a)
g=converttoyv12(b)

h=g.separatefields

#h=Bob(g)
vec_back = h.MVAnalyse(isb=true,truemotion=true, pel=2, idx=1)
vec_forw = h.MVAnalyse(isb=false,truemotion=true, pel=2, idx=1)

#"num" equals result of 30 fps times 2 times slo-mo factor
#e.g., 300 is 1/5 normal speed, not 1/10 (because of separatefields)

MVFlowFps(h,vec_back, vec_forw, num=300, den=1)

# converttoyuy2()

#Use the following when using bob
#assumetff().separatefields().selectevery(4,1,2).weave()
#assumebff().separatefields().selectevery(4,0,3).weave()

weave()
assumefps(29.97,true)


Here is a link to the doom9.org 51-page post on everything known about MVTools:

MVTools at doom9.org

Use the forum's "search this thread" feature to find information about MVFlowFPS, which is the feature of MVAnalyze that you will be using. The MVFlowFPS2, which is sometimes mentioned, has been dropped from the latest versions of MVAnalyze.

Most of the tweaking done in all the scripts you'll see posted are designed to improve the deinterlacing, or are done to create better motion estimation vectors. There really are no tweaks to MVFlowFPS; all the tweaks are to the MVAnalyze statements, mostly by changing the size of blocks analyzed, and the way in which those blocks are treated.

The ultimate is to use this to create "beautiful smooth slow motion," which it will do, and then put the result on the Vegas timeline above a track that has the identical video, slowed down by precisely the same amount in Vegas. Then, if the motion estimation fails (you will get grotesque melted video), you just us a bezier curve to cut out the portions of the video that have failed, and let the Vegas blended version show through in that one spot. The bezier mask doesn't need to be very precise or track very well, and is usually only 2-3 frames long, so this is a pretty quick fix. For ten seconds of slo-mo, you usually only have to do this in one or two areas, and it only takes 1-2 minutes per fix.



LReavis wrote on 6/5/2009, 12:12 PM
for those of us who are not into coding, this looks very interesting:

http://nerds-central.blogspot.com/2007/04/synthetic-slow-motion-with-avisynth.html
Jeff9329 wrote on 6/6/2009, 6:55 AM
That looks good, but I can get beautiful smooth slow motion out of 720P60 with no manipulation at all. Unfortunately Vegas dosen't handle 720P60 well at all at realtime speeds yet due to a bug. So you have to shoot the slomo footage specifically for slowmo.
Laurence wrote on 7/25/2009, 3:01 PM
I haven't had a chance to try it yet, but there is a VirtualDub motion estimation plugin http://www.freedownloadscenter.com/Multimedia_and_Graphics/Graphics_Palette_and_Compression_Tools/MSU_Motion_Estimation_VirtualDub_plugin.htmlhere.[/link]