Convert videos to 60fps (Updated 21 May 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.

Cores=4
SetMemoryMax(512)
SetMTMode(3,Cores)
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=Cores)

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 line 1) 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 improve quality by adding “GPU=true” to the script. However, it may make encoding time slower, so take that into account.
So InterFrame(Cores=Cores) would turn into InterFrame(Cores=Cores, 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=Cores) would turn into InterFrame(Cores=Cores, 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(Cores=Cores, 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 Smooth tuning, like this:
    InterFrame(Cores=Cores, Tuning="Smooth")
    Also, using GPU mode produces more accurate results and therefore should appear smoother, though it can be slightly slower overall. You can try it like this:
    InterFrame(Cores=Cores, GPU=true)
    Or try both options at once like this:
    InterFrame(Cores=Cores, Tuning="Smooth", GPU=true)
  • 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’ […svpflow2.dll]
    Try re-installing or updating your video card drivers, and if that doesn’t work then maybe your video card doesn’t support OpenCL so remove GPU=true from your script.
  • Why am I getting the error “SVSmoothFps: unable to load library given in ‘compose'” when I try to run the encoding process, but not when I preview?
    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.
  • Why am I getting the error “Error message for your reference: Can not read the video stream”?
    MeGUI can’t read from folders or files with certain characters, so try moving the video to a different folder and/or renaming the file.

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:

21/05/2015:

  • Updated InterFrame to 2.8.2, which improves speed

16/03/2015:

  • Corrected and improved the instructions and FAQ

05/03/2015:

  • Updated InterFrame to 2.8.0, which improves speed and lowers memory usage
  • Updated conversion script

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

50 Comments

  1. I still can’t open AVI files … Jesus this is harder as i thought i reinstalled all stuff but no success.

  2. @SubJunk
    http://www.uppic.org/image-31F9_55055891.jpg

    I thought this is a problem why someone copied your script and get message “Please make sure it’s a valid AviSynth script and that AviSynth is properly installed…… Error message for your reference : Can’t read the video stream”

    Please correct it.

  3. SubJunk

    March 16, 2015 at 6:31 pm

    @Salaam when you delete the InterFrame line you’ll also need to delete the SetMTMode(2) line, that should solve that issue. Not sure why resizing to mod16 wouldn’t solve that error, it sounds like a MeGUI problem, or the resizing was unsuccessful. What’s the script you used, and which version of MeGUI are you using? I’m on the development version 2525.

    @Darus thanks for the tip, I’ve added it to the FAQ now 🙂

    @Rady1993 check that the quotation marks are straight up and down, not slanted ones. If they are slanted then just use the normal ones on your keyboard.

    @nimda thanks a lot, I have corrected that now – WordPress was automatically converting the quotation marks.

    @TrueAndyyy what’s the error? I don’t have any issues with any files including avi

  4. Is there any way to get rid of or reduce the ghosting?

  5. is it possible to using 4k video input ? because when im using 4k video input, it get stuck after i hit the save button 🙁 *its going well when im using 1080p video input

  6. @SubJunk I’ve deleted both “InterFrame”, “SetMTMode(2)” lines which fixed MeGUI error but most importantly it also fixed mkvmerge errors! (you can review my previous posts if you need so)
    I’m using 2507 version of MeGUI and couldn’t update it to the development one after changing server source through its options.
    So, did you figure out what’s wrong? (fingers crossed 🙂 )

  7. @SubJunk Oh wait! After trying some more conversions to be sure, sadly the error showed up again in mkvmerge! (as it occurs occasionally for some reason)

    “Error in the Matroska file structure at position 1823043838. Resyncing to the next level 1 element.
    The last timecode processed before the error was encountered was 01:04:35.455000000.
    Resyncing successful at position 1824197496.
    The first cluster timecode after the resync is 01:04:42.962000000.”
    Maybe x264 Encoder is behind this?
    As for resizing to mod16 in order to use XviD Encoder, that didn’t fix MeGUI error either!

    Here’s my script before deleting the 2 lines:
    Cores=4
    SetMemoryMax(512)
    SetMTMode(3,Cores)
    PluginPath = “C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\”
    LoadPlugin(PluginPath+”svpflow1.dll”)
    LoadPlugin(PluginPath+”svpflow2.dll”)
    Import(PluginPath+”InterFrame2.avsi”)
    .ConvertToYV12()
    SetMTMode(2)

    InterFrame(Cores=Cores, GPU=true)

  8. @SubJunk Here’s the complete script as it got edited by your site:
    http://pastebin.com/U5c1ZCbJ

  9. @SubJunk Correction: Getting last mkvmerge error while deleting the 2 lines was due to the file itself as it worked with others without any error!
    So we’re back to the “InterFrame”, “SetMTMode(2)” theory.
    Sorry for the confusion!
    Many thanks 🙂

  10. Please, when i choose the video to convert, the program show me this message: “unable to render the file. You probably dont have the correct filters installed”. What i have to do? please help.

  11. @SubJunk
    Well i posted already the Error, i post it again but that doesnt help because there are no infos in the error.
    http://puu.sh/gtcfi/7cb1656da8.png
    http://puu.sh/gkDmL/1a4bc7c36c.png
    http://puu.sh/gkDkF/e9921ff025.png

  12. SubJunk

    March 22, 2015 at 9:14 pm

    @UltimateSWX check the FAQ for tips on how to tweak the quality 🙂

    @eric AviSynth unfortunately isn’t great at dealing with memory, so it has trouble with 4k videos. You can try increasing the memory by changing the first line to SetMemoryMax(768) or SetMemoryMax(1024) to see if that helps.

    @Salaam maybe MKVMerge has developed a problem processing 60FPS videos? I’m not sure, but that is the only difference between a video with the InterFrame line and without it. Everything else (the codec, bitrate, etc.) is controlled by the codecs via MeGUI and has nothing to do with InterFrame 🙁

    @Leonardo Mota check the FAQ 🙂

  13. SubJunk

    March 22, 2015 at 9:18 pm

    @TrueAndyyy in the Start Menu, go to K-Lite, then Tools, then GraphStudioNext. Then open your video with that file. That should show you which filters are being used to decode your video and help us see problems. Screenshot it and post it here if you want me to try to help more.

  14. @SubJunk
    Thank you for taking time, for my problems.
    You mean like this?
    http://puu.sh/gLc5l/958cfdd264.png

  15. SubJunk

    March 23, 2015 at 2:30 pm

    @TrueAndyyy yeah that’s right, and it looks okay. What happens when you click the play icon in that program?

  16. Is it possible to upscale video using MeGUI?

    For example 720p to 1080p or 1080p to 4K?

    If this can’t do it what software programs should I look into?

  17. @SubJunk
    It start’s the video normaly and it works perfect.

  18. @SubJunk
    No Idea how to help now? 😀

  19. @SubJunk
    I don’t think it’s related to MKVMerge as I already tried the old versions. I updated MeGUI to 2525 and the same error occurs after muxing video with audio!
    I’ll try without your script this time and see if it may help in troubleshooting.
    Thanks for the tips buddy!

  20. I am converting 1280×720 25 or 30 fps to 1280×720 60 fps… i always get ghosting around soccer ball
    i already put smooth settings
    InterFrame(Cores=Cores, Tuning=”Smooth”, GPU=true)
    what to do to remove or reduce it?
    Please, answer…
    thanks

  21. @SubJunk
    Nothing has changed either! Your script seems, it might has something to do with the x264 Encoder.
    Any other thoughts to fix it or should I give up by now?
    Thanks for bearing me!

  22. Thank you for this guide. My Interpolation works, but I get artefacts, for example in shows like game of thrones, where there are sword fights, or fire, there are glitches. Anyway to resolve this?

  23. I keep getting the error

    “Problem with video output filename: Access to the path ‘C:\Users\Me\Videos\The Flash.mkv’ is denied.

    How do I fix this?

  24. I need help , my video is rendered in 60 fps but it lt is flickering and not looking smooth :https://youtu.be/tdv4STvM3-k?t=2m5s watch from 2:05

  25. Hi, how to make sure K-Lite Mega Codec Pack to select its preferred defaults (not “quick upgrade”)???

  26. Sir, thanks for this! I’ve so many converted videos already.
    But I’m so irritated on ghosting whenever the movement of the vid is so fast (like, whenever I’m converting dance videos)

    How do I reduce it? Or even take it off?

    Thanks Sir!

  27. I installed K-Lite Mega Codec Pack with “Profile 9: Lots of Stuff” , with the “Haali Media Splitter” but the option “Prefer DSS2 over DirectShowSource” is still disabled.I try reinstalled K-Lite but its not help.Dont now what to do.
    This option is very needed in conversion, or i can work without it?

  28. ”….avs cannot be opened.Please make sure it’s a valid AviSynth script and that AviSynth is properly installed.
    Error massage for your reference: Can’t read the video stream”

    Can you upload a video ?? Please help!!

  29. Wow, amazing article, hundreds of comments, nice!
    I’m at Step 11, clicking Queue and I get an error:

    “Unsupported configuration
    Audio input, audio output, and audio settings must all be configured”

    But when I add audio in the “Audio” section (I add Audio input and Audio output”), add it to Queue and render it, everything I get is audio file in a different format.

    What I want is just make “fake” 60 FPS video from a 30 FPS video. I don’t mind if I just get video without audio and then add audio afterwards, but MeGUI doesn’t allow me to do that.

  30. :)))))) MUITO OBRIGADO!!!!

  31. @Subjunk
    Thanx for this wonderful guide. I have on question. My original video is of 20 GB, I am converting it from 24 to 36 fps. But the estimated size is showing as only 10 GB. Did i screw up the script somewhere?
    In the quality section, I entered number 16 and in the preset I dragged it to “Slower” as I really need the quality on this one.
    Please help.

  32. I am still getting the error “Please make sure it’s a valid AviSynth script and that AviSynth is properly installed…… Error message for your reference : Can’t read the video stream”

    I followed the faq and renamed the file and moved it several different places.
    Still getting the error.

  33. If I have an audio file of the video can I export to mp4 with MeGUI and combine the video file and the audio file in an editing software? ( Sony Vegas Pro 13 )

  34. I use this script:

    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”)
    .ConvertToYV12()
    SetMTMode (2)
    Interframe (Cores=4)

    I type that in, hit update then okay then after selecting a video hit preview AVS script and it gives me this error

    AviSynth script error:
    Script error: syntax error
    ((null), line 7, column 14)

    I followed all of your instructions and have K-lite codecs installed and everything.

  35. SubJunk

    May 21, 2015 at 6:13 pm

    @dabojable you can try different InterFrame settings

  36. SubJunk

    May 21, 2015 at 6:15 pm

    @Soldatstar I guess the input video has the same jumps but it’s less noticeable at a lower framerate. Try going through the original frame by frame

  37. SubJunk

    May 21, 2015 at 6:17 pm

    @Niteesh it’s probably okay. 10GB for a 1080p video is a very nice size. 20GB is like a storage bitrate, where it has a lot of extra bitrate that won’t be noticeable in the quality.

  38. SubJunk

    May 21, 2015 at 6:19 pm

    @Christian I don’t know about Sony Vegas Pro specifically but yes you can, and the guide uses MKVToolnix to do that

  39. SubJunk

    May 21, 2015 at 6:19 pm

    @FeLLy you probably didn’t install the version of AviSynth that comes with the guide

  40. SubJunk

    May 21, 2015 at 6:20 pm

    @Gray there’s a missing quotation mark on line 3

  41. First, I wanted to say thank you for this detailed guide and your assistance with troubleshooting over the years!
    Now I’ve seen others ask this same question, but I keep receiving this…

    AviSynth script error:
    LoadPlugin: Unable to load “C: PROGRAM Files (x86)\MeGUI\Tools\avisynth_plugin\svpflow1.dll”
    (C:\Users\Subzotic\Desktop\ ____ \ ____ \ _____.avs, line 4)

    I’ve made sure every file is in it’s correct position according to your guide, but this error is persistent.
    Any idea?

  42. Hmm nevermind,
    I re-copied and pasted the code and I guess that worked.
    But it seems like the error is random at times, even when I re-pasted the code.
    Oh well, as long as it works!
    Thanks anyways

  43. Gray: drop “.” in line “.ConvertToYV12()”

  44. It works for me thank you! 😀

  45. How about Linux? do you know anyway to do that? those dlls is for Windows only

  46. MakeSomeNoise

    June 6, 2015 at 11:14 pm

    Can u help me , I’m tired converting because it always stops at 99.98% and I don’t know how many times I reinstalled K-Lite Mega Code Pack. Some of my conversions were good but almost all of them stopped at 99.98% and I need to convert them 7hrs-10hrs and it just fails. Thanks for this tutorial but it’s not always 100% working .

  47. Thank you so much for this guide! It worked perfectly even though I’ve had to skip the installation of some programms at the beginning as I already got the “full SVP package” installed.

    What a great guide…

  48. Always stops at 99.98%, how to fix that?

  49. So, much to my surprise, I managed to do it in one try ALMOST perfectly…however, I’m getting a weird distortion or smudging effect on certain parts of the video, sometimes it is very noticeable, sometimes it’s nonexistent. Here’s a picture of it at it’s worst:

    http://imgur.com/HJhNgRN

    Any fixes to this? Or is this just a side effect I’ll have to live with?

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2023 Spirton

Theme by Anders NorénUp ↑