Personal WTF--atrocious scripting

  • One problem with FRAPS video is that even on fast computers, its often hard to get a full 30 FPS when recording video of games at high resolutions, especially for more recent games.  Additionally, stutters can occur too.  Since the framerate one gets is quite variable, this results in FRAPS duplicating frames relatively unpredictably and not in a manner that is easy to fix.

     So I decided to use the MVTools AviSynth plugin to use motion compensation to interpolate the intermediate frames, replacing duplicate ones.  Of course, it wasn't that easy: for one, MVTools crashed if it was used more than a few times in one script (nothing compared to the hundreds of times it might have to be called for one video!) because it was designed to not clear out its memory usage after being called, as in most cases MVTools is used as a single script-wide command rather than over and over in different specific cases.

    Here was my solution:

    [code]Minimal Cygwin environment
    -----runs a shell script that
    ----------runs a loop that
    ---------------assembles an AviSynth script that
    --------------------calls the main AviSynth script, trimmed to a small group of frames that
    ------------------------- calls the motion estimation function that
    ------------------------------creates the intermediate frames
    ---------------assembles a VirtualDub job script that
    --------------------is used by VirtualDub to assemble a single AVI file
    ---------------assembles a part of an AviSynth script that assembles all of the AVI files created by the loop
    ----------runs the aforementioned AviSynth script to assemble all of the AVI files[/code]

    If you want to see the program I can post it, but I think the program structure is self-explanatory.... 😉 


    (and yes, you can imagine how ugly the bash script is...) 

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.