Convert videos to 60fps (Updated 24 Feb 2015)

Sections:

Introduction:

Many modern TVs now include an extra frames feature, usually either 120Hz or 240Hz. This just means they take the source video, which is usually between 24-30FPS, and add new, interpolated frames between the original frames that make the motion look much more smooth.

High framerate (HFR at 48fps) was used in The Hobbit and will be used in upcoming films like the Avatar sequels, so why not watch all your movies at higher framerates?

A lot of people don’t realize this, but 99% of TVs made before this feature was introduced are actually capable of displaying 50FPS and 60FPS, and of course most LCD monitors display 60FPS as well.

This tutorial will allow you to convert videos of any framerate to higher framerates; 25FPS becomes 50FPS and 24/30FPS becomes 60FPS by default, or you can specify whichever framerate you want.

This script offers greater quality than any televisions I have seen.

I’m sure many people will want to see how well this script works, so here’s a comparison:
Original File
Converted File

Note: This can now be done in realtime using Universal Media Server!

Purpose:

This post provides instructions on how to easily convert any video to 60FPS, which allows you to take advantage of this feature of modern TVs on your computer monitor or TV without actually buying anything.

Step 1:

The files needed for this step are found in this zip folder (~3MB).

Run and install the file AviSynth.exe.
It is an early version of AviSynth 2.6 that is more stable and faster for multithreading than 2.5 releases.

Download and install MeGUI, run it, let it update all the things it wants to and import all of the presets.

Optional Tip: If you want MeGUI to update to the very latest stuff (at your own risk) you can push ctrl+s, go to the Extra Configuration tab, and in the Auto Update section select “Use development update server”

Close MeGUI and extract the files in the tools folder from our zip file into your MeGUI tools folder, which for most people will be either C:\Program Files (x86)\MeGUI\tools\ or C:\Program Files\MeGUI\tools\.

Step 2:

Download and install MKVToolnix.
When that is installed, run MKVMerge (Start Menu -> All Programs -> MKVToolnix -> mkvmerge GUI).

You will also need codecs installed. If you don’t already have them I recommend K-Lite Mega Codec Pack. If you install K-Lite, make sure to select “Profile 9: Lots of Stuff” during installation.

Step 3:

Start MeGUI again. You should be left with a window that looks similar to this:

step3

Step 4:

Push ctrl+r, or go to Tools -> AVS Script Creator.
Now you should see something like this:

step4

Step 5:

Click the Config button next to Avisynth profile.
It should look like this:

Step 6:

Click the New button down the bottom and type 60FPS in the name box, so it should look like this:

Step 7:

Now for the script that will do the actual 60FPS conversion.
Just copy and paste the following code into the text input area.

Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Cores=4)

Important note #1: Make sure the path on the third line is correct.
For example, if you are running 32-bit Windows, you will need to modify the path to “Program Files” instead.

Important note #2: You should change the number “4” in the script (on lines 2 and 13) to your number of CPU cores. If you don’t know how many cores your CPU has just Google your CPU and you should be able to find the specs somewhere, or 4 should be fine anyway.

Important note #3: If you have a video card, you can increase the speed and quality of the script by adding “GPU=true” to the script.
So InterFrame(Cores=4) would turn into InterFrame(Cores=4, GPU=true)
If you do this, you may also need to go into your MeGUI tools folder (usually C:\Program Files (x86)\MeGUI\tools\x264) and rename the file opencl.dll to opencl.dll.bak. This will let MeGUI use the version of opencl.dll that your video card drivers have installed, instead of the generic one from MeGUI.

Important note #4: This script always outputs either 50FPS or 59.94FPS (60FPS) for compatibility reasons. If you want to always double the framerate instead, so that for example 23.976FPS turns into 47.952FPS (48FPS), you can use the “FrameDouble” parameter.
So InterFrame(Cores=4) would turn into InterFrame(Cores=4, FrameDouble=true)

So now your window should look similar to this (with different text):

Step 7

Step 8:

Click the Extra Setup tab and make sure “Prefer DSS2 over DirectShowSource” is checked.

Optional tip #1: You might also want to choose your preferred resizer. For aspect-ratio changes (like from 720×576 to 720×480) a neutral filter like Spline36 will be nice. For actual resizing (like from 1920×1080 to 1280×720) a sharp filter like Spline64 will be best. I usually just leave it on Spline36. Make sure to untick the checkbox on the option after you change the default resizer, otherwise it will always be used by default which is often unnecessary.

Optional tip #2: I recommend changing the “MOD value used for resizing” to mod4. This gives the best balance between compatibility (a lot of devices like PS3 don’t have good mod2 support) and aspect ratio accuracy (the higher the MOD value, the more likely the aspect ratio is to be skewed more heavily).

Now it should look something like this:

Step7rev3

Then just click the Update button then the OK button

Step 9:

Now we’re back to the AviSynth script creator window and now that we have our 60FPS AviSynth template made and selected, it’s time to choose which video we want. Just click the button next to Video Input up the top of the window and find your video, then click Open.
A window will pop up with buttons, click the option on the right, usually either “DirectShowSource” or “AviSource”.
A window will pop up to show you the video, you can just close that.
Now you should see something like this:

Step9

Step 10:

Click the Save button. The video preview window might pop up again, you can close it again.

Step 11:

Now is the time when you need to choose the quality of the video and audio.

If you don’t know what to do here, something quick and easy is to just use CRF, which means you let the codec decide on the bitrates itself. So you can click the “Config” button next to the “Encoder settings” dropdown when you have a x264 option selected, then just enter a number between 16-20 in the “Quality” input box. 16 means your video will be almost exactly the same quality as the source, while 20 will look good too while taking up less space. Personally I use 16 for everything because why not? :)

So when you have your quality, click Queue in the Video encoding section.

Step 12:

Now your video is ready for conversion.
Now just go to the Queue tab and click Start down the bottom, then wait for it to finish.

Step 13:

The final step is to add your audio and/or subtitles from the original file to the converted file. This process uses muxing, not conversion, so there is no quality loss.
For this we will use the program we installed earlier, MKVMerge.
So run that and drag the converted file into that program, then do the same with the original file. If you can’t drag them on, you can use the add button instead.
Now you have several items in the Tracks, chapters and tags section. You just need to untick the ones you don’t want. Usually you will want to leave them all selected except for the original video track, as I’ve done in the following example:

Finally, set the Output filename down the bottom of the window and click Start muxing.
When that is done, you have your final video!

Final Thoughts:

This might seem like a long process, but actually it is only long once. Since we have now made templates, the process for the videos from now on will be much faster; instead of entering the script each time, now you can just make sure your 60FPS AviSynth script is selected.

This file can now be played just like any other video. I personally watch videos on my TV which is linked up to my computer using the awesome, free program called Universal Media Server, and that handles these 60FPS videos perfectly with no configuration.

Any comments are appreciated. If you can think of an improvement to the script, or to the process, or if you just found it useful and want to say thanks, please do leave a comment. I would love to know that it’s being used.

If you want to donate to help me with server costs and time spent keeping this article updated, you can do so here with my thanks :)





FAQ:

  • How can I fix random crashing of vfw4x264.exe?
    This probably means you are encoding a file using an input mode other than DSS2, which can happen if the clip is .m2ts or .dga (blu-ray) or another uncommon format.
    You can fix it by changing the 2 in the second line of the script to either 3, 4, 5 or just removing that line (try them in that order, since the options get progressively slower)
  • The option “Prefer DSS2 over DirectShowSource” is disabled. or
    I get an error like “can’t load avss.dll”.
    This means your computer is missing Haali Media Splitter. You can download it here or as part of a K-Lite Mega Codec Pack and the error should go away after you install it. If you install K-Lite, make sure to select “Profile 9: Lots of Stuff” during installation.
  • The file stops encoding after 99%.
    This usually indicates a codec configuration issue. Try installing/reinstalling K-Lite Mega Codec Pack, and make sure to let it select its preferred defaults (not “quick upgrade”)
  • Can I customize the output framerate to make it 48FPS, 75FPS, 120FPS, or anything else?
    Yes, you can choose any framerate you want. It is best to choose a framerate that is divisible in some way with the original video, but even that is your choice. You just need to add the options “NewNum” and “NewDen”, like this:
    InterFrame(NewNum=48000,NewDen=1001)
    NewNum stands for “New Numerator” and NewDen stands for “New Denominator”. In general, with NTSC material the NewDen should be 1001 and the NewNum should be 1000x your desired framerate (so for 48FPS you want 48000 and 1001) while for PAL content you might just want something like NewNum=75,NewDen=1 to output 75FPS content.
  • The output seems choppy, can I make it smoother?
    Yes, by default we output a video that sacrifices a little smoothness in order to reduce errors, but different people’s eyes pick up on different things so it can all be a matter of taste. You can try the InterFrame “Smooth” tuning, like this:
    InterFrame(Tuning=”Smooth”)
  • Why isn’t the GPU being used much in GPU mode?
    Only some things are done with the GPU in GPU mode, it’s still mostly done by CPU but helped by GPU.
  • Why is the video still the original framerate after running it through MKVMerge?
    You probably selected the wrong tracks in MKVMerge so you’re getting the original video track instead of the new one; make sure you untick the original video stream before muxing.
  • Why does MeGUI give an error “SVSmoothFPS: unable to load library given in ‘compose’ […svpflow_gpu.dll]
    Try re-installing your video card drivers.
  • Why am I getting the error “SVSmoothFps: unable to load library given in ‘compose'” when I try to run the encoding process?
    Go into your MeGUI tools folder (usually C:\Program Files (x86)\MeGUI\tools\x264) and rename the file opencl.dll to opencl.dll.bak. This will let MeGUI use the version of opencl.dll that your video card drivers have installed, instead of the generic one from MeGUI.

Thanks:

Widezu69 for providing the original AviSynth script that I used as a base.
Fizick for MVTools, the library that does all the work, and SVP for the modifications to MVTools that make it even better for our purposes.
Everyone on various forums for their feedback, this is really a community effort.

Changelog:

24/02/2015:

  • Updated the instructions and FAQ

27/09/2014:

  • Updated InterFrame to 2.6.0
  • Added a tip about using framedoubling mode
  • Updated most images to reflect the minor changes to MeGUI
  • Minor improvements to instructions

22/07/2014:

  • Added more items to the FAQ

10/07/2014:

  • Added more items to the FAQ
  • Shortened the changelog to only the latest 3 changes by default

20/05/2014:

  • Updated instructions
  • Added more tips
  • Added to and updated the FAQ
  • Updated the link to MKVToolnix to always point to the latest version

Click here to display the rest of the changelog

1031 Comments

  1. Thanks again for the reply, SubJunk! I’ll try that next time I encode in HFR, and I’ll report back if I encounter any issues.

    One last thing: would that “Smooth” option increase the time it would take to encode the video? Would it also have to sacrifice some FPS? Thanks!

  2. 1 year later, IT STILL DOESN’T WORK and I’m on a new PC, LoL. I get the same old error message, saying it can’t find what ever avs file or it can’t open the video stream.

  3. can please paste the script for the 120fps convertion

  4. Hi! I was wondering if there was a way to automate this process as I have a large media library which I’d like converted but repeating myself for each and every video is tiresome I’d much rather leave my PC running a mass conversion overnight. Could this be possible?

  5. Sven Erik Elfgren

    January 25, 2015 at 10:17 pm

    I actually managed to follow the description above and managed to convert some HD 25p mp4 clips to HD 50p mp4 clips! I even managed to
    convert an 4k 25p mp4 clip to 4k 50p mp4 clip. I also did conversion from HD 50p mp4 to HD 200p mp4 that I then used in my editor to get
    real good slow motion playing the 200p at 50p. HOWEVER I only managed to do this on small clips that is less then 30 to 50 Mb. If Itry to do anything larger the progress stops at about 96% and never finnish. Is there anything I can do about this ?
    Best Regards
    Sven Erik Elfgren

  6. 1000th comment *yay*

    anyway, I have the same issue as @DJ, and I can assure you I *am* clicking the Queue button. Any ideas? Thanks!

  7. ^^; nevermind! I could have sworn you wrote to click the Queue button at the bottom. I realized there’s one higher up, and it does work. Seems like after months I finally got this to work!

    Things that helped me:
    – Installing the Codec Pack w/ option 9, leaving other options default
    – renaming the Haali plugin folder for MeGUI
    – THEN installing Haali, because the DSS2 option does not appear otherwise (you’ll find Haali’s own download ends up much bigger than the one from the Codec Pack)
    //
    – if MeGUI keeps saying there are updates (infinite loop), this likely prevents it from working (run MeGUI->update->restarts itself->update->restarts itself->etc)
    – I’m unsure how, but this time I did not have it go on an infinite loop, but only crash a couple times and glitch out a lot -> DO NOT worry, apparently this can be a positive thing cause it now works for me!

    that’s about it, I think. I did run all the programs as admininstrator, which may be important. (didn’t do that for the installers actually)

    I still have to see if the outcome works fine, but at least I got past all the errors.. after my 60f obsession started upon seeing this post in October or so :D

  8. The result was really nice (TY <3) but it took like 1+ hour for a 20min episode
    My specs are i7 4790k 4.4Ghz and Gtx 980. I find this to be really long. Suggestions?

  9. I encoded for the first time a video in 1080p ( don’t know if this matters) and I sometimes get buggy effects at the border of fast moving objects in the video. Do you have an idea on how to fix that or is it normal that this happens?

  10. THANK YOU for this guide. I had been looking for a clear and concise instruction set to do my own interpolation of video movies. The ones I happen to find and download looked great but the selection was small. I had previously tried using “on the fly” (real-time) conversions but wanted to actually do some re-encoding. My first project (dark knight in 1080) took a LONG time to convert, but that was because I was only using a dual-core. Since I am now starting to build a nice 6 core, I am sure the processing time will be cut at LEAST in half. If you ever decide to update this thread with newer software ideas, tips, etc. I would appreciate it. I will bookmark this page and check back once in awhile. Again, thank you for all the info you have provided, it really is appreciated.

  11. Your guide is great! It is much better doing this than watching the PC struggles with real time playback using SVP!
    I just have a little problem here. The option “Prefer DSS2 over DirectShowSource” in my MeGUI is still greyed out after I’ve installed K-lite Codec and set to Profile 9. However, everything still works fine without it.
    Is there anyway I can pause the encoding process and resume it? I was encoding a movie and watching a video on Youtube at the same time then the PC crashed and restarted. When it’s back on, i tried to start the job again, but it just either start from beginning or skip.
    Luckily i had the chance to watch the first half of the movie and it was incredible! Great work!
    However, although most of the movie looks good, there are some fast moving scenes that have a “ghost-like” or “force field like” effect following the previous scene. Like for example an aircraft descending will have its shadow behind. Is there any other options that i could change to make the video look smoother so i can get rid of this “ghost effect”? I’ve already chosen, FrameDouble=true, Tuning=”Smooth”; on x264: Set Quality to 16, Medium Preset, Tuning: Film, Target Playback Device: Bluray and the rest of the settings is just like you’ve instructed.
    Thank you very much for your work!

  12. SubJunk

    February 16, 2015 at 11:02 am

    @Greg you can try using different tunings like Tuning=”Smooth” :)

  13. SubJunk

    February 16, 2015 at 11:04 am

    @Killy check the FAQ for the solution :)

  14. SubJunk

    February 16, 2015 at 11:06 am

    @bigg tito just add NewNum=120000, NewDen=1001

  15. SubJunk

    February 16, 2015 at 11:06 am

    @Lex there’s a GUI that I believe can automate it further, called InterFrameGUI

  16. SubJunk

    February 16, 2015 at 11:13 am

    @Sven if the progress stops near the end it’s a codec configuration issue. I recommend installing K-Lite Mega, and when installing you can go into the options and select which program will be used to decode the filetype. So if you are having issues with MP4 files, change the MP4 decoder during installation.

  17. SubJunk

    February 16, 2015 at 11:15 am

    @MicaLovesKPOP thanks for all the notes :)

  18. SubJunk

    February 16, 2015 at 11:16 am

    @Helikot @Евгений you can always either use faster encoding settings for x264, or even use a faster encoder like XviD which is also supported in MeGUI.

  19. SubJunk

    February 16, 2015 at 11:18 am

    @Denny there will always be artifacts but try using Tuning=”Smooth”

  20. SubJunk

    February 16, 2015 at 11:26 am

    @Jrazm sorry, there’s no way to pause it, maybe MeGUI will add that option in the future but I doubt it. Unfortunately there will always be artifacts in fast moving scenes

  21. Is there a way to do this via script, (command line) without any GUIs ?

  22. http://puu.sh/g0rex/dd8058ce75.png

    I keep getting this error no matter what I do, have any suggestions?

  23. Hello,
    1. Thanx for the very nice Tutorial ! :-)

    2. Because of some artefacts during fast moving in film i try the Setting “Tuning=smooth” .
    It looks so:
    InterFrame(Cores=4,GPU=true,Tuning=”Smooth”)

    but i get the message ” Unknown command”, what have i done wrong ?

    Thx. Thomas

  24. Thank you for writing this guide! I was able to successfully convert my 30FPS Monster Hunter video to run at 60FPS and it looks fantastic!

  25. SubJunk

    February 24, 2015 at 10:59 pm

    @Slider sure, you could use FFmpeg or MEncoder instead of MeGUI. Those tools allow AviSynth scripts to be used in place of video files so it should be straightforward :)

    @Kal I need to see your script in order to see what’s going wrong :)

    @Thomas Bruns make sure you use regular quotation marks instead of slanted ones (use ” instead of ”) :)

    @LagunaBlade thanks for the feedback, I’m glad it worked well :)

  26. Hey SubJunk,
    I really need your help with this :(
    It’s been a few months since I started this smoothy conversion method and it worked perfectly since, but now most of them get this frustrating error in mkvmerge whenever I try to mux the dts (only) from the original video with the converted (video only) file, like this one:

    “video.720p.mkv: Error in the Matroska file structure at position 4010858. Resyncing to the next level 1 element.
    The last timecode processed before the error was encountered was 00:00:19.978000000.
    Resyncing successful at position 4782373.
    The first cluster timecode after the resync is 00:00:25.025000000.”

    Now, when the video reaches the defective minutes, the picture freezes with continuous audio until the point of the first cluster timecode arrives!
    I tried reinstalling all the required tools and even encoded on another USB HDD but nothing has changed!
    The only thing I can do to avoid this error is to convert the video several times until mkvmerge finishes without any troubles.
    However, the result is kinda unstable when it played eventually since the problem is mostly related to MeGUI encoding procedures which is effected by something somehow.
    One more thing, can I increase “Setmemorymax(512)” value to 5120 since my RAM is 16GB and I have enough free memory in standby mode.
    Any help would definitely make my day :)
    Thanks a lot!

  27. SubJunk

    February 28, 2015 at 6:27 pm

    @Salaam does installing an older version of MKVToolnix fix it?

  28. @SubJunk
    Haven’t tried that yet but I think it started to happen on the same version 7.x that worked fine before!
    I’ll give that a try today for sure.

  29. @SubJunk
    Well, didn’t work with the old versions either! :(

  30. @RAfael – Try removing both “SetMTMode” lines from the script, that solved the “can’t read the video stream” errors for me.

Leave a Reply

Your email address will not be published.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2015 Spirton

Theme by Anders NorenUp ↑