Kodi Community Forum
Win HOW-TO play Blu-ray Disc with External Player and auto adjust refresh rate - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Win HOW-TO play Blu-ray Disc with External Player and auto adjust refresh rate (/showthread.php?tid=64658)

Pages: 1 2 3 4 5 6 7 8 9


HOW-TO play Blu-ray Disc with External Player and auto adjust refresh rate - mindweaver - 2009-12-21

Guide to play Blu-ray disc with external player and auto adjusted refresrate

I have struggled with this for a while and with recent updates to XBMC I finally got it to work. I thought I'd share my findings and write you all a small guide on how to make it work.

Applications used in this guide:

ReClock 1.8.5.5

TotalMedia Theater 3 Platinum 3.0.1.160 (TMT)
SlySoft AnyDVD HD (a free and lighter alternative to this is DisplayChanger)
XBMC for Windows (dx-version) starting with build 25821 Found here


Installation and configuration:
Install all the applications mentioned above. Make sure you install ReClock after you install TMT.

First of all we want XBMC to recognize the Blu-ray disc in your drive and execute TMT to play it with, when you hit "PLAY DISC" in XBMC. To do this you have to set up an external player (How-to Wiki)

An external player is set up by placing a xml file called playercorefactory.xml in your userdata folder. The userdata folder can be found in various places.

Windows Vista & Windows 7: C:\Users\<Username>\AppData\Roaming\XBMC\UserData
Windows XP: C:\Documents and Settings\<Username>\Application Data\XBMC\UserData

Place the following xml in that directory and edit it to point to your uMCEDVDPlayer.exe. Make sure to change the args to point to your Blu-ray player:
(The reason I use uMCEDVDPlayer.exe is because it seems to be made for remote control use, easier gui with bigger controls and so on. You can of course choose to use the default program .exe)
Code:
<playercorefactory>
  <players>
    <player name="TMTMCEPlayer" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files\ArcSoft\TotalMedia Theatre 3\uMCEDVDPlayer.exe</filename>
    <args>"D:"</args>
      <hidexbmc>true</hidexbmc>
      <hideconsole>true</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
  </players>
  <rules action="prepend">
    <rule name="Blu-Ray" protocols="bd" player="TMTMCEPlayer"/>
  </rules>
</playercorefactory>
Download: playercorefactory.xml

Now XBMC will start TMT to play your Blu-ray disc. Next up is to get ReClock to change your refresh rate to match that of the movie. ReClock is primarely used give you smoother playback and as a bonus it gives us the possibility to create a auto refresh rate script.

Find ReClock in your start meny and open "Configure ReClock". The important settings to do here (you can of course do so much more, but these are the ones needed for this operation)
  • Force ReClock to be loaded in place of default renderers should be checked
  • Advanced settings - Enable events notifications to VBS script when display mode is changing should checked
  • Don't restrinct app loading should not be checked and below it you will have to Add... "uMCEDVDPlayer.exe" located in your TotalMedia Theater install directory. Select Load always for this item.

Image

ReClock is now instructed to load when it detects a movie started in TMT and to run a VBS-script (RunEvent.vbs) What you need to do now is to create this script and place it in the ReClock install directory.

The RunEvent.vbs looks like this:

Code:
' -------------------------------------
' Event notification script for ReClock
' -------------------------------------
'
' This script will be called when ReClock change the media adaptation of a played file
' either automatically or after some manual change made in the properties panel
' It is called only for media file which contain a video stream, and when frame rate of this file is known
'
' ---------------------------------------------------------------------------------------------
' The 7 parameters received by this script are explained below:
'
' (1) contains the event name that just occurred:
'    - "GREEN"  : tray icon just got green (all is fine). Parameter
'    - "YELLOW" : tray icon just got yellow. We should make what is necessary
'                 to change the monitor refresh rate
'    - "STOP"   : playback just stopped
'    - "QUIT"   : ReClock is about to quit
'
' Parameters (2), (3), (8) and (9) apply only with "GREEN" and "YELLOW" events. Otherwise they contain "-"
'
' (2) contains the type of media file currently played :
'    - "CINEMA" : frame rate of source file is around 24 fps
'    - "PAL"    : frame rate of source file is around 25 fps
'    - "NTSC"   : frame rate of source file is around 30 fps
'    - "CUSTOM" : frame rate of source file does not fall in previous categories
'
' (3) contains the current sound playback mode (apply only with GREEN/YELLOW event):
'    - "PCM"    : PCM mode
'    - "SPDIF"  : AC3 passthrough SPDIF
'
' (4) contains the current monitor selected for playback (1=primary, 2=secondary, etc...)
'
' (5) contains the total monitor count detected in the system
'
' (6) contains the current resolution of your monitor (WIDTHxHEIGHT)
'
' (7) contains the current refresh rate of your monitor (in Hz)
'
' (8) contains the original playback rate of the file (in fps multiplied by 1000)
'
' (9) contains the current playback rate of the file (in fps multiplied by 1000)
'
' (10) contains the filename of the current media file
'
' ---------------------------------------------------------------------------------------------
' Notifications examples:
'   - GREEN CINEMA PCM 1 1 1024x768 72 23976 24000 c:\test.avi : all is good
'   - GREEN NTSC PCM 1 1 1024x768 60 29970 30000  c:\test.avi : all is good
'   - YELLOW PAL SPDIF 1 1 1024x768 72 25000 25000 c:\test.avi : please switch to a multiple of 25 hz since PAL wants 25 fps
'   - YELLOW CINEMA SPDIF 1 1 1024x768 75 23976 23976 c:\test.avi : please switch to 71.928 hz
'
' ---------------------------------------------------------------------------------------------
' Decode the parameters
Set objArgs = WScript.Arguments
If objArgs.Count < 10 Then
    MsgBox "Bad argument count !",  MB_OK, "ReClock Event Notification"
    
    ' We have done nothing. Return 1 to indicate ReClock that
    ' the configuration has not changed
    WScript.Quit 1
End If

eventName = objArgs(0)
mediaType = objArgs(1)
soundMode = objArgs(2)
currentMonitor = objArgs(3)
totalMonitorCount = objArgs(4)
currentResolution = objArgs(5)
currentRefreshRate = objArgs(6)
originalPlaybackSpeed = objArgs(7)
currentPlaybackSpeed = objArgs(8)
currentMediaFile = objArgs(9)

' If you need to debug, replace false with true in the following line
if false Then MsgBox _
    eventName & " " & _
    mediaType & " " & _
    soundMode & " " & _
    currentMonitor & " " & _
    totalMonitorCount & " " & _
    currentResolution & " " & _
    currentRefreshRate & " " & _
    originalPlaybackSpeed & " " & _
    currentPlaybackSpeed, _
    MB_OK, "ReClock Event Notification"


    Set wshShell = CreateObject("WScript.Shell")


' Obviously we have something to do only if the icon is yellow
If eventName = "YELLOW" Then

If originalPlaybackSpeed="23976" Then
    newRefreshRate = "23"
    WshShell.Run """C:\Program files\SlySoft\AnyDVD\SetDisplayFrequency.exe"" " & newRefreshRate, 0, true    
End If

If originalPlaybackSpeed="24000" Then
    newRefreshRate = "24"
    WshShell.Run """C:\Program files\SlySoft\AnyDVD\SetDisplayFrequency.exe"" " & newRefreshRate, 0, true    
End If

If originalPlaybackSpeed="25000" Then
    newRefreshRate = "50"
    WshShell.Run """C:\Program files\SlySoft\AnyDVD\SetDisplayFrequency.exe"" " & newRefreshRate, 0, true         
End If

    WScript.Quit 1

End If

' We quit the player, restore our favorite refresh rate and/or resolution
If eventName = "QUIT" Then
  
    newRefreshRate = "60"

       WshShell.Run """C:\Program files\SlySoft\AnyDVD\SetDisplayFrequency.exe"" " & newRefreshRate, 0, true
          
       WScript.Quit 1

End If

WScript.Quit 1

Download: RunEvent.zip
(There are alot of RunEvent-scripts out there besides mine. They can be found by a simple google search or by browsing the ReClock forum)

In this example I use SlySoft AnyDVD HD's SetDisplayFrequency.exe to change the refresh rate. You can also use DisplayChanger or any other similar program if you like.

Code:
DisplayChanger example:

    WshShell.Run """C:\Program files\12noon Display Changer\dccmd"" -refresh=" & newRefreshRate, 0, true

Make sure you have set up these resolutions/refresh rates in your GPU settings. (I use an NVIDIA 9500GT HeatSink HDMI)

Place the RunEvent.vbs in ReClock install dir (in my case C:\Program Files\ReClock\)

That's it! You're done. You should now have a working external player-script that will run your Blu-Ray discs with TMT and give you smooth video and accurate refresh rate with ReClock.

I hope this guide will be of use. If anything is unclear just ask and I will try to answer Smile


- ashlar - 2009-12-21

GREAT job!

Thank you so much!


- bobrap - 2009-12-21

Yes, thank you. Even I can follow your instructions. Nod


- Laundro - 2009-12-22

Hi -

I've checked, and all my settings in playercorefactory.xml should be correct, but from the logs I see XBMC still tries to load DVDPlayer when selecting "Play Disc" (the disc in question is the Dark Knight Blu-Ray).

Could it be there's a problem with the protocols thing?

Thanks in advance


- mindweaver - 2009-12-22

Laundro Wrote:Hi -

I've checked, and all my settings in playercorefactory.xml should be correct, but from the logs I see XBMC still tries to load DVDPlayer when selecting "Play Disc" (the disc in question is the Dark Knight Blu-Ray).

Could it be there's a problem with the protocols thing?

Thanks in advance

Which XBMC Revision do you have installed?


- Laundro - 2009-12-22

That's XBMC 9.11-Beta2 R25483


- mindweaver - 2009-12-22

Laundro Wrote:That's XBMC 9.11-Beta2 R25483

Please read and follow the guide. You have to use a revision higher than 25821.


- Laundro - 2009-12-22

I'm sorry for not investigating thoroughly enough. Thanks for the quick reply!


- goldstarQC - 2009-12-24

Do you think I can use PowerDVD8 (w. BluRay Support) ? I do not own the TMT software. Also, all the stuff about the right Refresh Rate ? would that work with a Plasma TV connected thru HDMI output ?


- mindweaver - 2009-12-24

goldstarQC Wrote:Do you think I can use PowerDVD8 (w. BluRay Support) ? I do not own the TMT software. Also, all the stuff about the right Refresh Rate ? would that work with a Plasma TV connected thru HDMI output ?

External player will work fine with PowerDVD8. I'm not sure that ReClocks refreshscript will. I will update the guide after christmas with externalplayer xml for PowerDVD. I am now successfully using PowerDVD9 in Cinema mode with it!

Everything depends on which refresh rates your TV can handle. What model do you have? I am using a LG50PG7000 via HDMI and I can get 23.976, 24, 29.997, 30, 50, 59.9 and 60hz.

Tell me your model and I will try to investigate it for you Smile


- ashlar - 2009-12-27

Mindweaver, to get a similar experience with BD ISOs one should need to accept the compromise of using TMT for DVD ISOs as well, am I right?


- mindweaver - 2009-12-27

ashlar Wrote:Mindweaver, to get a similar experience with BD ISOs one should need to accept the compromise of using TMT for DVD ISOs as well, am I right?

I don't know. You will have to ask a developer about that Smile


- goldstarQC - 2009-12-28

mindweaver, my TV is a Fluid Plasma 42in (720p) and I also have a LG 47Y3D 47in (1080p). The main TV used is the Fluid (in my bedroom) because i use my XBMC in my bedroom. Sometime, I move the computer to the Living Room (the LG Tv). Finally, my main Viewing location is my HT in the basement, using a Popcorn Hour A100 (for now, plan to replace that with the XBMC when everything is easy enough to use for my GF). The projector is a Panasonic PT-200u

But, If I do not use the Reclock at all, that will still work well ??


- mindweaver - 2009-12-28

goldstarQC Wrote:mindweaver, my TV is a Fluid Plasma 42in (720p) and I also have a LG 47Y3D 47in (1080p). The main TV used is the Fluid (in my bedroom) because i use my XBMC in my bedroom. Sometime, I move the computer to the Living Room (the LG Tv). Finally, my main Viewing location is my HT in the basement, using a Popcorn Hour A100 (for now, plan to replace that with the XBMC when everything is easy enough to use for my GF). The projector is a Panasonic PT-200u

But, If I do not use the Reclock at all, that will still work well ??

Yes it will work well Smile ReClock just does that little extra smoothening if your TV supports it. Just give it a try.


- ben_moo - 2009-12-29

I'm trying to use this method to load blu-ray movies with MPC-HC, but I just can't get it to work.
MPC-HC will load the blu-ray movie directly without menus if you choose File: Open DVD. But if I use the command line to load a DVD it says it can't find DVD path. (DVD's work fine with the command-line, Blu-rays don't)

Anyone got any ideas?