Convert videos to 60fps (Updated 27 Sep 2014)

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 tools folder over the top of 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)

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.

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:

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

942 Comments

  1. Hi There !

    @SubJunk:
    Any chance of adding the “Ambilight-like” effect to it ?

  2. SubJunk

    August 7, 2014 at 2:19 pm

    @TenFilip I don’t really have interest in that feature sorry :)

    @Maximus Maybe a corrupt file, you could try re-downloading

    @excaliburn What’s the error?

    @Esoterin There are tips in the FAQ for that, and I’ve found Haali to be the most stable with multithreaded input :)

    @Jon You can try using a higher CRF value which will lower the bitrate to make it easier over a network, and make sure you don’t use a high setting like “Placebo” for x264 since that makes it harder to decode

    @sadkl Love you too ;)

  3. Is it possible to use this script for simply watching videos in 60fps without converting them like shown here?

  4. SubJunk

    August 7, 2014 at 6:21 pm

    @Jack20 It is possible yes, but it will be easier to just use SVP for that :)

  5. Great guide, thank you for making it!

    I have one problem though. I did everything in the guide, and it works perfectly on my computer. However, when I try to play 60fps via Universal Media Server, it makes my Sony BDV-E380 freeze. I tried FFmpeg, MEncoder, stMuxeR, all do the same.

    Other 24/30fps stuff plays fine, so I’m guessing something is wrong with my setup?

  6. Sven Erik Elfgren

    August 9, 2014 at 7:59 pm

    I tried this with an 1920*1080 25p mp4 and all I get is a mkv file also 25fps.

    Setmemorymax(512)
    SetMTMode(3,4)
    PluginPath = “C:\Program (x86)\MeGUI\tools\avisynth_plugin\”
    LoadPlugin(PluginPath+”svpflow1.dll”)
    LoadPlugin(PluginPath+”svpflow2.dll”)
    Import(PluginPath+”InterFrame2.avsi”)
    .ConvertToYV12()
    SetMTMode(2)

    InterFrame(Cores=4, GPU=true, NewNum=50, NewDen=1)

    When I save I get an error that this file Pendel 1080_25p.avs cannot be opened.
    This file looks like below
    Setmemorymax(512)
    SetMTMode(3,4)
    PluginPath = “C:\Program (x86)\MeGUI\tools\avisynth_plugin\”
    LoadPlugin(PluginPath+”svpflow1.dll”)
    LoadPlugin(PluginPath+”svpflow2.dll”)
    Import(PluginPath+”InterFrame2.avsi”)
    LoadPlugin(“C:\Program Files (x86)\Haali\MatroskaSplitter\avss.dll”)
    dss2(“F:\Filmer\slowm_tester_o_ljud\pendel_larv\Pendel 1080_25p.mp4″, fps=25.000).AssumeFPS(25,1).ConvertToYV12()
    SetMTMode(2)
    #deinterlace
    #crop
    #denoise
    #resize
    InterFrame(Cores=4, GPU=true, NewNum=50, NewDen=1)

    Some advise please

    Best regards
    Sven Erik Elfgren

  7. SubJunk

    August 11, 2014 at 6:20 pm

    @szmark you’re welcome :) It’s possible that the Sony BDV doesn’t support that framerate, it seems very unlikely but I don’t know what else would cause that, unless maybe the bitrate is too high for the device in which case you could use a higher CRF value

    @Sven Erik Elfgren the file looks OK to me, make sure the quotation marks in the file are the regular ones, not the directional ones

  8. Could someone help me with something? I keep reviving the error and I don’t know what’s wrong

    AviSynth script error:
    Can’t open C:\Users\XX\Desktop\test.mp4: 80040154
    (C:\Users\XX\Desktop\test.avs, line 8)

    When I go to check the specific line it looks like this

    dss2(“C:\Users\XX\Desktop\test.mp4″, fps=29.970).ConvertToYV12()

  9. This sounds great and looked easy to set up, but I’m completely stuck.

    Before I get into my issues, I would like to mention that it took me a long time to figure out I had to combine the tools folder from the zip-file provided as download, with the one in the MeGUI folder. I had no clue what “over the top” was supposed to mean, and hadn’t paid attention to the extra folder in the .zip; all I could imagine is meaning I had to copy it over to MeGUI’s root directory, but I couldn’t imagine that being the case. I suggest to re-write that step more clearly so others won’t run into the same issue. Apart from this the tutorial is very clear! :)

    Now onto the issues I’m facing. I’ve followed all steps correctly* (clarification at bottom of post), but Step 9 is when the first issue arises. I hit DirectShowSource and it tells me:

    “MeGUI encountered a fatal error and may not be able to proceed. Reason: Value of ‘29970’ is not valid for ‘Value’. ‘Value’ should be between ‘Minimum’ and ‘Maximum’. Parameter name: Value”

    I figured the error may be related to the FPS of the video, so I instead took a different one with 23 (or 23.98 as Potplayer tells me), but the issue repeated with a slightly different number. Any of the videos I’d like to convert either show up as 23 or 29 FPS in Windows.

    Either way, as MeGUI let me continue, I figured I should do so and see what happens next. So coming to Step 10 I hit Save and get the following error:

    “The file D:\Videos\K-MV\A PINK\[1080p] NoNoNo (Dance Ver.).avs cannot be opened. 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”

    First thing that came to mind is I should have been running the program as admin, so I’ve closed it, set it to run as admin and re-done the necessary steps to run into the exact same problem again. I then figured Avisynth could possibly not like the characters in the path’s name, but copying it to D:\ as “nonono_avs.avs” didn’t solve the problem either, as it then told me “Script error: the named argument “fps” was passed more than once to dss2 (D:\nonono_avs.avs, like 8)”

    And that’s it for all I can think of personally. I don’t want to mess about with settings of programs I don’t know about, so I hope you can help me with this one, SubJunk. Thank you!

    *I read the FAQ beforehand so I wouldn’t run into unexpected issues I could have prevented, and therefore figured I’d download Haali Media Splitter from the first link, as I believe I did not previously have it. I’m still assuming the Codec Pack isn’t necessary, as that’s what I understand from the FAQ, but if I’m wrong on that please do tell me!

  10. Oops, forgot to add my script to the post:

    Setmemorymax(512)
    SetMTMode(3,8)
    PluginPath = “C:\Programs\MeGUI\tools\avisynth_plugin\”
    LoadPlugin(PluginPath+”svpflow1.dll”)
    LoadPlugin(PluginPath+”svpflow2.dll”)
    Import(PluginPath+”InterFrame2.avsi”)
    .ConvertToYV12()
    SetMTMode(2)

    InterFrame(Cores=8, GPU=true)

    – I have a i7-4710MQ, which would be 8 cores (although half those are hyper threading)
    – I also have a 870M maxing out any game so far, so no reason to leave her out ;)
    – I triple-checked the path, and it’s correct

    PS: Would it help to higher the maximum memory as seen in your image? I have 16GB ram and 6GB vram if it matters.

  11. Hello I love your contribution subjunk thank you very much, I have a question … if I convert to 60 fps video I will obtain a better slowmo? thanks and google translate helps me a lot haha

  12. Hello :)
    In step 10, I received an error “please make sure it’s a valid avisynth script and that avisynth is properly installed” when i click the Save button
    I don’t how to fix it :((((

  13. Thanks for this great Tutorial, even though i had problems getting the instructions right, regarding the plugin paths, i now managed to get it to run almost properly. I’m Using MeGUI 2507, when i queue it it says “job1, encode: x264, Mode: Video” and as second “job2, encode: mp4box, Mode: mux” as i understand it, first comes the video conversion and second, putting it into a readable MP4 file. But here is the tricky part, the second job allways end with an error, leaving me with a unusable XXXXX.264 file?!

  14. IF YOU GET THE CANT READ THE VIDEO STREAM ERROR: MAKE SURE YOUR VIDEO FILE IS .AVI AND YOU GET THE AVS SCRIPT FROM A 24 FPS VID.

  15. Hi could someone tell me how to convert 12fps to 24fps?

  16. Hey can i go more than 60FPS?

  17. I found your page and it was exactly what I was looking for. Everything installed and worked perfectly (except having to reinstall Haali). One thing tho…after my conversion I experience a pixel (artifact) “halo effect” around the main object, mostly when it is moving very quickly with a heavy amount of detailed background. Can this be eliminated using “InterFrame(Tuning=”Smooth”)”? If not, is there any way to tweak settings to help eliminate that?

    I am using a dual core, 6 gigs ram ( set my memorymax to 1024 instead of default 512….I assumed that would be appropriate, also I added GPU=true to the settings as well.

    thanks for any help in this matter.

  18. SubJunk

    September 9, 2014 at 11:58 am

    @Denny @Hashim that’s covered in the FAQ section :)

    @Finnius trying the Smooth Tuning is a good start, you can also use other settings like OverrideAlgo, see other comments for discussion about this

  19. when i click Queue ..nothing happen!!
    plz help!

  20. How do we set this up with Universal Media Server? It says on the guide that it works with it, but I don’t know what to do.

  21. SubJunk

    September 18, 2014 at 11:06 pm

    @RUD it might mean you tried to replace x264.exe with another version, or if not it could have downloaded wrong so try deleting it and letting MeGUI re-download it :)

    @Rhyrs it’s available when using the AviSynth engines so enable them and look at their options, on the Transcoding Settings tab :)

  22. Just Wondering what do you mean by extract tools to megui tools folder, slightly confused where to put it, really a noob here.

  23. SubJunk

    September 21, 2014 at 8:07 pm

    @Ryan it means extract the download and get the Tools folder from that, then copy it over the MeGUI tools folder, which is listed in Step 1.

  24. Do you guys have an email that I can reach you at? I have a business opportunity in regards to your 60fps converting technique.

  25. Great guide, just took me awhile to actually think instead of act like a sheep and I got it. Hopefully this can clear up some others problems. I had some major hang-ups with errors such as CANNOT FIND VIDEO STREAM, Can’t locate svpflow1.dll etc. etc. but ultimately what I found my problem to be was that I had not actually put all of the files from Step 1 into the tools folder of MeGUI. Make sure they are there, drag and drop them in right where the script says they should be.

    Thanks again SUB!

  26. When I press save on Step 10 I keep getting an error so I pressed Preview AVS Script and the error says,
    AviSynth script error:
    LoadPlugin: unable to load “C:\Program Files(x86)\MeGUI\tools\avisynth_plugin\svpflow1.dll”, error=0x7e

  27. SubJunk

    September 27, 2014 at 5:04 pm

    @Jay Deng you can contact me at my gmail account, username is subjunk. I’m not sure about business opportunities though since this is a very collaborative effort and the underlying files were made by other people, but we can discuss it and I can possibly refer you to the right people :)

    @quests thanks for letting others know, and I’m glad you got it working :)

    @Jah check that you completed Step 1 :)

  28. Like a few others here, I’ve had the problem of having the encoding freeze at around 99% and never finish. I’ve tried re-installing the k-lite codec pack several times like you suggested, but the problem still persists. Any suggestions?

  29. Amazing script you have here. Though I noticed that fast-moving objects get distorted when they’re on a gradient-like background (for example a bird flying fast with clouds behind it). I figured out to use the OverrideArea parameter to reduce this artefact, but my question is: Does the OverrideArea have any negative side-effects?

  30. Hi,

    @SubJunk:

    I can seem to find interframe2.avsi. I checked in the tools and it’s not in there. Any idea/tips?

  31. SubJunk

    October 6, 2014 at 10:53 pm

    @Greg when you install K-Lite, try choosing a different decoder in the advanced options for the file format that freezes (usually MP4). Hope that helps!

    @Jam the idea of the overridearea is that it minimizes some big distortions, but as you’ve noticed it causes some others. So it’s a matter of preference :)

    @Valeon it’s in the zip file in step 1, did you follow that step?

  32. Reinstalling with a different decoder seems to have worked! Thanks a lot!

  33. um.. can i ask for a MeGUI settings and scripts that converts videos with almost the same quality like the source video but still converts it in 60 FPS?

  34. SubJunk

    October 10, 2014 at 10:44 am

    @Questionn if you mean with the same video quality then the setting for lossless encoding is CRF 0, but really using 14 or 16 is still basically lossless.

    @Greg great, glad to help :)

  35. Thanks for your guide!
    I’d like to use it, but I have some strange problem in unexpected place. It’s in the Step 9. Right after the window with 3 buttons, where I click “DirectShowSource”, MeGUI crashes. I have followed all previous steps closely, except for installing K-Lite, since I have all the codecs from CCCP and installed manually later too. I have tried various files with the same result. Moreover, MeGUI crashes even if I make no modifications to Avisynch profile, skipping steps 6, 7 and 8. Any idea on why it crashes?
    I hope this my question is not the stupidest one. I tried looking through previous comments, but there are so much of them!
    Anyway, again, thanks for the guide!

  36. SubJunk

    October 11, 2014 at 9:14 am

    @takopus not sure why it would crash but there are things we can try. First did you update to the latest MeGUI using the “Development” server? They might have fixed that bug since that last stable version. Also it could be a firewall/antivirus kicking in and blocking MeGUI, sometimes those programs falsely detect innocent programs like that. Not a stupid question at all :)

  37. Not sure what I’m doing wrong, it works with the standard InterFrame settings, but when I try

    InterFrame(Cores=4, Tuning=”Smooth”, GPU=true)

    I get the error “Can’t read video stream.”

    I tried Tuning=Smooth, Tuning=smooth, Tuning=”smooth”, with no spaces between items in InterFrame, tried rearranging them, nothing works when I add anything to InterFrame, even just adding the GPU line. I’m working with an MOV file.. is that a problem? Help?

  38. @SubJunk dude. Please make sure that is a valid AviSynth script and that the AviSynth is properly installed.

    Can’t read the video stream.

    I installed everything 1000.times please help me.

  39. After i send it to my queue, I see 2 items instead of one. Screenshot: http://gyazo.com/adef3edba96f4280b2160ae5758d5e75

    When I render it, I get a file with the file extension (.264) which is unusable. Please help

  40. Thanks this is a very helpful guide so I’ve bookmarked it.

  41. SubJunk

    October 19, 2014 at 4:38 pm

    @James P. MOV files should work OK as long as you have the right codecs installed, did you install K-Lite Mega?

    @HELP ME can you screenshot the AviSynth script inside MeGUI?

    @moeez make sure you have MKV selected in the “File format” dropdown in MeGUI.

    @Lomay Cool, thanks for the feedback!

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>

© 2014 Spirton

Theme by Anders NorenUp ↑