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.
I want to differentiate TV Series with video resolution 576p and 720p for MPC-HC external player and rip bluray 2D 1080p for MPC-BE for  external player.

The hope is , that KODI can analyze metadata , I'll try tomorrow the two rules "rule videoresolution" in the meantime, thank you , I'll let you know if I'm going well.
I anticipate KODI v.18.1 will be available tomorrow in a prerelease or nightly build now that it appears KODI LEIA v.18 is ready for official release.  I will be installing and using v.18.1 as soon as it becomes available fwiw.  For now, I have the official v.18 release installed.  I think the most interesting thing between the versions will be the v.19 name announcement.  In the mean time, if anyone notices any bugs, now is the time to report them so that v.18.1 can address them.
Then , I did some tests with the two rules that you gave me , this is what I'm automating :

<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/> KMPlayer , external player default , with contents UHD HDR = OK.
<rule videoresolution="480|576|720" player="MPC-HC"/> MPC-HC , external player default , with contents SD 480p and 576p = OK.  I have not tried with video resolution 720p , but I think it's fine.
<rule videoresolution="1080" player="MPC-BE"/> MPC-BE , external player default , with contents 2D 1080p = OK.
<rule filename=".*HEVC.*" player="PotPlayer"/> PotPlayer , external player , unfortunately I can not to have external player PotPlayer automated of default for HEVC , it is automated such as external player MPC-BE

All my contents HEVC , they are at a video resolution 1080p and they do not have HEVC in the file name , anyway , with the rule <rule filename=".*HEVC.*" player="PotPlayer"/> before this change , external player PotPlayer was automated for HEVC , though HEVC it was not in the file name. Then , at the end there is conflict with  external player PotPlayer and MPC-BE.

PS. The Video renderer is madVR. and "Rule OK." it means that the string of the rule regarding for what concerns external Player in use all right before the change.
Add 'HEVC' in the file name.
I do not see why I should add HEVC in the file name , if before even without HEVC in the file name, PotPlayer it was automated for the codec HEVC , and in any case also add HEVC in the file name , with the rule <rule filename=".*HEVC.*" player="PotPlayer"/> I always have MPC-BE like external player of default.

I also tried with these rules:
<rule filetypes="mkv" filename="mkv" videocodec="hevc|h265" player="PotPlayer"/>
<rule filetypes="mkv" filename="mkv" videocodec=".*HEVC.*" player="PotPlayer"/>
without positive result.
Sorry, I didn't notice your HEVC files are all 1080p and assumed they were all 2160p.

1) You have this rule:  <rule videoresolution="1080" player="MPC-BE"/>  (ALL 1080p RESOLUTION  titles are going to open with MPC-BE no matter what codec, file extension, file name, etc.)
and
2) You have this rule:  <rule filename=".*HEVC.*" player="PotPlayer"/>  (ALL titles with HEVC in the FILE NAME are going to open with PotPlayer no matter what codec, file extension, resolution, etc.) 

But there is a conflict.  All your HEVC (rule 2) files are ALSO 1080p (rule 1) files.  So, rule 1 wants to use MPC-BE and rule 2 wants to use PotPlayer.  That is a conflict.  You can't have it both ways.  We would want to 'nest' a further refinement to one of the two rules but afaik, you can only ADD to a nest and you need to EXCLUDE.  Something like:

<rule videoresolution="1080|[^…HEVC] player="MPC-BE"/>
or 
<rule videoresolution="1080" exclude videocodec="HEVC" player="MPC-BE"/>  but there is no meta-character KODI understands "[^…]" or an 'expression' "exclude" that would refine and eliminate afaik.  You can try playing with: <rule videoresolution="1080" videocodec="[^…HEVC]" player="MPC-BE"/>

Even if you replaced attribute rule filename with rule videocodec, there would still be a conflict between HEVC codec and 1080p resolution.

What happens if you use these rules:  (as I stated early on, two filename rules did not work for me long ago and not sure if that's changed but give it a try)

<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/>
<rule filename=".*1080.*" player="MPC-BE"/>
<rule videoresolution="480|576|720" player="MPC-HC"/>
<rule videocodec="HEVC" player="PotPlayer"/>

Make sure 1080 is in the file name for titles you want to open with MPC-BE.
Make sure 1080 is not in the file name for HEVC titles you want to open with PotPlayer.
I told you I wanted to complicate my life a little bit with the rules , but I always try to with the look to add new "knowledge" Tomorrow I try to see what comes out on what you gave me , in the meantime I thank you and I will let you know.
I did a test in this instant , unfortunately I have to report that with the two rules <rule filename=".*1080.*" player="MPC-BE"/> and <rule videocodec="HEVC" player="PotPlayer"/> both for both contents 1080 HEVC and 2D 1080 for external player PotPlayer and MPC-BE , when I open any content 1080 HEVC and 2D 1080 they open with VideoPlayer di Kodi.

I really have to give up !?!?
As I've stated a couple times now, I haven't been able to use rule filename more than once.  What happens if you remove <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/> so that there is only one instance of rule filename just for testing?  Did you even try this:  <rule videoresolution="1080" videocodec="[^…HEVC]" player="MPC-BE"/>  I was thinking maybe that code will play 1080p resolution files but omit any that are HEVC codec.  Understand, I don't use PotPlayer or KMPlayer and I don't have a need to assign players like you want to and I've never investigated it.  I don't mean to abandon you but I've exhausted my knowledge.  Maybe someone else knows better and they will reply to you.
if I remove the rule <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/> obviously the UHD HDR content is reproduced by VideoPlayer of KODI.
if I add the rule <rule videoresolution="1080" videocodec="[^…HEVC]" player="MPC-BE"/> the 2D content 1080p is reproduced by MPC-BE , but the codec HEVC is also played with MPC-BE , not PotPlayer.

<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/>
<rule videoresolution="1080" videocodec="[^…HEVC]" player="MPC-BE"/>
<rule videoresolution="480|576|720" player="MPC-HC"/>
<rule videocodec="HEVC" player="PotPlayer"/>

the only rules that currently give satisfaction , I'm : <rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/> and <rule videoresolution="480|576|720" player="MPC-HC"/>

You are not abandoning me , rather , much appreciated on my part for the hard work in trying to help me.
Do these work:

<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/>
<rule videoresolution="480|576|720" player="MPC-HC"/>
<rule videocodec="h264|h262|avc|mpeg-2|vc-1|xvid|divx" player="MPC-BE"/>
<rule videocodec="hevc|h265" player="PotPlayer"/>

or

HEVC, H264, VC-1, etc.

There are duplicate rules, but the order might matter, where they are selected in order.
in the meantime, I thank you , we are almost there .

<rule videocodec="hevc|h265" player="PotPlayer"/> with this rule , for external player PotPlayer automated for HEVC videocodecs , with video resolution for 1080p content it is opened PotPlayer. OK.

<rule videocodec="h264|h262|avc|mpeg-2|vc-1|xvid|divx" player="MPC-BE"/> with this rule , for external player MPC-BE automated for videocodecs 2D , with video resolution for 1080p  =OK. wanting I can remove videocodec for xvid|divx. that I do not care.

<rule filename=".*HDR10.*|.*HDR.*|.*hdr.*" player="KMPlayer"/> with this rule , for external player KMPlayer automated for videocodecs HEVC - UHD / HDR , with video resolution for 2160 and HDR in the file name it is opened PotPlayer instead of KMPlayer

<rule videoresolution="480|576|720" player="MPC-HC"/> with this rule , for external player MPC-HC automated for videoresolution 480|576|720 =OK.

For KMPlayer , I tried this rule <rule videoresolution="2160" player="KMPlayer"/> but it is opened PotPlayer instead of KMPlayer.
Again, you have the same conflict.  You want "hevc|h265" for PotPlayer.  And you want ".*HDR10.*|.*HDR.*|.*hdr.*" for KMPlayer but they are also hevc|h265.  hevc|h265 and HDR10.*|.*HDR.*|.*hdr are the same things.  You can't have it both ways.

Fwiw, I'm using LEIA v18.1 now.  When 3D engages using VideoPlayer, it puts KODI GUI into 3D mode during playback as it should.  After playback, the GUI remains in 3D and does not release unless a non-3D title is played to force it to release.  Afedchin said the issue is known and I'm just confirming the latest 18.1 nightly does not reflect any fix... yet.  This only happens with the internal player and not externals.

Stacked iso playback results in KODI crash.  The issue has been posted in another thread with a debug log.  Not sure if either of these bugs has made it to GitHub yet though?

I know of no other issues with v.18.1 at this time.
Fwiw, I'm also using FSW in madVR settings for all playback now.  No FSE at all unless I run across something that needs it.
I understood this that there is a conflict , there is not  a Type regexp or boolean that can be helpful To differentiate the rule on the same videocodec HEVC ? Then , there is no solution...
It would be advantageous to look at your situation from a different angle as it all gets pretty confusing after a bit.  List exactly what you want each player to do and more importantly, why.  For example, you lost me earlier when you wanted to separate TV shows from movies by resolution using different players.  Imo, you could use the same player unless you were making different adjustments between the two players (MPC-HC/BE) but you weren't clear about what you were doing and why when asked?  You should also post your complete PCF.xml so it's easier to decipher.