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. now i’m getting a new error.. when i clicked save this popped up: unable to load mvtools2.dll.. i checked the file inside the tools folder and it’s there.. still it cant load.. :((

  2. @Johhnnyy: How did you fix the old error?
    The mvtools2.dll one is probably because the path is wrong. Check that the path on line 3 is correct and that it has a slash at the end.

  3. did check the paths and it’s all good.. still im getting the error.. and about the old error i just downloaded the install version of MeGUI.. it worked for me..

  4. hmm.. from testing a few things with the script i found out that even if i have them all on their respective folders and is written on the correct path with the slashes, it just can’t load any dll.. even the removegrainsse3 and interframe wont load.. lol

  5. I can try to help using the free software TeamViewer if you trust me enough – this means I will be able to use your computer from my computer. You can close the connection at any time.

  6. hmmm.. got the script working.. just needed to search for new files from it and paste it over to the avisynth folder.. all went well.. now after i enqueue then click start something pops up then and status saying error.. lol

  7. lmao… on the log it says script error: there is no function named “SetMTMode”
    i do have the mt.dll in place.. @_@

  8. got it to work!!! wew.. talk about googling everything.. hahaha! 😀

  9. @Johhnnyy: It seems that you didn’t follow Step 1 properly from the start 😉
    I’m glad you got it working, though.

  10. Hey SubJunk,

    As I was watching some of my animated shows (eg. Simpsons, Futurama), I came across an issue where the converted file is not affected by the script. Basically, the frame rate is 60 FPS, however, it is still interlaced and I’ve been told sometimes MeGUI does not automatically detect interlacing in animated shows. The scan says it’s progressive (MediaInfo), however, when I run it through MeGUI it says “source type not detected”.

    How can I make sure that the video gets properly interlaced so I can get a nice smooth 60 FPS? The video looks like it has 3:2 pulldown when you play it plus interlacing.

    I’m using the One Click Encoder.

  11. @Jeff: For deinterlacing I recommend NNEDI3+ABS which you can find on Doom9. Interlacing is a horrible thing as is 3:2 pulldown. It’s best to always get progressive sources, and luckily 99.99% of releases are progressive.
    Was your source a DVD?

  12. Yeah, mainly had some issues with animated shows like Simpsons and Futurama. Everything else was fine. Even though some of the other shows were DVDs with interlaced frames, they didn’t seem to have any issues.

    Oh and something strange was when doing Blu-ray based TV shows (eg. Fringe, Sanctuary), I didn’t have any issues. However, with movies the x264 always kept crashing. I think you said changing the MTMode from 2 to 3-5. I guess MTMode 3 was having some issues, so I might try 5 just in case.

  13. Sometimes the script just doesn’t do well with animated shows, especially if the motion is done by hand because that means it isn’t “real” motion. Most cartoons use computers to map the motion so it is consistent, but maybe Simpsons and Futurama don’t.

  14. @ Subjunk

    Oh okay. I tried using that nnedi3 plugin, however I got this error saying “cannot read or write protected memory”. However, when I removed it and used the regular script, it went away.

    Maybe for The Simpsons and Futurama I should just do have the framerate as 29.97 FPS, but I think my G25 plasma does that anyways. It says “reduces motion jitter in film based content by converting 24 to 30 FPS”.

  15. @Jeff: Try it now with the updated files, it fixes some motion stutter that happened in all videos but was particularly noticeable in cartoons, it may have looked like what you described. Hope it helps 🙂

  16. @ SubJunk

    I’ll check it out. Thanks. I wish I could show you what it looked like, but I’d probably violate copyright laws.

    Oh, while I was testing out Avatar with this. I did try doing it with MT mode 6 (similar to mode 5, but a little faster, but most compatible I believe). So I wonder what I should do if all the MT modes seem to have “x264 stopped working” under Windows 7? Basically, I tried it with modes 2, 4, 5, and 6. I wonder, maybe 1080p is too much to interpolate?

  17. @Jeff: What CPU are you using? And meh copyright, meh :p

  18. @ Subjunk

    I am running the latest Intel Core i7 2600K @ 3.4 GHz w/HT & TurboBoost enabled. If I’m going to show you the video, I’m not sure where to upload it, because if I try Youtube, they might just ban my account.

    I think for the movies I might just do 720p. I just tested out Avatar w/30 Mbps bitrate @ 720p and the quality was most excellent.

  19. I am having trouble getting it to convert larger files (HD) avi/mp4/mkv etc… I have tried using other scripts to see if that was the problem, no joy. It’s working fine on smaller sized files (tv shows) 150-350MB. Have you heard of similar cases?
    Here is the error message (then it Closes completely).
    MeGUI encounted a fatal error and may not be able to proceed.
    Reason: External component has thrown an exception.

  20. @EvoLiTiLE: Thanks for posting here 🙂 Have you tried re-installing codecs?

  21. Can i set the NewNum to 120000 in this script –> InterFrame(NewNum=48000, NewDen=1001, FlowPath=”C:\Program Files\AviSynth 2.5\plugins\”). If yes, this result in more smooth scene????
    Like 240hz TVs.

  22. @Luiz: Sure, you can set it to whatever you want 🙂 However setting it higher than your hardware supports will be a waste; if your monitor or TV only supports 60Hz and your video is 240FPS, it will still only display 60FPS.

  23. Thanks Subjunk… For all the attention 😉

  24. @Luiz: You’re welcome, I hope you enjoy it! 🙂

  25. Thanks for you tutorial

    I have problems with strobe lights and lights in general distortions of some sort on bright lights

    Plz help thnks

    I did Alien Everything went fine except a the end on the scape pod strobe lights ruined everything .

  26. @Trofeo: You can try adding Tuning=”Animation” to the InterFrame() line. That will be less smooth but have less errors.

  27. Thanks I will give a try 🙂

  28. Hi SubJunk, thank you very much (again) for your helpful script

    I have been using it for a while but today I met a problem as I try the Preset feature. Everythinh is okay but the Placebo one. Everytime I try to enqueue the avs in Megui, it return a fatal problem alert. Below is my script and the alert message. DO you have any idea about it.

    http://www.mediafire.com/?tzzie7t9xttc1h5

    http://www.mediafire.com/i/?fmr4ip4fq354ch0

    Thank you

  29. @Binh: Hi again, I hope you’re doing well 🙂
    Firstly, I don’t recommend the placebo feature since it only slightly increases quality but is much slower, but if you do want to use it you need EEDI2, which is included in the InterFrame download (not the one in this guide, the one on the InterFrame page)

  30. thank you for replying, everything is still okay.
    Actually, I did download and put those Dependent files in every folder you mentioned. Every setting for the Tuning worked except the Placebo setting. May it be a bug or sth else?

  31. @Binh: Did you add the plugin load line to the script? Like:
    LoadPlugin(PluginPath+”EEDI2.dll”)

  32. My bad again. Now everything is where it should be. Thank you very for your help. Best wishes for you and your amazing releases in the future.

  33. @Binh: Great, I’m glad it worked 🙂 Thanks for the encouragement 🙂

  34. @Subjunk: I have just met the same problem as Trofeo with strobe or flashing light . I tried to apply the Tuning=animation as your suggestion above and the error went away but the quality really decreased a lot. So, as a noob :D, I crossed my finger and tried the old manual script before the Interframe’s appearance and the result in my opinion was quite better than the animation tuning (of course, there is nothing as good as the amazing default script). Sample clips below

    http://www.mediafire.com/?8pfq0938wb11j

    I do not know what does it mean and I am sorry that I cannot do anything else:((. I hope that this info can somehow give you some idea for the improvement in later versions.

    Thank you.

  35. @Binh: Thanks 🙂 Can you upload that clip at the original framerate, too? That way I can test script modifications on it.

  36. Absoulutely. I’ve just uploaded the original framerate cut to the same folder above, you can check it out (it’s slightly longer than the sample double framed clips ). If you need the whole clip, which does contain a lot of strobe light, just PM me for the download links. Hope that everything will be okay 😀

    http://www.mediafire.com/?8pfq0938wb11j

  37. After starting the conversion, meGUI immediately became non responding. My cpu goes 50% at megui.exe at that state.
    I tried to do a 4minutes vob file.
    Its already around half an hour in non responding, 50%cpu usage,
    while handbrake will finish the job around 5-8minutes, for comparison.
    Is it normal?

  38. @paddy246: No, that’s not normal. I don’t know the cause of it, sorry

    @Binh: Cool, I’ll do some tests on it soon 🙂

  39. If use the DSS2, MeGUI will hang at 99.x% encoding .

  40. @Binh: Thanks a lot for that. Lastly, can you please paste the script that was used for “manual script.mkv”? Then I can see what happened 🙂

  41. @Binh: Actually, cancel that request. I have fixed the bug and will be releasing a fixed version soon.

  42. @Subjunk: just come home from the vacation and studying like crazy for tomorrow quizz :D.
    I am really glad that you have figured it out finally. Gotta love your enthusiasm.
    I’ll test the new version soon. Thank you very much for all your concern.

  43. SubJunk! I took a break for a while after getting a bunch done. Got plenty of eye-popping 60fps goodness going on. Thanks again for everything!!

    Got a Viewsonic G Tablet. So far it lags big time on 60fps files unless I use the MeGui PSP preset, then it can get 54fps or better at 480×272. Still experimenting. 🙂

  44. So it works fine when I don’t add gpu=true, but if i add the line, it gives me an error when i click save after picking the video. I have an ati 4890, if that’s important at all.

  45. when im in the avisynth configuration dialog and i go to the “extra setup” it wont allow me to click on the “Prefer DSS2 over DirectShowSource” I dont get what this means and then i went to upload my video file it said that there was an error 🙁 i dont know how to get this working

  46. @jjtty: Please read the FAQ section 🙂

    @pCho: It probably means your GPU isn’t supported

  47. @Subjunk: Really? I didn’t think the 4890 was that outdated…

  48. @pCho: I think it’s more that ATI cards have problems. You can install an ATI runtime thing that might fix it:
    http://developer.amd.com/Downloads/110619a-121104E.zip
    Run it and select custom, then just check the APP Runtime option and install.
    Please post back here if that works because then I can add it to the guide.

  49. Does this not work with MP4 files? Whenever I select one in MeGUI and try to enqueue it, I get an error:

    MeGUI encountered a fatal error and may not be able to proceed. Reason: The file [filename].avs cannot be opened. Error message for your reference: Can’t open [filename].mp4: 80004005 ([filename].avs, line 8)

    I’m pretty sure I’ve copied all the necessary files, plus converting an MKV worked fine before.

  50. @888: It works with any video file that your computer can decode, so I suggest installing/reinstalling a codec pack. I recommend K-Lite Mega

Leave a Reply

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

© 2023 Spirton

Theme by Anders NorénUp ↑