(2022-08-03, 10:55)TimeZone Wrote: How do I set up Windows Films & TV (video player by Microsoft) app as an external player in Kodi? Or is it even possible, any workaround?
I finally succeeded, kinda.
Dolby Vision videos automatically opens with Films & TV.
(2022-08-04, 17:23)ashlar Wrote: I would appreciate if you could tag me here when you have conducted your tests. I am curious about your results.
@
ashlar you asked me to tag you. Here are my results. The links you provided gave me a starting point for the research, thanks again.
Kodi is not opening the player directly. The chain of events go something like this;
Kodi launches CMD.exe, CMD launches the Films & TV app which in turn plays the specified movie.
Here is the playercorefactory syntax
xml:
<playercorefactory>
<players>
<player name="Films & TV" type="ExternalPlayer" audio="false" video="true">
<filename>C:\windows\system32\cmd.exe</filename>
<args>/K "{0}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="mp4" filename=".*DV.*|.*DolbyVision.*" player="Films & TV"/>
</rules>
</playercorefactory>
- The filename is the path for CMD not the player
- The argument /K tells CMD to pass some parameters after it opens, the parameter passed is the movie path. Without this argument CMD opens but does nothing. There are two possible arguments /K or /C.
- With /K, CMD remains open after sending commands to the player while with /C it closes immediately the player opens.
- I decided on /K because Kodi listens to CMD.exe which it thinks is the player and it knows nothing about the actual player (Films & TV). When CMD.exe exits, Kodi assumes the player has existed or finished playing the video.
- The argument "{0}" submits the absolute path to CMD and must be in quotes for CMD to process it properly. This argument works for both local and network paths. I tested with SMB path.
- <hidexbmc>. I am temporarily hiding Kodi so that I just have to deal with CMD and the Films & TV to avoid some windows from hiding behind others. When CMD is closed, Kodi restores automatically.
- Lastly and most importantly, you must set up Films & TV as the default player for DV videos in Windows. The syntax doesn't mention the player, CMD opens the default player. I believe the player can be specified with extra commands but this is simplest.
Drawbacks to this method
- The App can only play MP4 DV, not MKV.
- The player is not really outputing DV stream, so HDMI doesn't detect it as DV even if the TV supports DV.
- The app either stripes away DV metadata or tone map DV to either SDR or HDR. Not sure whether it tone maps or sripes away but with HDR enabled on Windows settings the picture quality is better than awosome. The problem is, this requires you to go into Windows settting to enable HDR. Could be a problem without a mouse.
- The /K command leaves CMD hanging around. You have to manually close the player then CMD to access Kodi. This again requires a mouse.
To make this even better, I need to find a way to turn on HDR automagically in Windows when the movie launches just like Kodi does.
A way to autoclose both the player and CMD after the movie is done would be a bonus.