Automatic Refreshrate Changer (1 Viewer)

gibman

Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    [size=+2]Dynamic Refresh Rate[/size]

    Q: What is this?
    A: Dynamic Refresh Rate is a little program (created by Gibman) which looks at the media file that’s going to be played and matches the refreshrate of the HTPC to it. This can eliminate any judder or jerky video playback you might have.

    Q: Do I need it?
    A: Well, that depends. Do you notice a judder or jerky image when you play a movie and are you bothered with it? If so, Yes. Keep in mind that there are a lot of people who don’t notice this judder at all.

    Q: What causes this judder in the video playback anyways?
    A: A video file contains roughly 24, 25 or 30 frames per second (FPS). Your HTPC has a video card witch produces a signal to your TV/monitor. This signal in theory can be anything from 24, 25, 30, 50, 60, 75 or even 100Hz. i.e. 60H means the signal is refreshed 60 times a second. If there is a mismatch in the FPS from your media file and the Hz signal to your TV/monitor, this is most likely to be visible as judder in the video.

    Q: How does this "Dynamic Refresh Rate" work then?
    A: Its pretty simple in concept actually. Normally when you press play on a media file or DVD, MediaPortal starts playing.
    With this function of Mediaportal two things are now added before the actual playing starts. First the open source mediainfo.dll library is activated to determine what the FPS is of the media file. Once this is determined a command can be executed to change the refreshrate of the HTPC. The command will follow your predefined set of rules. After this your TV or monitor will re-synch to the signal change, often resulting in a short blanking of the screen. Then the playback of the file starts.

    Q: Is it difficult to install. Can I do it?
    A: That of course depends on your skills and knowledge. You need to know about your TV screens capabilities. You might need to set up ATI/NVidia-profiles or programs like powerstrip or 12Noon. For this you need to know a little bit about what kind of graphics card you use.

    Q: Where can I find this program in mediaportal?
    A: You can find it inside every mediaportal 1.01 version (or every 1.0 + SVN #21195+). Start Mediaportal Configuration. You have to click "Switch to expert mode" first to be able to see it. Then OPEN the General tab. There it is... Dynamic Refresh Rate.

    -------------------------------------------------------------------------------------------------------------------------------------------

    Configurating Dynamic Refresh Rate

    The Theory:
    I tried to create a more visual representation of what this feature does.

    attachment.php


    The general goal is to minimise the difference between source fps and htpc Hz. An exact match is preferred, if possible.


    How do I set it up?
    You can find the controls of this feature in "mediaportal configuration". (Press "Switch to expert mode" first)

    attachment.php



    attachment.php


    Options are:
    A - Enable Dynamic Refresh Rate Control (Enable/disable this feature)
    B - Notify (popup) on refreshrate change in MediaPortal
    C - Use device reset (use this if your method of RR changing is resetting your graphics card)
    D - Force refreshrate change (use this to force a refreshrate command even if the refreshrate is already correctly set)
    E - Use default refreshrate (Selecting this will cause the refreshrate to go back to your default after playback of a media file.


    attachment.php


    The Table contains four columns:
    Type (Cinema/PAL/NTSC/TV): These are the names of the available profiles. You can not change/edit the names.
    Framerates (23.976/24): This is the information about the source media files. These values are changeable but fixed by media types. Do NOT change this.
    Refreshrate (23.976/24/25/29.9/30/50/60): In this column you can select what the refreshrate of the HTPC should be when playing a mediafile. This is determined by the capabilities of your TV set. Read the manual!!
    Action : in this column you can specify the action that needs to be taken to change the refreshrate of the HTPC.

    THE TRICK:
    Here is where your input is required. You must specify exactly what the desired refreshrate must be with each of the given media sources.
    Example:
    Your TV supports 1080p30; Program the NTSC type to 30hz in the Refreshrate column. If it doesn't support that, program it to 60Hz.
    Your TV supports 1080p24; Program the CINEMA type to 24hz in the Refreshrate column. If it doesn't support that program it to 50hz(~2x24) or any other closest match available of a multiple of 24.
    So you must specify which refreshrate you want with each source type. This is dependent on the capabilities or your TV screen. TIP: Read the manual of your TV.

    I created an Excel document to help you select the best TV modes.

    >>> TV MODES TOOLS (.ZIP) <<<

    More detailed information about the actions is given in "Setup your refreshrate changing method".


    -------------------------------------------------------------------------------------------------------------------------------------------


    Set up your refreshrate changing method

    Which command you want to give depends on which method you want to use. There are a couple of methods to change the refreshrate of your HTPC. The possibilities are:
    • 1 - You can leave it BLANK. This way MP will ask windows (API) to change the refreshrate. (Recommended)
    • 2 - ATI profiles (using ATI Catalyst Control Center)
    • 3 - NVidia profiles (using NVidia Control Panel)
    • 4 - Powerstrip
    • 5 - 12Noon DC (free)
    • 6 - Make use of option 2 till 5 with the use an external command.

    Note: Some of the above have a disadvantage. If you use the ATI/NVidia profiles method, this can cause the graphics card to execute a device reset. This causes some delay and maybe also some problems. Powerstrip and 12Noon DC do not require this device reset. Thus these methods have less impact on the system.

    Also VISTA users do not suffer from device resets at all. This is only for XP users.

    Option 1 is recommended. Windows will try to change the refreshrate for you. If it works like this, don’t try other options.
    Option 2-5 are best to call through an external command file. This can be a .bat or .cmd file. IN this file you give the actual command to change the refreshrate.
    Advantage here is that you can give multiple tasks in the command file. Additionally you can test if it works outside MP.


    -------------------------------------------------------------------------------------------------------------------------------------------

    ATI profiles
    In order to use the profiles you need to create them first from within the ATI CCC. You must also save them under a desired profile name like "CinemaProfile", "PALProfile", etc or any other name you are OK with. Just make sure you also use the same name in the command line.
    c:\\Program Files\\ATI Technologies\\ATI.ACE\\Core-Static\\CLI.exe start Load profilename="CinemaProfile"


    NVidia
    In order to let the NVidia Control Panel to switch the refreshrate, you must first make sure the desired setup is saved under "custom resolution" in the Control Panel. After this you can already use the command.

    The format used is:
    rundll32.exe NvCpl.dll,dtcfg setmode <display#> <hres> <vres> <bpp> <freq>
    c:\\windows\\system32\\rundll32.exe NvCpl.dll,dtcfg setmode 1 1920 1080 32 24


    PowerStrip
    Powerstrip has an advantage over the NVidia and ATI method. It doesnt require a device reset. But this program is not free. To set up the correct timings, I suggest you use the ATI CCC or NVidia control panel to activate a desired refreshrate / resolution. Once active, you can save the profile using Powerstrip. A quick and easy way to do this is to Start Powerstrip > Display Profiles > Configure > Advanced Timing Options > Right click on the little button "Copy timings to clipboard". By doing so, you will create a shortcut on your desktop. Right click on the shortcut > Properties, and copy the Target line.
    It will look like something like this:


    Note: Dont copy the line above. Each system / configuration is different!
    With /Target:1 you can even specify which monitor/TV you want changed. An additional benifit of Powerstrip over 12NOON DC (see below), is that profiles can be stretched a little off spec. i.e. 30Hz can be manipulated to 29.9hz, which is not a standard.

    12NOON DC
    This program has the same advantage as Powerstrip AND its free. :)
    However, 12Noon DC changer is not as flexible as Powerstrip.


    Instead of Path you need to insert the actual location of the files. i.e. C:\\12NOON\\dc.exe.
    "-refresh=" sets the desired refreshrate. In the given example it is 24.

    External command:

    in c:\ create a text file. As an example name the text file "24hz.bat" or "24hz.cmd". Obviously, this will only be the command to change the Refreshrate to your setting of Cinema/24fps media.
    In that text file you need to write (using notepad) the command to change the refreshrate.

    Example to change resulotion to 24 Hz and wait 5 seconds for it to happen befor starting playback:


    The field in ACTION would look like:
    c:\\24hz.bat


    Wait.exe - Freeware Utilities free
    This is a small program that makes your computer wait xx seconds before resuming to the next command. You can add this in your external command file after your RR changing command.
    The format used is:
    wait <sec>

    -------------------------------------------------------------------------------------------------------------------------------------------


    Known issues
    - When using the combination of moving pictures plug-in + using "devicereset=true" then the video playback takes over leaving no the user unable to see the MP gui, or even stop playback. Possible solution is to uncheck "use device reset".

    - When starting a media file, the refreshrate change causes the mediafile to stop playback. First, try to check "use device reset". IF that does not work, make use of external commands and include the WAIT.EXE in the file. Example for ATI profile is:
    c:\Program Files\ATI Technologies\ATI.ACE\Core-Static\CLI.exe start Load profilename="CinemaProfile"
    c:\wait 3


    Please contribute if u find any bugs or have other issues..
    Comments on the firstpost you can direct to Edterbak.
    This post is written by Edterbak.


    /gibman
     

    pvkleeff

    Portal Member
    July 18, 2007
    32
    5
    49
    Roosendaal
    Home Country
    Netherlands Netherlands
    I would really like to test this, since I have a tv which can handle all refresh rates. I hope that this gets included in the public SVN's (make it optional) because I think this would be a big plus for MP (I know MP2 will be able to do this).
    I've been toying with reclock, refresh rateplugin, powerstrip with hot-keys, etc etc, so for me this is great news.

    Thanks gibman.
     

    revs

    MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    Home Country
    Wales Wales
    Sounds good! I have TV and Blu-Ray setup as needed, but would be nice to have the Refresh Rate change when I play avi files from TV-Series/MyMovies - So i'll check this out!
     

    edterbak

    Portal Pro
    March 4, 2008
    2,114
    1,176
    Home Country
    Netherlands Netherlands
    Yes. +1
    I am struggling to get my setup to work propperly aswell. I got a partially working solution at the moment, but this means that I have to start a movie twice or three times sometimes... The suggested feature of MediaPortal would also truely be a unique feature compared to all other mediaplayer software.

    Also I would like to offer my time as a tester if needed. I truely hope this feature would become a reality.
     

    robyf

    Retired Team Member
  • Premium Supporter
  • June 20, 2005
    1,076
    278
    52
    Bolzano
    Home Country
    Italy Italy
    Great feature expecially for us poor users of vista that can not use reclock!! Can't wait to test it!!

    Thanks for the great job
     

    seco

    Retired Team Member
  • Premium Supporter
  • August 7, 2007
    1,575
    1,239
    Home Country
    Finland Finland
    This is absolutely great news, just what I need.

    Hope we can solve the problems with ATI profiles + device reset discussed in other threads. I'm ready to test!
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    0001572: changing refresh rate within MP is problematic. - MediaPortal Bugtracker
    this one is fixed and will be in this weeks svn.

    So MP will not revert to the original refreshrate when starting media playback.

    As I stated in the original post; using ATI profiles or any other way to change the refresh rate is a lot slower than changing it through powerstrip.
    This is probably tough to do anything about.

    /gibman
     

    kenwonders

    MP Donator
  • Premium Supporter
  • January 19, 2007
    791
    741
    Home Country
    England England
    I bought powerstrip based on my experiences with the now defunct RefreshRateControl plugin, I'm currently using Reclock + VBS + Powerstrip, which pretty much works apart from a really nasty startup that usually includes a jerk or two, screen flash, then a repeat of the last half a second of audio.

    Will this solution be able to cope with that? I'm guessing it might need to have a delay setting to ensure that powerstrip has enough time to do it's thing?

    Thanks for this, it really does make such a difference, especially for us PAL users.
     

    lemonhead

    Portal Member
    August 17, 2006
    28
    1
    50
    Täby
    Home Country
    Sweden Sweden
    This is a feature i have been waiting for. I have tried refreshratechanger-plugin and Reclock and not really gotten it to work properly. A supported solution from the Team sounds just wonderful!
     

    stoked

    MP Donator
  • Premium Supporter
  • December 14, 2007
    297
    8
    Home Country
    Canada Canada
    Awesome, can't wait to try this. I'll have to see if Powerstrip works with my Nvidia 8200 board.
     

    Users who are viewing this thread

    Top Bottom