VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Mar 2015
    Location
    Italy
    Search Comp PM
    Hello all,
    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

    Code:
    ffmpeg -i millipede.mts -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 320k -deinterlace -s 1440x1080 millipede.avi
    and the millipede.avi is looking good.

    I slowed down the .avi with this avisynth script

    LoadPlugin("mvtools2.dll")
    AVISource("millipede.avi").Killaudio()
    ConvertToYV12()
    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))
    AssumeFPS(29.97)
    and saved to mp4 with:

    Code:
    avs2yuv millipede2.avs - | ffmpeg -f yuv4mpegpipe -i - millipede-slow.mp4
    The problem I am not satisfied with the result, some portions of the output video have too many glitches.

    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?
    Quote Quote  
  2. 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.
    Quote Quote  
  3. 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)
    Quote Quote  
  4. 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:

    Code:
    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)
    The trim was to remove some junk frames that ffVideoSource() introduced at the start.
    Image Attached Files
    Last edited by jagabo; 27th Mar 2015 at 18:58.
    Quote Quote  
  5. 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...
    Image Attached Files
    Quote Quote  
  6. Member
    Join Date
    Mar 2015
    Location
    Italy
    Search Comp PM
    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

    thanks!

    Alessandro
    Quote Quote  
  7. Originally Posted by jagabo View Post
    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........
    As you suggested, adding level =3 to the script works really well on the errors in the 'segments' on the millipede's back.
    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........ ??
    Quote Quote  



Similar Threads