I am trying to make a slow motion video, starting from a video of a millipede I captured.
First thing I tryied, I uploaded the video to youtube and used the "slow motion" effect. This is the resulting video, and you can see there is a "stop and go" effect every second or so, the video is not fluid https://www.youtube.com/watch?v=ElkdidU4N9o
Second thing I tryied, slowing down the video with avisynth.
I converted from .mts to .avi with ffmpeg
and the millipede.avi is looking good.Code:ffmpeg -i millipede.mts -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 320k -deinterlace -s 1440x1080 millipede.avi
I slowed down the .avi with this avisynth script
and saved to mp4 with:LoadPlugin("mvtools2.dll")
super = MSuper(pel=2)
backward_vec = MAnalyse(super, overlap=4, isb = true, search=3)
forward_vec = MAnalyse(super, overlap=4, isb = false, search=3)
MFlowFPS(super, backward_vec, forward_vec, num=4*FramerateNumerator(last),den=FramerateDenomi nator(last))
The problem I am not satisfied with the result, some portions of the output video have too many glitches.Code:avs2yuv millipede2.avs - | ffmpeg -f yuv4mpegpipe -i - millipede-slow.mp4
Here's the original .avi (millipede.avi) and the slowed down .mp4 (millipede-slow.mp4): https://mega.co.nz/#F!ypYmXKTI!xOw7eSaIxCavPphoqhAU8Q
Can somebody tell me what I am doing wrong?
+ Reply to Thread
Results 1 to 7 of 7
The repetitive segments of the millipede are confusing mvtools. It's sometimes matching one segment to another. So instead of a small motion it thinks there's a large motion. Since your motions are small you can try limiting the motion search distance with the levels setting in mAnalyze(). I tried with levels=3 -- that got rid of the errors along the millipede's back. The legs still get messed up. Experiment with different values.
Last edited by jagabo; 27th Mar 2015 at 17:17.
I hadn't realised just how much of a difference that could make! Previously, I have just tried variations of the 'overlap' value, but levels seems to work much better on this kind of repetitive segment type problem... So thanks for suggesting that!
One other point, if i may?..What range can 'level' be used over? The MV tools notes merely seem to suggest keeping the value 'low'.
For many of the other parameters, they list the range of values, and the effects they might have.
But not for 'levels'.... is the range '1 thru 4', or '1 thru 16' or........ ??
Also try bob deinterlacing in the 1st step. You've dropped 1/2 the information by single rate deinterlacing in the AVI step. Motion estimation is more accurate when you have more data (frames are less "far" apart, motions are smaller, easier to predict thus fewer errors and edge morphing artifacts)
Ah, I didn't download the MTS file so I didn't realize his real source was interlaced. By all means, use a smart bob on the original source so you have more frames from which to interpolate motion, and fewer interpolated frames. This worked well:
ffVideoSource("millipede.mts", fpsnum=25000, fpsden=1000, seekmode=0) Trim(15,0) AssumeTFF() Yadif(mode=1) # double frame rate bob (25i to 50p) super = MSuper(pel=2) backward_vec = MAnalyse(super, levels=3, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, levels=3, overlap=4, isb = false, search=3) MFlowFPS(super, backward_vec, forward_vec, num=2*FramerateNumerator(last),den=FramerateDenominator(last)) AssumeFPS(29.97) BicubicResize(1280,720)
Last edited by jagabo; 27th Mar 2015 at 18:58.
I can't work out why the need to change the 25fps original to 29.97 fps ?.....
jajabo's idea to use levels =3 works well. Try changing the overlap from 4 to 2 - or even 0 - as I did for the attached version...
thank you very much for all your help, I will spend now a couple of hours trying to understand why it works tweaking these parameters