Kodi Community Forum

Full Version: HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1. Yes
2. Yes
3. While there are plenty of things that could be changed, there is no need.  This keeps the codes and the methods versatile and why things are the way they are.  There will be no speed increases or anything measurable by custom tailoring something for you.  This should not inhibit you from doing so though.  I will suggest if you don't use PowerDVD, don't create the PDVD3DISO.bat and vice versa for MPC-BE and the MPCBE3DISO.  Don't be fooled by the names of the .bats.  They are required for 2D also although if you don't use 3D, the .bats could easily be omitted and code in the playercorefactory.xml be edited by directing a path to the additional external player and delete the lines of code for the .bats (players).  Again, you won't gain anything by doing this except simpler code.  The same applies if not using iso and only using mkv. 

4. Yes.  After you save it, go back to RGB, select full, and save it.  The bit will be blank.  Leave it.  It will change to 12 bit and dither down to 10 when you play a video and go back to RGB 8 bit when in Desktop mode.  There are dozens of other ways to do this but this way is easiest to explain.  Fwiw, recently I have been applying 'use default settings' in NCP.  Then selecting 'Auto' in my panel instead of 'Full'.  The only side effect I've noticed is 'Certain' videos in PDVD do not apply the correct color space.  Most do.  This is a PDVD bug I've only noticed using this player.  It also has a problem applying the correct resolution match using certain .mkv files unlike .iso's.  Using RGB FULL everywhere does not present this anomaly so it's users choice.

5. Latest everything.  I have stopped using Leia x64.  I prefer Titan skin and it's x64 beta is simply too buggy to use with Leia.  I've also noticed iso menus are working pretty damn good with v.17.6.  When select playlist appears, choose 'show Blu-ray menu'.  Seek seems to be a challenge though.  Might just be on my end, not sure?

Don't apologize for a long post.  The more info the better.  Besides, that's a simple note by my standards!
P.S. All my Harmony remote buttons are harmonious with PDVD, MPC, and Kodi.  You mentioned subtitles.  Some are different.  To map MPC sub selection, use 'T' in 'Menu Subtitle Language' in 'Keys' of MPC using Keyboard Device.  The same key in Kodi turns subs off and on.  To map sub selection in Kodi, use 'NextSubtitle' using Media Center PC Device in Logitech Remote GUI.  There are others but these are for subs.

Please rate the stars at the top of the page how you see fit.  Trying to achieve 5 stars but not many vote.
Thank you so much brazen1! I will try this all out starting tonight and report back here if I run into any issues.

I use Harmony remotes as well, so the key mappings will come in handy.

Rated 5 stars, certainly!😊

Regards,

Bart
brazen1:

This is mickey79 from AVS.

I have a non-3D display where I followed your guide on the first page & post #205 to setup Kodi & UHD HDR media playback. 

On this system, since there is no need for 3D, I had re-coded my playercorefactory.xml to segregate only two eventualities:

Play all 1080p Videos (MKV, etc) in Kodi's internal player.
Play all 1080p Blu-ray Rips (ISO's, m2ts, etc) in PowerDVD.

This is my file and it works well:


<playercorefactory>
<players>
   <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\CyberLink\PowerDVD17\PowerDVD.exe</filename>
     <args>"{1}" /fullscreen /close</args>
     <hidekodi>false</hidekodi>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
</players>
<rules action="prepend">
   <rule filetypes="iso|bdmv|mpls|m2ts" player="PowerDVD"/>
   </rules>
</playercorefactory>

Now I need to setup a second layer to play all 4K UHD media in MPC-BE. So essentially:

Play all 1080p Videos (MKV, etc) in Kodi's internal player.
Play all 1080p Blu-ray Rips (ISO's, m2ts, etc) in PowerDVD.
Play all 4K UHD Videos with keywords "4K" or "HDR" in filename (MKV, ISO's, etc) in MPC-BE


I'm struggling a little with this. 

I thought this would work, but it's playing everything in MPC-BE:


<playercorefactory>
<players>
   <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\CyberLink\PowerDVD17\PowerDVD.exe</filename>
     <args>"{1}" /fullscreen /close</args>
     <hidekodi>false</hidekodi>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
   <player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files\MPC-BE\mpcbe.exe</filename>
     <args>"{1}" /fullscreen /close</args>
     <hidekodi>false</hidekodi>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
</players>
<rules action="prepend">
   <rule filetypes="iso|bdmv|mpls|m2ts" player="PowerDVD"/>
   <rule filename="*4K*.*|*HDR*.*" filetypes="mkv|iso|bdmv|mpls|m2ts" player="MPC-BE"/>
   </rules>
</playercorefactory>


Can you suggest a proper solution?

Thanks!!
Hello,

I think you should just leave the filename rule for MPC and remove the filetype part, since it is the same as the rule for PowerDVD, and it is evaluated last, so that's the one Kodi will use.

Please let me know how it goes, since I need to do something quite similar to this. Thanks.

Regards,

Bart
This will open PowerDVD for 2D iso's so you have menus.  Kodi now has menus also btw. 
This will open MPC-BE for UHD HDR's.
This will open Kodi internal video player for everything else.
You didn't want 3D so I didn't include anything.
You can still manually select any player using the 'play using' tab after pressing 'C' aka context menu.

Code:
<playercorefactory>
  <players>
    <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files (x86)\CyberLink\PowerDVD17\PowerDVD.exe</filename>
      <args>"{1}" /fullscreen /close</args>
      <hidekodi>false</hidekodi>
      <hideconsole>false</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
    <player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files\MPC-BE\mpcbe.exe</filename>
      <args>"{1}" /fullscreen /close</args>
      <hidekodi>false</hidekodi>
      <hideconsole>false</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
  </players>
   <rules action="prepend">
    <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="MPC-BE"/>
    <rule filetypes="iso|bdmv|mpls|m2ts" player="PowerDVD"/>
   </rules>
 </playercorefactory>

This is the same as above but includes 3D opened with PowerDVD.  As stated above, you can still manually select a different player.

Code:
<playercorefactory>
 <players>
    <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\YOURUSERNAMEGOESHERE\AppData\Roaming\Kodi\userdata\PDVD3DISO.bat</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
    <player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\YOURUSERNAMEGOESHERE\AppData\Roaming\Kodi\userdata\MPCBE3DISO.bat</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
 </players>
 <rules action="prepend">
    <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="MPC-BE"/>
    <rule filetypes="iso|bdmv|mpls|m2ts|.*3D.*|.*.3D.iso|3D.*" player="PowerDVD"/>
 </rules>
</playercorefactory>
Thanks @brazen1!

Regards,

Bart
@brazen1,

I finally got around to following your great guide.  I installed MPC-BE, madVR, LAVfilters, nVidia Dirver 385.69, and set the resolution in NCP as per your recommendations.  Without changing anything in Kodi (didn't get to the playercorefactory.xml yet), played a movie in Kodi and verified in NCP that refresh rate changed to 23Hz instead of 60, and that it goes back to 60 after movie playback.  Changed settings in MPC-BE as per your guide also.  

Where I am running into my first issue is that when I go to change madVR settings, I don't have anything under "devices", except for an "add device" button.  Any idea why this might be?  I uninstalled madVR using the .bat, removed the folder, rebooted, and installed it again using the .bat, but the problem persists.

Regards,

Bart
Sorry you're having a first issue.  Hope you don't have anymore.  Installing madVR was pretty straight forward for me.  If I remember correctly, my AVR was auto detected and already added named 'Denon -AVR'. It had also auto detected my display connected to that AVR.  It had a big orange question mark since it wasn't configured yet.  From there I simply filled out the details for each device.  I don't know why nothing is auto detected for you because madVR reads EDID data of your system?  I don't know if manually adding your devices would be so easy since you would need the EDID data for them also.  It's probably something obvious, I just can't think of what could be blocking your EDID from being read?  You should ask at the madVR forum at doom9 but be prepared for a length doozy of wait to register.  madshi has been on a hiatus for a while too but others might know.  If I was you, I would get all the components installed and adjusted, play a title for a bit, and see if madvr detects your devices then.  Maybe it doesn't request data at install time but does after it's called for usage?  Wouldn't hurt to try.  In the mean time, is there anything unusual about your system?  madVR detects TV's, PJ's and AVR's (all types afaik).  HDMI mods like funky cables with accelerators for long runs, etc.  Anything out of the ordinary?

You can also create a log that might hint something for you or someone else.  In madVR is 'activate debug mode.bat'.  Then play something for a few seconds.  Log will be on your desktop.
(2017-07-12, 21:01)brazen1 Wrote: [ -> ]So you want fully automated 4k (UHD) HDR too? 

GPU:
*EDIT* As of 385.28 NVidia driver update, newer drivers are now working as intended. Evidently, NVidia updated API so 3D MVC and UHD HDR now work in FSE mode. (As always, DO NOT turn HDR and advanced color switch ON). The new release of madVR v0.92.1 reflects these updates. Yea! AMD and Intel may have also updated though I have no test beds to confirm. Perhaps another user can confirm or deny?

This is only going to work with nVidia GTX 960 or better as long as it hardware decodes. For instance, a GTX 970 is not capable. Intel graphics and AMD are not supported either. At this time, nVidia is the only choice.
 
Brazen1 - i am not too familiar with video cards  - would a gtx 1050 ti card work for this ?

And would this work on an old core 2 quad Q9550 ?

how do you find out if a video card hardware decodes ?  I am looking on the nvidia site and dont see it mentioned anywhere
Yes, a 1050Ti will work.  You want 4GB of memory or more from what ever you choose as some models only have 2GB and are not strong enough to take advantage of more madVR algorithms.  You might also want to consider a full size dual fan model to keep quiet.  Perhaps a single fan model is quiet also but never tried one aside from long ago (650Ti) with a modified firmware to slow the fan at idle.  Newer cards fan(s) rarely engage at least my GTX 960 4GB.  Some of you might also consider installing EVGA Precision XOC to overclock a bit for some extra oomph.  Google tested settings by others for your GPU.  Your Q9559 is fine.  All the workload is done hardware decoding via the GPU.  CPU has little to do with anything unless you prefer to software decode vs hardware decode.  Hardware decode is much better.  Software decode is preferred by most device boxes because GPU's in them are garbage and upgrading would overheat them faster.  Also the leading reason why they are all limited in capability and problematic when it comes to more advanced functions like what we do here.  Google for hardware decoding or not on various GPU's.  Stay away from Hybrid combo's of software/hardware decoding.  These are gaming cards aimed at preserving battery charge in laptops and irrelevant to HTPC's.  Understand many GPU models are answers to other models made by other manufactures so that their model covers the same niche as someone else.  For this reason a 980 for example is not a better model than a 960 simply because the number is higher for the video processing we do here.  Choose carefully.
brazen1,

I finally solved it!  Since I could not figure out what the problem was, I went the extreme way and reformatted my hard drive and did a fresh installation of Windows 10 Pro.  After that, I just installed the 385.69 nVidia driver, and madVR.  I left "use default settings" in the nVidia Control Panel.  Now my Sony TV appears in madVR settings, with all of the correct information, so the EDID was read correctly by madVR.  Now, on to reinstalling Kodi and the rest of the software I had in my HTPC (very carefully, checking and making restore points).  I will let you know how the rest goes once I get to following your guide completely.

Again, thanks a lot for your help.

Regards,

Bart
Obviously something in your operating system was conflicting or corrupted.  For a system that is constantly testing installs, uninstalls, various registry mods, hardware changes that affect software, etc. this can take its toll.  I've had the same things occur like non-functions that make absolutely no sense.  Normally, I'd never advise a complete overhaul but in your case you made a good decision.  I'll give you a tip since you're on another adventure and may incur others after this.  Forget all about system restore.  Use system imaging instead.  It's much more accurate at removing a problem yet leaving your system intact.  You can back up and store as many as you would like.  They take as much time to revert as system restore.  They are more reliable.  You can include notes with each image so months from now you know exactly what the image is.  Handy for those moments you discover a problem that has existed for months but you never knew.  It too is built into Windows, simple to use, and the list of benefits goes on.  I suggest install your O/S, tune it and make an image and store this original one.  Make some changes to your system and note what you did.  Make another image and store this one.  Proceed to more installs and fine tuning, etc.  Make another image and store it with notes.  Do this until you are 100% comfortable and make a final image after everything is up and running and you confirm.  Then decide if you want to delete all the previous ones.  They are only there in case you ran into problems and need to image your way back in time until you find the offense.  From there you'd know how to correct it so you can proceed again.  Update your final image from time to time because somehow we always continue making changes.  I've been using the same image (updated) for years now.  Yes, I run into serious problems testing and modding stuff all the time.  My image always saves me.
brazen1,

Thanks for the tip! I will look into imaging and start using it.

Regards,

Bart
Good news today.  New NVidia driver 390.65-desktop-win10-64bit-international-whql.exe now engages and disengages HDR mode properly.  The stereoscopic wizard is also functioning as intended and 3D is working fine.  However, one persistent problem remains.  Even though stereoscopic is enabled in NCP and W10 display properties, after playback of HDR, stereoscopic is disabled.  Stereoscopic must be enabled again before 3D playback.  This has been an ongoing issue since HDR was introduced.  This is why I created the .bats to enable stereoscopic automatically prior to 3D playback in the guide and has been working perfectly for a year now.  Tested using MPC-BE.  Previously PowerDVD was engaging 3D perfectly using the script as well.  With the new driver, the display reports 3D engaged but PowerDVD is rendering 2D.  Color Space is correct.  Desktop mode is at 60Hz RGB limited 8bit.  3D Video mode is at 24Hz with 10/12 bit using FSE.  2D Video mode is at 23Hz with D3D11 FSE 10bit and Windowed 8bit.  This is all automated.

My NVidia adjustments after driver installation:

Enable stereoscopic and wizard auto runs
Adjust 3D resolution to 1080p (24Hz should already be displayed)
Adjust native resolution to 2160p @60Hz
Use Default color settings (recently I have been using this setting instead of forcing RGB Full.  Use AUTO setting in your display instead of Normal and calibrate if needed)
Under Manage 3D Settings/Program Settings - Add MPC-BE then Vertical Sync to ON
Global Tab - Set power management mode to ADAPTIVE
Adjust Image settings for QUALITY
Configure PhysX to my GTX 960
Content Type Reported leave at AUTO
Use Inverse Telecine OFF
brazen1,

Did you leave "use default settings" in the NCP with this new driver?

Regards,

Bart