• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 84
Win HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players ISO Menus
(2016-09-20, 16:35)brazen1 Wrote: Navigate to Videos/Files. (I made a home page, submenu, shortcut)
Select your BDROM drive.
Bring up the context menu by pressing 'C' on your keyboard or mapped remote button.
Select 'Play Using'.
Select 2D or 3D.
PDVD should open and begin playback.

Thanks so much for your response. Unfortunately I'm having some trouble.
My BDROM Drive is "K:" driver on my system.

In Kodi, I went to Video -> Files and clicked on "Add Videos..." and then "Browse"
Over here I see all my Hard Drives and some other things like "Home Folder", "Network File System (NFS)", "Windows Network", "UPnP Devices", etc. ... however, I don't see "K:" as an option. I don't see anything referring to an optical drive.

I also have VirtualCloneDrive installed in the system, which as a 1 virtual drive, with the letter "J:". This also doesn't show up in this list (Although I don't need it to).

Maybe I'm doing something wrong or looking in the wrong place?
Reply
(2016-09-20, 17:42)luci5r Wrote:
(2016-09-20, 16:35)brazen1 Wrote: Navigate to Videos/Files. (I made a home page, submenu, shortcut)
Select your BDROM drive.
Bring up the context menu by pressing 'C' on your keyboard or mapped remote button.
Select 'Play Using'.
Select 2D or 3D.
PDVD should open and begin playback.

Thanks so much for your response. Unfortunately I'm having some trouble.
My BDROM Drive is "K:" driver on my system.

In Kodi, I went to Video -> Files and clicked on "Add Videos..." and then "Browse"
Over here I see all my Hard Drives and some other things like "Home Folder", "Network File System (NFS)", "Windows Network", "UPnP Devices", etc. ... however, I don't see "K:" as an option. I don't see anything referring to an optical drive.

I also have VirtualCloneDrive installed in the system, which as a 1 virtual drive, with the letter "J:". This also doesn't show up in this list (Although I don't need it to).

Maybe I'm doing something wrong or looking in the wrong place?

Just wanted to update:

I didn't have a disc inserted in the BDROM Drive, and that may have been the issue. Once I inserted a Blu-ray disc in the drive, I do see the "K:" option in the list of drives under Video -> Files.

When I do hit "Play" on that though, it doesn't play, instead gives me an error "Could not start playback. Check the log".

I found this in the log:

08:46:52 T:5020 NOTICE: VideoPlayer: Opening: K:\BDMV\index.bdmv
08:46:52 T:5020 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
08:46:52 T:5020 ERROR: DXVA::CProcessorHD::IsFormatSupported - Unsupported format 105 for 1.
08:46:52 T:5612 NOTICE: Creating InputStream
08:46:52 T:5612 ERROR: CDVDInputStreamBluray::Open - Media stream scrambled/encrypted with AACS
08:46:52 T:5612 ERROR: CVideoPlayer::OpenInputStream - error opening [K:\BDMV\index.bdmv]
08:46:52 T:5612 NOTICE: CVideoPlayer::OnExit()
08:46:52 T:5020 ERROR: Playlist Player: skipping unplayable item: 0, path [K:\BDMV\index.bdmv]
08:46:52 T:5020 NOTICE: CVideoPlayer::CloseFile()
08:46:52 T:5020 NOTICE: VideoPlayer: waiting for threads to exit
08:46:52 T:5020 NOTICE: VideoPlayer: finished waiting
08:46:52 T:5020 NOTICE: CVideoPlayer::CloseFile()
08:46:52 T:5020 NOTICE: VideoPlayer: waiting for threads to exit
08:46:52 T:5020 NOTICE: VideoPlayer: finished waiting

Does this help?
Reply
(2016-09-20, 18:04)luci5r Wrote:
(2016-09-20, 17:42)luci5r Wrote:
(2016-09-20, 16:35)brazen1 Wrote: Navigate to Videos/Files. (I made a home page, submenu, shortcut)
Select your BDROM drive.
Bring up the context menu by pressing 'C' on your keyboard or mapped remote button.
Select 'Play Using'.
Select 2D or 3D.
PDVD should open and begin playback.

Thanks so much for your response. Unfortunately I'm having some trouble.
My BDROM Drive is "K:" driver on my system.

In Kodi, I went to Video -> Files and clicked on "Add Videos..." and then "Browse"
Over here I see all my Hard Drives and some other things like "Home Folder", "Network File System (NFS)", "Windows Network", "UPnP Devices", etc. ... however, I don't see "K:" as an option. I don't see anything referring to an optical drive.

I also have VirtualCloneDrive installed in the system, which as a 1 virtual drive, with the letter "J:". This also doesn't show up in this list (Although I don't need it to).

Maybe I'm doing something wrong or looking in the wrong place?

Just wanted to update:

I didn't have a disc inserted in the BDROM Drive, and that may have been the issue. Once I inserted a Blu-ray disc in the drive, I do see the "K:" option in the list of drives under Video -> Files.

When I do hit "Play" on that though, it doesn't play, instead gives me an error "Could not start playback. Check the log".

I found this in the log:

08:46:52 T:5020 NOTICE: VideoPlayer: Opening: K:\BDMV\index.bdmv
08:46:52 T:5020 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
08:46:52 T:5020 ERROR: DXVA::CProcessorHD::IsFormatSupported - Unsupported format 105 for 1.
08:46:52 T:5612 NOTICE: Creating InputStream
08:46:52 T:5612 ERROR: CDVDInputStreamBluray::Open - Media stream scrambled/encrypted with AACS
08:46:52 T:5612 ERROR: CVideoPlayer::OpenInputStream - error opening [K:\BDMV\index.bdmv]
08:46:52 T:5612 NOTICE: CVideoPlayer::OnExit()
08:46:52 T:5020 ERROR: Playlist Player: skipping unplayable item: 0, path [K:\BDMV\index.bdmv]
08:46:52 T:5020 NOTICE: CVideoPlayer::CloseFile()
08:46:52 T:5020 NOTICE: VideoPlayer: waiting for threads to exit
08:46:52 T:5020 NOTICE: VideoPlayer: finished waiting
08:46:52 T:5020 NOTICE: CVideoPlayer::CloseFile()
08:46:52 T:5020 NOTICE: VideoPlayer: waiting for threads to exit
08:46:52 T:5020 NOTICE: VideoPlayer: finished waiting

Does this help?

Third and most positive update:

I had a problem with the "Playercorefactory.xml" file - as I had noted previously - I had made a few small changes to it. After making the appropriate corrections, I'm happy to report that I'm able to play my inserted Blu-ray Disc in PowerDVD using the Video -> Files -> "Play" method. It's working well! Thank you!

I did need to enable AnyDVD HD. I was getting an HDCP error without it.

So my query changes now.

I have 2 issues I'm hoping you can help with:

(1) As I mentioned, I also have VirtualCloneDrive installed, using the letter "J:" for the virtual drive. This is used to mount ISO's from the Kodi Movie Library, then playable by PowerDVD.

What is happening is, when I click "Play" on my Blu-ray Drive letter "K:", PowerDVD Launches, but it's trying to use "J:" which is the VirtualCloneDrive Virtual Drive. I have to manually, using Keyboard, switch to "K:", then hit play, and then it starts playing the Disc. If I go back into Kodi Library and play an ISO, PowerDVD is able to use "J:"

As you can see, this involves keyboard interaction & I'd like to mitigate that if possible.

In the ".BAT" file you gave, under the "Tonguelay ISO" function, I see that you asked us to specify the VirtualCloneDrive drive letter here:

Code:
:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
timeout /t 3
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" J:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

So my question, is it possible to tell PowerDVD which drive letter to use when it's trying to play a Blu-ray Disc using the optical drive, as opposed to playing an ISO in the movie library? Can we perhaps add "K:" somewhere in the code below, which I'm guessing is what plays a Blu-ray Disc in the optical drive, in PowerDVD:
Code:
:plaympls
set pth=%1
set pth=%pth:~1,-25%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" %pth% exit
GOTO end

(2) My other issue is more of a convenience thing. Right now the only way to reach the Blu-ray Disc is going into Video -> Files. Is it possible at all to a "Play Disc" or something of that nature right into the main menu, where we have "Movies", "TV Shows", "Videos" etc, as opposed to going into Videos -> Files?

Thanks a lot for your help!![/code]
Reply
Quote:when I click "Play" on my Blu-ray Drive letter "K:", PowerDVD Launches

Make sure Windows Auto Play option is Take No Action when disc is inserted.
Also, try not selecting Play on the drive letter. That may make a difference?
Navigate into the virtual rom and then select Play for the bdmv or context menu © and select play using and then 2D.

Just so you understand, PDVD has a built in virtual rom.
If you selected play using PDVD from Windows Explorer, PDVD will mount on the next available drive letter for that iso.

If that doesn't work for you, this is another way of doing it:

Create and add this PlayDISC.bat next to your others.

Code:
@echo off

"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" K:

exit

and use this playercorefactory.xml (EDIT YOUR NAME THREE TIMES)

Code:
<playercorefactory>
  <players>
     <player name="3D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO3D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
     <player name="2D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO2D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
     <player name="DISC" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayDISC.bat</filename>
       <args>"{1}"</args>
       <hidexbmc>false</hidexbmc>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
  </players>
     <rules action="prepend">
       <rule filetypes="mkv|avi|strm|mov|flv|mp4|webm|3gp" player="VideoPlayer"/>
       <rule filename=".*.3D.*|.*.3D.iso|3D.*" player="3D"/>
       <rule filetypes="iso|bdmv|mpls|m2ts" player="2D"/>
     </rules>
</playercorefactory>

Quote: My other issue is more of a convenience thing. Right now the only way to reach the Blu-ray Disc is going into Video -> Files. Is it possible at all to a "Play Disc" or something of that nature right into the main menu, where we have "Movies", "TV Shows", "Videos" etc, as opposed to going into Videos -> Files?

I have seen skins that have 'Play Disc' already added to the main menu.
Many allow you to add a main menu item by setting up items, such as a specific file/folder.
You should get a feel for it by starting in skin settings/main menu items and see if it can be edited to add a shortcut to your bdrom drive.

Please star rate this thread as you see fit.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
(2016-09-21, 02:01)brazen1 Wrote:
Quote:when I click "Play" on my Blu-ray Drive letter "K:", PowerDVD Launches

Make sure Windows Auto Play option is Take No Action when disc is inserted.
Also, try not selecting Play on the drive letter. That may make a difference?
Navigate into the virtual rom and then select Play for the bdmv or context menu © and select play using and then 2D.

Just so you understand, PDVD has a built in virtual rom.
If you selected play using PDVD from Windows Explorer, PDVD will mount on the next available drive letter for that iso.

If that doesn't work for you, this is another way of doing it:

Create and add this PlayDISC.bat next to your others.

Code:
@echo off

"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" K:

exit

and use this playercorefactory.xml (EDIT YOUR NAME THREE TIMES)

Code:
<playercorefactory>
  <players>
     <player name="3D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO3D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
     <player name="2D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO2D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
     <player name="DISC" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayDISC.bat</filename>
       <args>"{1}"</args>
       <hidexbmc>false</hidexbmc>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
  </players>
     <rules action="prepend">
       <rule filetypes="mkv|avi|strm|mov|flv|mp4|webm|3gp" player="VideoPlayer"/>
       <rule filename=".*.3D.*|.*.3D.iso|3D.*" player="3D"/>
       <rule filetypes="iso|bdmv|mpls|m2ts" player="2D"/>
     </rules>
</playercorefactory>

Quote: My other issue is more of a convenience thing. Right now the only way to reach the Blu-ray Disc is going into Video -> Files. Is it possible at all to a "Play Disc" or something of that nature right into the main menu, where we have "Movies", "TV Shows", "Videos" etc, as opposed to going into Videos -> Files?

I have seen skins that have 'Play Disc' already added to the main menu.
Many allow you to add a main menu item by setting up items, such as a specific file/folder.
You should get a feel for it by starting in skin settings/main menu items and see if it can be edited to add a shortcut to your bdrom drive.

Please star rate this thread as you see fit.

Brazen,

Thanks for the code and all your help.

One question, in the playercorefactory.xml, I see we created a new <player> with the name "DISC", however, I don't see this player being called in the <rules> section. How will Kodi know to fire PlayDISC.bat if we haven't matched up the <player> called "DISC" with any of the rules? I might be missing something.

Thanks!
Reply
You're welcome.
Try it. When a disc is present, it defaults to open with PDVD.
If you want more specific rules for file names or types, create them or I will try to for you providing you give exact details.
You always have a choice of what player to call by pulling up the context menu on an item by pressing © at 'Play Using' should you wish to manually circumvent the default.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
As hardware, firmware, software and users evolve, so has the setup for Nvidia 4k.
This may apply to 1080 users as well.
This setup is 100% reliable and continues to perform perfectly imo and no reason anyone else's can't as well.
Every file in the Kodi wiki sample page functions perfectly, audio and video.
Simply add the playercorefactory.xml below and you are done. I have included some tuning info.

Description:
Windows desktop and Kodi run at 60Hz, as they should.
All my titles are 23.976 frame rates complete full ripped bdmv's in iso container and a handful of stripped mkv's, HEVC, 2D and 3D.
Match frame rate on start and stop is enabled.
Nvidia switches from 60Hz to 23/24 Hz when I press play, matching my titles frame rate.
When the title ends, Nvidia switches back to 60Hz and stays that way until another title is started.
When Kodi quits, to Windows desktop, it remains 60Hz, as it should.
I pass all audio including Atmos and DTS:X.
There is zero dropped or skipped frames and no micro stutter or any of the other complaints I read.
There is no interaction on my part required at all. This is all automated. Of course there is an option to manually intervene on the fly at any time.
3D is always enabled globally.
2D titles do not initiate any 3D modes.
3D titles do initiate the proper 3D mode be it SBS, TAB, or Frame Packed MVC, automatically.
I just press the on button for my glasses and sit back and enjoy.

I am using 4k HDMI 2.0 components.
Samsung JS8500
Nvidia GeForce GTX 960
Onkyo TX-NR646 or Denon AVR-S720
Windows 10 x64
PowerDVD 16
Kodi v.17 nightly build, not the Windows store version although it should work by adding your playercorefactory to a different directory. (I am unable to use afedchin build with 4k HDMI 2.0 anymore)

Quick hardware adjustments:

JS8500:
Do not edit or rename HDMI input device type to 'PC' as recommended elsewhere. Although this helps DPI scaling problems in W10 it also looks 'foggy' and greys out most of your settings. (You will still achieve RGB 4:4:4 Color Format when finished)
Set HDMI Black Level to Normal, not Low. Normal is RGB Full. Low is Limited. You want all hardware to match.
Enable HDMI UHD Color. Isn't this why you use 4k?
Set Auto Motion Plus to Smooth.
Set Cinema Black On. This ensures the top and bottom bars in both players is as black as black gets.
Set Sharpness to 50%. Contrast 95%. Backlight 100%. Smart LED High. Brightness 45%. 3D Auto View to Auto2. Everything else off.

You will have to do this 3 times, 4 if you game which I do not. Smart TV's change picture modes automatically depending on what is input to them. They rememeber settings for the different things we input. 3D always renders in 1080p although you will be getting that to each eye now that you are using 4k where as 1080p panels split this to each eye (which still looks good). This is one mode. Windows Desktop is another, and 2D playback is yet another. So, start a title in 2D, pause it, and make your adjustments. Do the same for 3D and again on the Windows desktop. You will also be adjusting Nvidia Control Panel along with your TV. Do them at the same time. Nvidia will also remember each mode after adjusting it once.

Onkyo:
Enable Deep Color by pressing STRM Box and On/Standby at the same time.

PowerDVD 16:
Enable Match Refresh Rate when you see the pop-up for the 1st time and choose not to show you again.
Enable Hardware Acceleration.
Turn off all enhancements.
Enable High Perf Mode.
Select Non-Decode High Def Audio/Full Dynamic Range.
Enable Play 3D media in 3D.
You may need to press pause to engage PDVD 3D mode (bug).
Although PDVD opens via Kodi script(s), it will not close automatically upon title completion. I mapped alt + 4 to my remote. This kills it and returns you to Kodi still in focus and in fullscreen as you left it.

Nvidia installation:

In this exact order,
Download driver, create new desktop folder, and point it to unzip there. Delete folder after install unless you have a reason to keep it.
Choose Custom Install/Clean Install.
Uncheck 3D Vision Controller Driver unless you need it for some reason.
Uncheck Experience unless you want to add a Windows Credential and be reminded for updates.
Open Control Panel.
Adjust Image Settings with Preview. Quality. Apply.
Set Up Stereoscopic 3D Enable.
The Vision Test Window will open. Select Next and Next again.
Your panel will engage 3D. Select the proper images in the next 2 screens including the scrambled box with a pop-out box inside it.
Finish.
You will return to the desktop in low res 3D mode.
Select Change Resolution in Control Panel.
You will see HD 3D 720 is selected. Change it to HD 3D 1080. Change resolution to 23 or 24 Hz (Doesn't matter). Change Color Format, Depth, and Range to RGB, 12bpc, and FULL.
Select Apply and keep changes before reverting.
Now select your native resolution for Ultra HD, HD, SD. Mine is 4k x 2k 3840 x2160. Change Refresh Rate to 60Hz. Select Apply.
Make sure RGB Full is still set. Depth will be blank. It's ok. It will revert to 8, 10, or 12 bit depending on the content it's fed in the future.
Remember to play a 2D title, pause it, minimize the player, and readjust these settings if need be. Do the same for 3D and Windows desktop, all individually. Adjust TV settings at the same time. For example. You are playing a 2D title in KODI or PDVD. Check your panel INFO button. It should show you are playing at 24Hz. Minimize it while paused. Check Nvidia Control Panel color format, depth and range. You should still be at RGB Full. Change if needed. It will remember and you will never have to do it again. Check your TV settings are proper. This too will change depending on what you have input but will remember so you don't have to do it again.

KODI adjustments:
DO NOT run Kodi as admin. PDVD will popup "Disc not found, choose another".

Video/Playback:
Adjust Refresh Rate to Match Video 'On start/stop'.
Pause During Refresh Rate Change '8 Secs'. This is to give ample time for your panel to auto switch preferred 3D mode.
Sync Playback to Display 'Uncheck'. With this setting enabled, you might experience repeated random audio drops using Dolby TrueHD as I have.
Playback Mode of Stereoscopic 3D Videos 'Preferred Mode'.
Disable Stereoscopic 3D Mode When Playback Ended 'Enabled'.
Resolution remains Native. In my case, 3840 x 2160 @ 60Hz. You should always be using 60Hz regardless.
There is no need for any add-on to auto switch 3D modes. Smart TV's do this automatically now.
There is no need for Advanced Launcher to trigger nvstlink.exe toggle anymore or map it to your remote.
Do not enable limited 16-235 color space. Keep KODI matched with your other components at full.

Video/Subtitles:
Subtitle Position on Screen 'Below Video'.
Stereoscopic 3D Depth of Subtitles '5'.

Video/Discs:
Blu-Ray Playback Mode 'Simplified'. This will bring up the context menu 'Play with' allowing you to choose other than what is already focused as the default. You will simply press enter or navigate to your preference.
Blu-Ray Playback Mode 'Show Blu-ray menu'. This will skip the context menu and go directly to the correct player eliminating the extra 'enter' button press. You can still choose players by manually navigating to 'Play with'. When you do the latter, and select play using with dvdplayer, KODI will show your title including Blu-ray menu, etc. Remember, some discs menus work perfectly within KODI and some do not.

System/Settings:

Video/Output:
Stereoscopic 3D Mode (Current) 'Disabled'.
Preferred Mode 'Same as Movie'.
Use a Fullscreen Window Rather Than True Fullscreen 'Enabled' although Disabled using 1 display has presented no problems for me.
I have read that using Kodi to adjust display size introduces ghosting. Always use your panels display size settings to fit to screen.


If you do not have an existing playercorefactory.xml, create one in your C:\Users\YOURUSERNAME\AppData\Roaming\Kodi\userdata folder. This is the only file you need to create and the only one I am currently using. Right click/NEW/Text Document and rename the entire text, playercorefactory.xml and not playercorefactory.xml.txt. Right click your new or old playercorefactory.xml and select edit. Copy and paste the following:

Code:
<playercorefactory>
<players>
   <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe</filename>
   </player>
</players>
<rules action="prepend">
   <rule filetypes="iso|bdmv|mpls|m2ts" player="PowerDVD"/>
</rules>
</playercorefactory>

You are finished. Alternatively, you may need or choose to use the following setup depending on your hardware and external player(s) of choice:

Windows 10:
There is no need for Task Schedular tasks anymore.
You will still need Virtual Clone Drive or the likes to mount iso's for your external player. (You want a dedicated drive letter assigned or prefer the quicker mounting vs PDVD internal)
Set Windows Audio Properties as usual.

4k & 1080 users may need to use an additional JScript code to switch refresh rates appropriately if needed. (2D renders as 3D problem) I don't but you might. Here's how to do it:
google qres.exe or just get it from http://www.majorgeeks.com/files/details/qres.html
Create a folder in your User/Documents folder and name it RefreshRateChanger. Put QRes.exe inside it. Create .txt file and rename to switch.js in the same RefreshRateChanger folder. Edit in this code:

Code:
(function() {
      var refreshRate = 0;

      // Get current refresh rate

      var wmiService = GetObject('WinMgmts://./root/cimv2');
      refreshRate = new Enumerator(
          wmiService.ExecQuery('SELECT * FROM Win32_VideoController WHERE Availability <> 8')
      ).item(0).CurrentRefreshRate;
      
      if (typeof refreshRate != 'number' || refreshRate === 0) {
          WScript.Echo('Duh. Cannot determine current refresh rate.');
      } else {

          // Run QRes.exe to change refresh rate

          var fs = new ActiveXObject('Scripting.FileSystemObject');
          var shell = new ActiveXObject('WScript.Shell');
          shell.Run(fs.GetAbsolutePathName(fs.BuildPath(
              fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')
              ) + ' /x 3840 /y 2160 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);
      }
})();

1080 users can edit this line of code from

) + ' /x 3840 /y 2160 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);

to

) + ' /x 1920 /y 1080 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);

This JScript is also a handy refresh rate switcher for Windows you can create a shortcut for.
I made a switch.js shortcut to my taskbar and click it once to switch from 60Hz to 24Hz when viewing youtube or flash player for example.

The original codes have changed. Here they are:

The files you are about to create/modify are read and launched via Kodi. Some user input is required.
Navigate to C:\Users\YOURNAMEAPPEARSHERE\AppData\Roaming\Kodi\userdata.

If you do not have an existing playercorefactory.xml, create one. Right click/NEW/Text Document and rename the entire text playercorefactory.xml and not playercorefactory.xml.txt. Right click your new or old playercorefactory.xml and select edit. Copy and paste the following and edit 'YOUR USER NAME GOES HERE' with your name (There are 2 lines to edit):


Code:
<playercorefactory>
  <players>
     <player name="3D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURUSERNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO3D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
     <player name="2D" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\YOURUSERNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PlayISO2D.bat</filename>
       <args>"{1}"</args>
       <hidekodi>false</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
    </player>
  </players>
     <rules action="prepend">
       <rule filetypes="mkv|avi|strm|mov|flv|mp4|webm|3gp" player="VideoPlayer"/>
       <rule filename=".*.3D.*|.*.3D.iso|3D.*" player="3D"/>
       <rule filetypes="iso|bdmv|mpls|m2ts" player="2D"/>
     </rules>
</playercorefactory>

Create #1 .bat file as you did for the playercorefactory.xml. Name this PlayISO3D.bat and not PlayISO3D.bat.txt. Edit the following text into it and edit the drive letter you assigned to VCD. The example below shows A: presently. Once again, edit YOURUSERNAMEGOESHERE twice.

Code:
Set file=%1
Set dummy=%file:iso=%
IF NOT %dummy% == %file% (GOTO playiso) ELSE (goto next)

:next
Set file=%1
Set dummy=%file:mpls=%
IF NOT %dummy% == %file% (GOTO plaympls) ELSE (goto playbdmv)

:playiso
"C:\Users\YOURUSERNAMEGOESHERE\Documents\RefreshRateChanger\switch.js"
timeout /t 4
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" A:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
"C:\Users\YOURUSERNAMEGOESHERE\Documents\RefreshRateChanger\switch.js"
GOTO end

:plaympls
set pth=%1
set pth=%pth:~1,-25%
"C:\Program Files (x86)\CyberLink\PowerDVD16\Movie\PowerDVDMovie.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files (x86)\CyberLink\PowerDVD16\Movie\PowerDVDMovie.exe" %pth% exit
GOTO end

:end
exit

Finally, create #2 .bat. Name it PlayISO2D.bat. Edit the following text into it and edit the drive letter you assigned to VCD.

Code:
Set file=%1
Set dummy=%file:iso=%
IF NOT %dummy% == %file% (GOTO playiso) ELSE (goto next)

:next
Set file=%1
Set dummy=%file:mpls=%
IF NOT %dummy% == %file% (GOTO plaympls) ELSE (goto playbdmv)

:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" A:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:plaympls
set pth=%1
set pth=%pth:~1,-25%
"C:\Program Files (x86)\CyberLink\PowerDVD16\Movie\PowerDVDMovie.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files (x86)\CyberLink\PowerDVD16\Movie\PowerDVDMovie.exe" %pth% exit
GOTO end

:end
exit
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
Hi brazen 1,

thanks a lot for your How-to. However I am getting an error in line 19 char 101 (switch.js) - expecting ":" - Code 800A03EB. No idea what I made wrong. In the first view I thought it is because I am using 50Hz instead of 60 Hz - but the failure remains the same when I tried 60Hz (changed at the nvidea control pannel).

Any feedback would be much appreciated.

Thanks
laola
Reply
(2016-10-05, 10:52)laola Wrote: Hi brazen 1,

thanks a lot for your How-to. However I am getting an error in line 19 char 101 (switch.js) - expecting ":" - Code 800A03EB. No idea what I made wrong. In the first view I thought it is because I am using 50Hz instead of 60 Hz - but the failure remains the same when I tried 60Hz (changed at the nvidea control pannel).

Any feedback would be much appreciated.

Thanks
laola

Hmmmm?

Seems a JScript cannot simply be copied and pasted. Windows is struggling with the characters once they are in the clipboard it appears. I myself get an error, fixable, but it's not the same as yours.

Until I figure out something more eloquent, if ever, you can repair it yourself. (I think?) Hosting the file someplace is another option but I'd rather users interact for themselves if possible.

Try this:
D/L install notepad++ 32bit.
Delete the switch.js you have.
Copy the code again.
Create a text file again in the RefreshRateChanger folder in your Documents folder.
Rename it switch.js.
Accept the change.
Right click and select edit.
Paste the code in it.
You will get an error.
Select Cancel.
You will get a new window.
In the file name box type in switch.js if it says something else.
In the Encoding drop down menu select Unicode and save it.
Double click switch.js.
You will get an error as you posted.
Right click switch.js and select edit with notepad++
You will see line 19 on the left.
Click your curser in line 19 some place.
Look at the bottom of notepad++.
You will see COL:
Tab until COL shows 101 (or what ever error line and character shows when you tried to open switch.js)
It should be highlighted in red I think?
Note what the character is and delete it. You may have to press delete twice until it actually deletes.
Now retype that character you just deleted.
In your case I think it's a )
Go to file and save.
Now double click switch.js.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
Many, many thanks to @a11599 & @BatterPudding for donating their skill and determination fixing the JScript code copy and paste problem for users.
You should have no problem now. It works for us.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
yep - now it's working like a charm - except there isn't an automatic swith of the TV (PowerDCD plays fine in 3D mode but I have to manually switch the TV (LG) to the 3D mode. Not a big deal but I am curious how I could fix that....
Reply
so - it seems I screwed up my TV settings. After a hard reset on the TV, 3D automated switching is working again :-). Thanks again for the setup - it is really working great.
Reply
Excellent. Please rate the thread star rating on the top right of the page as you see fit and enjoy.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
(2016-10-04, 20:04)brazen1 Wrote: As hardware, firmware, and software evolve, so has the setup for Nvidia.
This setup is 100% reliable and continues to perform perfectly imo and no reason anyone else's can't as well.

brazen1,

Before I begin to redo my setup and implement your instructions, I have 2 questions:

i. I do not have a 4K system for now. It's all 1080p. The HTPC (nVidia GTX 1080), Epson 5010 3D 1080p Projector, Yamaha RX-A2000 Receiver. That being the case, do I still need to implement the qres/refreshratechanger js implementations as defined in the following:

(2016-10-04, 20:04)brazen1 Wrote: 4k users will be using an additional JScript code to switch refresh rates appropriately. Here's how to do it:
google qres.exe or just get it from http://www.majorgeeks.com/files/details/qres.html
Create a folder in your User/Documents folder and name it RefreshRateChanger. Put QRes.exe inside it. Create .txt file and rename to switch.js in the same RefreshRateChanger folder. Edit in this code:

Code:
(function() {
      var refreshRate = 0;

      // Get current refresh rate

      var wmiService = GetObject('WinMgmts://./root/cimv2');
      refreshRate = new Enumerator(
          wmiService.ExecQuery('SELECT * FROM Win32_VideoController WHERE Availability <> 8')
      ).item(0).CurrentRefreshRate;
      
      if (typeof refreshRate != 'number' || refreshRate === 0) {
          WScript.Echo('Duh. Cannot determine current refresh rate.');
      } else {

          // Run QRes.exe to change refresh rate

          var fs = new ActiveXObject('Scripting.FileSystemObject');
          var shell = new ActiveXObject('WScript.Shell');
          shell.Run(fs.GetAbsolutePathName(fs.BuildPath(
              fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')
              ) + ' /x 3840 /y 2160 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);
      }
})();

I also see references to the above in the PlayISO3D.bat ... would that be required on a non-4K system?

ii. As with my current setup, I'd like to play ALL ISO's, 2D or 3D, blu-ray or DVD, in PowerDVD, and everything ELSE, in KODI. I don't wish to segregate 2D/3D and other video formats in Kodi. I actually made some changes to your original scripts to accomplish this and it works fine for me, but since the refresh rate issue isn't -- I'm starting from scratch -- I just want some advice, what steps/scripts can I skip, considering I'm not segregating 2D/3D and other formats, if I want all ISO's to play in PowerDVD and everything else to play in KODI?

My current Playercorefactory.xml looks like this:

Code:
<playercorefactory>
  <players>
     <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\l3viathan\AppData\Roaming\Kodi\userdata\PlayISO.bat</filename>
       <args>"{1}"</args>
       <hidekodi>true</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
     </player>
    </players>
     <rules action="prepend">
       <rule filetypes="iso|bdmv|mpls" player="PowerDVD"/>
     </rules>
</playercorefactory>

And my PlayISO.bat looks like this:
Code:
Set file=%1
Set dummy=%file:iso=%
IF NOT %dummy% == %file% (GOTO playiso) ELSE (goto next)

:next
Set file=%1
Set dummy=%file:mpls=%
IF NOT %dummy% == %file% (GOTO plaympls) ELSE (goto playbdmv)

:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" J:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:plaympls
set pth=%1
set pth=%pth:~1,-25%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" %pth% exit
GOTO end

:end
exit

As you can see, I have nothing in the above to do with Qres/JS/RefreshRateChanger, and I'm not segregating 2D/3D.

Appreciate your help.

Thanks!
Reply
Read the entire 1st post. If your setup is identical, follow it. If your setup is different, you will see links to other posts for those differences.
I know I need to update the 1st post and make it easier. At some point I might.

Windows 7, 8, or 10?
Normal KODI build or afedchin?
1080 or 4K?
Nvidia, AMD, or Intel?

If refresh rate isn't working for you, backup and undo all your code changes and start from the beginning so we can see where your mods went wrong.
Install whatever applies to you, confirm that it is working, then perhaps we can modify from there.

Since you are a 1080 user and not 2160 (4k), you should not pay attention to post # 112 and instead start at post #1, referencing #46 & #96 if need be. (No idea what O/S or build you are using)
If you'd like to guinea pig try it with what you have, follow post #112 exactly.
Change this line:
) + ' /x 3840 /y 2160 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);

TO

) + ' /x 1920 /y 1080 /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);

I have no 1080 hardware to test with anymore so that's up to you but I'm sure it will work.
Get a working setup installed and then I'll know what to mod for you.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 84

Logout Mark Read Team Forum Stats Members Help
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players ISO Menus39