Automatic Refreshrate Changer (1 Viewer)

bart0190

Portal Pro
January 17, 2009
153
1
Hi,
After Refreshrate Change works fine in my MP I tried to integrate MPC-HC Subtitle Engine to see integrated subtitles in .mkv (1080p).

But now I have problems with the refresh rate change. When starting the video it ends up in main menu of MP. If I start the video a second time it shows the video with subtitles but without changed refresh rate.

Does somebody have the same problem?

br bart
 

mironicus

Portal Pro
March 9, 2008
688
44
AW: Automatic Refreshrate Changer

I found out something interesting: If Mediaportal is changing the refresh rate and you'll press Shift+F1 while playing a video, the info on the display still shows the old refresh rate, even it was changed properly. (Windows 7)

So if you just played a NTSC movie with 60 Hz, and after that you'll watch a PAL movie with 50 Hz and press Shift+F1, the EVR status still shows "60 Hz". So it's no wonder that video playback often tends to stutter within Mediaportal.

Steps to find out:

1) Make sure the desktop is running with 59/60 Hz before you start Mediaportal.
2) Start Mediaportal.
3) Play a 25 fps-movie within Mediaportal. The display changes to 50 Hz.
4) Press Shift+F1
5) You'll see in the picture: "Display refresh rate from windows: 59 Hz". There is still the old refresh rate displayed, even it is "really" 50 Hz.

So it's no wonder that videoplayback is stuttering within Mediaportal.
 

Attachments

  • refresh-rate.jpg
    refresh-rate.jpg
    48.8 KB

Scythe42

Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    Re: AW: Automatic Refreshrate Changer

    5) You'll see in the picture: "Display refresh rate from windows: 59 Hz". There is still the old refresh rate displayed, even it is "really" 50 Hz.

    So it's no wonder that videoplayback is stuttering within Mediaportal.
    The called function for displaying the refresh rate in the stats renderer has a bug. It displays always the value under which the Desktop runs before you started MediaPortal. This is the refresh rate Windows is running under. The function itself doesn't notice any refresh rate changes unless it has been applied over the display properties.

    Thanks for pointing out that bug. I'll fix the wrong stats in SVN repository as soon as I find time for it.

    When you see the stuttering you should notice very high frame painting times every few frames. This is the symptom (reason still unkown, but I have new idea for trying out things to fix this).

    It seems to be caused by Windows itself (and or maybe driver combinations) as we have now reports that similar issues show up with XBMC, MP-HC, WMP as well when refresh rates are changed in various combinations using various tools and not the display properties. The common things seems to be that one of the refresh rates changed to is the one used over display properties for the general Windows desktop.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    It seems to be caused by Windows itself (and or maybe driver combinations) as we have now reports that similar issues show up with XBMC, MP-HC, WMP as well when refresh rates are changed in various combinations using various tools and not the display properties. The common things seems to be that one of the refresh rates changed to is the one used over display properties for the general Windows desktop.

    so given these problems, is there a preferred method of refresh rate changing?
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    so given these problems, is there a preferred method of refresh rate changing?
    stop video playback, change refresh rate over display properties, change back to player application (the actual solution), play movie. :mad:

    Of course this is not acceptable for a media center application.

    MP used the same functions as layed out by MS for driver properties (at least for Win7). The functions itself are not a problem they work smooth (not the one in the stats renderer - different issue). But somehow an already running DirectShow graph or running applications with a custom EVR presenter are not informed by Windows over a new refresh rate unless the Application is refocused. This is the best explanation I can come up with right now why Alt+Tab solves the issue anytime under any player if it shows up.

    With MP we let handle DirectShow the vsync. So we can provide a frame early to the renderer and let it handle the exact timimng. This is what MS recommends with Vista and higher when using a custom EVR presenter.

    I am working on various workarounds (one after another) to see which one can solve the issue of stuttering playback after a refresh rate change:
    - use a different full screen mode similar to XBMC
    - MP handles vsync and not DirectShow
    - automatic application re-focus after RR change
    - and some more crazy ideas...

    Please check https://forum.team-mediaportal.com/watch-edit-videos-104/stutter-after-refresh-rate-change-71311/ for ongoing discussion. I release patched DLLs for testing there as I cannot reproduce the problem on demand on my machine which makes it very hard for me to work on this problem.

    I am currently on vacation and do not have access to by development rig until next week when I can continue to work on the described problem.
     

    Seeco

    Portal Pro
    October 15, 2007
    241
    7
    Linköping
    Home Country
    Sweden Sweden
    pdiaz: OT, a big thanks for the tip about how to enable 23.976 and 59.97 Hz in CCC, it worked like a charm! :) I have always been confounded about how to achieve that.
     

    onyx666

    Portal Pro
    September 26, 2008
    159
    0
    pdiaz: OT, a big thanks for the tip about how to enable 23.976 and 59.97 Hz in CCC, it worked like a charm! :) I have always been confounded about how to achieve that.

    i think this caused the problem i reported earlier.
    when i do this anf i select 23 hz the screen goes to 24 hz (no prblem i think it is rounded up) but when adjusting the refresh rate to 24 hz it actually goes to 25 hz (in mp and mannually in ccc)

    removing the hdtv resolutions resolved the problem \(but now i have no 23 hz anymore.

    anyone who tried this already triied to change refresh rate to 24 hz ?
     

    Seeco

    Portal Pro
    October 15, 2007
    241
    7
    Linköping
    Home Country
    Sweden Sweden
    onyx666: Im not a 100% sure of what you mean, but anyway: I have a Radeon HD4870 and have formerly been using 24Hz (reported as such by Reclock). I have now activated the 1080p24 HD resolution which is called 23Hz in CCC, and which is reported as 23.976Hz in Reclock.
     

    onyx666

    Portal Pro
    September 26, 2008
    159
    0
    onyx666: Im not a 100% sure of what you mean, but anyway: I have a Radeon HD4870 and have formerly been using 24Hz (reported as such by Reclock). I have now activated the 1080p24 HD resolution which is called 23Hz in CCC, and which is reported as 23.976Hz in Reclock.

    i have a hd4550
    i enabled the 23 hz refreshrate by adding the hdtv 1080p24 frequency.

    Now whenever i choose 23 hz in ccc it applies the refresh rate but shows 24hz in ccc.
    when i choose 24hz in ccc it switches to 25hz.
    THis also happens when MP is switching the refresh rates (see my logs)
    with a 24hz movie it says it will switch to 24hz but reports that it switched to 25hz
     

    Users who are viewing this thread

    Top Bottom