[How-To] 120Hz "MotionFlow" effect in Media Player Classic

Discussion in 'Windows Applications' started by Petros, May 19, 2008.

  1. Petros

    Petros Thief IV

    Messages:
    3,038
    Location:
    Pacific Northwest
    [How-To] 120Hz "MotionFlow" framerate effect in Media Player Classic

    Did a lot of research and a lot of searching on the subject, here's what I found.

    1. First, if you have Media Player Classic installed, download and install FFDshow.
    2. Download and install AVIsynth
    (Alternatively to steps 1 and 2--and this is probably the best and easiest way--install a codec pack and make sure FFDshow and AVIsynth get installed as the default decoder for xvid/DVD/h.264)

    3. Download the DLLs for MVtools (found on the bottom of this page) and AVIsynth MT. Extract MVtools contents to the AVISynth\plugins folder and extract avisynth.dll over your originals wherever you have them (usually %windir%\System32).

    Open FFDshow configuration and check the AVIsynth box, adding this script: (thank you very much to Bahn Yuki and Sodaboy581 at AVSforums for these bits of genius)
    Code:
    source=ffdshow_source()
    SetMTMode(2,2)
    frn = int ( FrameRateNumerator(source) )
    frd = int ( FrameRateDenominator(source) )
    # If the denominator is 1, multiply the numerator by 1000
    frn = ( frd == 1 )  ? ( frn * 1000 ) : frn
    # If the denominator is 1, now change it to 1001
    frd = ( frd == 1 ) ? 1001 : frd
    # If the numerator is 2997 and the denominator is 125, change the numerator to 24000
    frn = ( ( frn == 2997 ) && ( frd == 125 ) ) ? 24000 : frn
    # If the numerator is 2997 and the denominator is 100, change the numerator to 30000
    frn = ( ( frn == 2997 ) && ( frd == 100 ) ) ? 30000 : frn
    # If the denominator is 125 and the numerator was changed earlier to 24000, change the denominator to 1001
    frd = ( ( frd == 125 ) && ( frn == 24000 ) ) ? 1001 : frd
    # If the denominator is 100 and the numerator was changed earlier to 30000, change the denominator to 1001
    frd = ( ( frd == 100 ) && ( frn == 30000 ) ) ? 1001 : frd
    # If the denominator is 1001, which is the only denominator MVTools seems to work with, multiply the numerator by 2.
    frn = ( frd == 1001 ) ? ( frn * 2 ) : frn
    # assume progressive PAL 25 fps or NTSC Film 23.976 source
    backward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1) : 0
    # we use explicit idx for more fast processing
    forward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1) : 0
    # If the denominator is 1001, return the MVFlowFPS version of the source, otherwise return the original source
    return (  frd == 1001 ) ? source.MVFlowFps(backward_vec, forward_vec, num=frn,  den=frd, mask=0, idx=1) : source
    Run your average AVI file and see some weird stuff...

    For those of you who run HTPCs and were thinking about spending the extra bux on a 120Hz TV, you might be able to save some money if this concept develops to a higher level and the scripts and libraries improve.

    I'm watching some old movies like this now and HOLY...

    Futurama looks so wrong
     
    Last edited: Jun 2, 2008
  2. hansrijf

    hansrijf sh! it stinks Folding Team

    Messages:
    277
    Location:
    Amsterdam, The Netherlands
    followed all your steps but I get a black screen in media player classic when running avi files, I get sound but no picture...
     
  3. Petros

    Petros Thief IV

    Messages:
    3,038
    Location:
    Pacific Northwest
    In the settings, I have "AviSynth" checked and "add FFDshow video source" unckecked. Checked YV12 and YUY2, but unchecked RGB24. Additionally, I have buffer back at "2" and buffer ahead at "24".

    I think someone in this thread was having the same problem for a bit.