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.
There is no problem except how you have your settings.  MPC handles 5.1 audio and all others as well, I can assure you.  I'm using 7.1 settings with Atmos, DTS:X, etc with all the players I use and their settings.

In KODI (since your system is 5.1) set audio to 5.1 Wasapi in both settings and enable the formats your AVR handles.  Now you will have proper audio when using videoplayer.

In MPC:
Playback/Output/Audio renderer/System default
Internal Filters/Audio renderer/Device/System default
Internal Filters/Disable all of them in all 3 filter tabs because you are using external filters.... LAV Filters.
Default anything else you changed related to audio.

In LAVFilters:
LAV Audio filter/Bitstreaming/check all the formats that your AVR handles just like you did in KODI for its videoplayer.
Default anything else you changed.

Make sure your AVR is set to automatically switch formats based on the source you give it.  Commonly, the only one I know of that fails in most receivers is AAC which the AVR's usually switch to 'stereo' instead of DD surround.  I have recently started converting a few AAC rips to AC3 using code fed through FFmpeg via CMD which brings the surround out in them and only takes a couple minutes to process.  Very simple.  Other than this single format, all others are perfect.  None of this has anything to do with using this method.  It's present in any method fwiw.
You're the Best. In the Italian Forums I've never found people with so much skills!! Now audio works good with MPC too!!

Today I took your advise that I read in a old post and I got a 1050ti... 4g RAM are really better than 2. Now never video chopped! 

Unfortunately I can't solve the problem about closing MPC in KODI. When I close the video on MPC Kodi can't resize the image and I can see only quarter of tv; but it's not important.. fortunately now can exploit my HDR Tv

TKS
When you close MPC, KODI should not reduce its size and place itself in a quarter of your TV screen and it is important?

Please confirm this setting:  KODI/settings/system/display/general/USE FULLSCREEN WINDOW/ CHECKED - ENABLED - ON.

If that is enabled and it's still having the problem, copy and paste your playercorefactory.xml here.
hi Brazen1,

yes, the "fullscreen" setting should be enable:
- Display mode.              FULL SCEEN 1
- resolution at                3840X2160
- Use Fullscreen window  Enable 

This one is my playercorefactory:

Code:
<playercorefactory>
 <players>
    <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\KODI\AppData\Roaming\Kodi\userdata\PDVD.bat</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
    <player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\KODI\AppData\Roaming\Kodi\userdata\MPCBE.bat</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
    <player name="DVDFab" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files (x86)\DVDFab Media Player 3\FabPlayer.exe</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
 </players>
 <rules action="prepend">
    <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="DVDFab"/>
    <rule filetypes="iso|bdmv|mpls|m2ts|.*3D.*|.*.3D.iso|3D.*" player="PowerDVD"/>
 </rules>
</playercorefactory>[syntax][syntax]


Something wrong?
I don't know if you intentionally removed your user name but it's missing in your .xml?  I can't see how KODI could call PDVD or MPC let alone close properly. 
I assume you have Windows resolution always set to 3840x2160p like you do in KODI?
Just to confirm, you are using W10 v.1709 and KODI v.17.6 and NVidia (which model?)

I see no reason why anyone would need these but you could try adding them after this line: 

<filename>C:\Users\YOUR USER NAME GOES HERE AND IT IS MISSING\KODI\AppData\Roaming\Kodi\userdata\MPCBE.bat</filename>
<hidekodi>false</hidekodi>
<hideconsole>true</hideconsole>
<forceontop>true</forceontop>
heheh no... I didn't remove my PC name.. KODI is the name of my HTPC... I've a poor fantasy!!!

In win setting I've the same resolution as KODI

I use WIN 10 1709 and KODI Leila because I supposed it could be able for 4k HDR (I supposed wrong). Nvidia 1050ti

I'm going to try with your new lines

Tks
nothing also with new lines..

Code:

<playercorefactory>
 <players>
    <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\KODI\AppData\Roaming\Kodi\userdata\PDVD.bat</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
    <player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Users\KODI\AppData\Roaming\Kodi\userdata\MPCBE.bat</filename>
<hidekodi>false</hidekodi>
<hideconsole>true</hideconsole>
<forceontop>true</forceontop>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
    <player name="DVDFab" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files (x86)\DVDFab Media Player 3\FabPlayer.exe</filename>
      <playcountminimumtime>1140</playcountminimumtime>
    </player>
 </players>
 <rules action="prepend">
    <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="DVDFab"/>
    <rule filetypes="iso|bdmv|mpls|m2ts|.*3D.*|.*.3D.iso|3D.*" player="PowerDVD"/>
 </rules>
</playercorefactory>[syntax]


Is it possible that the problem is the KEYS to Exit on MPC? I've to settled with a different keys because I use a mini Logithec (for my opinion very cool) without Functional Botton.. so.. I don't have F4
I've already documented KODI v.18 Leia does not work, at least for me and others.  The playercorefactory.xml is not working properly.  I too had KODI go windowed and deposit itself in a corner of the screen.  Windows V.18 is NOT ready for prime time.  I thought this was made pretty evident?  Deviating from the guide is going to be problematic.  I am on top of updating.  I test v.18 once a week.  I just tested it yesterday.  When it works, I will post accordingly.  Until then, do not deviate.  In the mean time, I don't post every single update because most of the time nothing changes for our use.  IE:  LAV Filters have updated 3 times this month.  MadVR will in a month.  Windows will soon.  Nvidia shortly after.  Etc.

It doesn't matter how you close MPC.  KODI is still going to malfunction.  You will see that closing with a mouse or pressing alt + F4 instead of auto close, still malfunctions.  The new lines of code are not going to help either.  I already tried them but you're welcome to give em' a go also.  I don't get too many confirmation request answers here so I gave up asking and just concentrate on what does and what doesn't work for me.  So, who knows how things will function for you or anyone else?  You too can report back..... or not.
Sorry, i missed to read that i never have to use Kodi Leila. I’ll came back to Kripton immediatly!

You’ve helped me to know a lot of interessing informations

I’m so greatfully to you

can i help you with any test on kodi? I’m at your disposal 👍
Tks..

Anyway, with Kodi Kripton all ok... now I can close MPC without problem. Only sometime, I see with bad resolution or wrong color... but only sometimes!

Now I'm gonna to read your advise.

Unfortunately for my bad English! All good information are in English!
(2018-03-11, 18:17)brazen1 Wrote: [ -> ]Since my goal is to play everything there is and to optionally play them to the highest extent such as with menus, I thought it would be appropriate to set all the defaults to reflect that.  Users still have the option of manually selecting any player which entails 2 button presses to navigate to the 'play using' tab.  I don't consider defaulting the 4 players to reflect their strong points as I've done an issue.  If you desire to use one player for everything, fwiw, no one player can do everything.  But I understand your request.  Typically, users want to play HDR and 3D these days and don't want to pay for capable players but understand MPC with components is free provided they don't mind not using the full potential of their disc and limit themselves to main movie only.  Fwiw, the two pay players (one for 3D with menus and one for UHD HDR with menus) costs less than $15 total on eBay.  If you want to deviate from the defaults, you can simply modify your playercorefactory.xml rules how you desire.  There are already many examples in this thread.  Mainly just edit the rule filetypes to list every file extension you use and assign the rule to MPC-BE.  Something like this:

<rule filetypes="mkv|avi|mp4|mpg|m2ts|vob|bdmv|rar|iso|" player="MPC-BE">

I use FSE for 3D and 4k HDR and retain 10bit.  Nothing is required to be on or off differentiating the two.  Not sure why it would be for you.  But if you insist, the bats don't need to control the on/off.  madVR already does.  Create a 'Rendering' profile for 3D, turn on FSE for it and off for your other profiles.  This way, it toggles FSE on when 3D mode is engaged, and off when finished.  I think this profile rule will work for you:

if (3D) "3D"
else if (srcWidth <= 720) and (srcHeight <= 576)"SD"
else if (srcWidth <= 1280) and (srcHeight <= 720)"HD"
else if (srcWidth <= 1920) and (srcHeight <= 1080)"FHD"
else if (srcWidth <= 3840) and (srcHeight <= 2160)"UHD"
else "4K"
Thanks! Apologies, somehow overlooked your reply.  I can't playback 4K HDR remuxes on FSE all, not sure why; could be my GT 1030, but windowed mode works fine.  Also got some odd 3D issues using powerdvd 17 (tearing, jitter etc) with MVC remuxes, but haven't had time to debug.
I've taken advantage of a function in madVR that will enable NVidia stereoscopic in the event it is not enabled prior to 3D playback.  Playback of HDR disables NVidia stereoscopic and does not enable it when finished for example.  This has already been remedied using the code and method here, launched from KODI.  But, for those times 3D playback is desired when not using KODI, such as testing naked in Windows Explorer for example, and assuming NVidia stereoscopic has been disabled for any reason, 3D playback will function as normal.  Since it is launched from madVR, only madVR capable players will benefit such as MPC.  This will have no affect on PowerDVD since it does not call madVR.  If you are using PowerDVD without launching from KODI, and 3D plays as 2D, chances are NVidia stereoscopic is disabled.  You will have to manually enable it.

Create a .bat file named 3D ENABLE.bat and put it wherever you like.  I put mine alongside the others in AppData\Roaming\Kodi\userdata folder.  Edit this code into it:

@echo OFF
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable
EXIT 

Create another .bat file named 3D DISABLE.bat and put it wherever you like.  I put mine alongside the others in AppData\Roaming\Kodi\userdata folder.  Edit this code into it:

@echo OFF
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /disable
EXIT

If you have copied the profiles I use or have something similar, open madVR settings and navigate to RENDERING and select the 3D profile.  In the 'command line to execute when this profile is activated' enter the address of the 3D ENABLE.bat you just created.  Mine is C:\Users\DAN\AppData\Roaming\Kodi\userdata\3D ENABLE.bat.

In the 'command line to execute when this profile is deactivated' enter the address of the 3D DISABLE.bat you just created.  Mine is C:\Users\DAN\AppData\Roaming\Kodi\userdata\3D DISABLE.bat.

I have added a picture of the setting with the other madVR settings pictures here https://forum.kodi.tv/showthread.php?tid...pid2616287
This 3D enable / disable problem is precisely the biggest reason I was going in circles the end of February. I was attempting to disable with nvlink command within the .bat files but my problem was with the filename/filetypes protocol. I get (and still get) unpredictable results fiddling with filenames / filetypes as I'll elaborate later. (BTW everything is working PERFECTLY don't assume because I start typing something it's because it's broken. I'm just trying to go off in my own direction a bit. Which is why I left the message in the other topic that seems to have gone abandoned.) The solution has been particular driver versions. For instance 385.28 works, as we discovered. The most recent driver, 391.35, works also. The drivers in between do not automatically toggle 3D or they give computer vomit error messages. 

I believe that driver revisions are dependent on video card model and perhaps even BIOS on the video card which makes it darn near impossible to point at a driver version and say - this one works for everyone because it probably won't. It just takes patient trial and error - and don't try to solve 2 or 3 problems at once, stay with a single problem. (This is just general advice or perhaps just rambling that I'm giving based on my experiences.)

The one area where I still struggle trying to experiment with other players for various needs - when you say this: 

"Mainly just edit the rule filetypes to list every file extension you use and assign the rule to MPC-BE.  Something like this:

<rule filetypes="mkv|avi|mp4|mpg|m2ts|vob|bdmv|rar|iso|" player="MPC-BE">"

when do you use filetypes and when do you use filenames? I'm still getting unpredictable results so there's something I'm not understanding. Part of the problem is that the * you see in examples isn't a typical wildcard. Which overrules which for something like a 3D iso. 3D is in the filename but not a filetype (So I'm partially answering my own question.) The documentation in the Kodi Wiki says it's regexp rules and when I google regexp and read, I get confused, I give up, and just leave things as they are.
A page back, I listed various driver versions I tested and my conclusions.  Most of my conclusions have been confirmed by others after pointing them out so I highly doubt a driver version affects some and not others.  Different models will perform differently but when sharing the same driver they all inherit the same flaws or improvements commanded by the driver.  While you are testing driver versions for certain 3D aspects, I am testing for most if not all other aspects including tiny details that may not be of importance to some but are of great importance to others.  After all, diversity is what this guide is all about.  Version 385.28 is the closest all around working driver there is.  V.391.35 has a terrible audio flaw.  Making a general statement that it "works also", may be true in the drivers 3D aspect but after numerous hours of testing, it fails a critical audio aspect requiring a roll back to 385.28 which still behaves nicely in most aspects.  But it too shares some flaws every other driver does such as no RGB 10bit setting.  I have not noticed a critical benefit offered by any of drivers newer than 385.28 other than FSE vs windowed which in of itself is nothing critical, more of a convenience preference.  I think the major updates in driver versions are for video game compatibility tbh. 

I am having no problem with the filename/filetypes protocol.  I understand you are trying to go off in your own direction and probably why it's difficult for you.  Perhaps if you revealed what exactly your own direction is, someone would assist you?  Fwiw, no driver automatically toggles 3D.  This is why I created a method that does.  In the past you simply engaged it and it stayed engaged.  HDR mode has changed all that by switching it off and not switching it back on and may be another reason 3D was put on the backburner while HDR takes center stage.

I don't remember who asked but the question was how to play everything with MPC-BE.  And I responded "Mainly just edit the rule filetypes to list every file extension you use and assign the rule to MPC-BE.  Something like this:

<rule filetypes="mkv|avi|mp4|mpg|m2ts|vob|bdmv|rar|iso|" player="MPC-BE">"

You ask when to use filetypes and when to use filenames?  Well, if you want to alter how I do it and none of the optional codes I provided throughout this guide covers the direction you want to branch out to, you've got to give it some thought.  For example:


<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="DVDFab"/>   
<rule filetypes="iso|bdmv|mpls|m2ts" player="PowerDVD"/>

I want all iso, bdmv, mpls, and m2ts files to open with PowerDVD.  I prefer they open with PDVD because it can handle full rips with menus and all those files are associated with complete disc copies that have menus.
But that creates a problem.  UHD HDR complete disc copies are iso, bdmv, mpls, and m2ts files too.  I do not have special hardware so that PDVD can play UHD HDR so I have to use another player.  So how do I distinguish a UHD HDR plays with a different player since its files share everything associated with PDVD?  Well, those common traits are 'filetypes'.  I can distinguish UHD HDR by 'filename' and make sure I add "HDR, hdr, HDR10, or whatever I choose in the actual file name of the rip.  So, although that UHD HDR title may be an iso file type destined to be handed to PDVD, I can add an instruction that says even though this is an iso file type, hold your horses.... it contains the word HDR in the file name so reroute this special delivery to DVDFab instead of PDVD.

This is an example of a difference between a file type and a file name and how the two protocols work harmoniously.  Fwiw, in the past I had to use "3D" or the likes in the file name.  Because DVDFab does not handle 3D MVC, I removed it from the code as you see in the example above which is my current code.  Instead, because 3D MVC is iso, bdmv, mpls or m2ts, it will call PDVD using file type instead of file name now.  Unlike file name, file types are automatically determined.  The extension does not need to be contained in the naming.

When creating your own rules, I suggest you do not use multiple filename or filetypes rules.  Since you have not shared your intentions, I assume this could be another reason you have unpredictable results.  I have found one rule for each very predictable and very reliable and anything more, problematic.