Win External players don't show in Kodi
#1
Using for inspiration the Linux playercorefactory.xml from this post (http://forum.kodi.tv/showthread.php?tid=...pid1964753) I created a test Windows playercorefactory.xml for my laptop. Below is its content:

<playercorefactory>
<players>
<player name="vlc" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Apps\vlc-2.2.0 x64\vlc.exe</filename>
<args>"{0}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
</player>
<player name="ffmpeg-save" type="ExternalPlayer" audio="false" video="true">
<filename=C:\Program Files\ffmpeg\bin\ffmpeg.exe</filename>
<args>"-i {0} -acodec copy -vcodec copy "d:\entertainment\recorded\video_%date:~4,2%-%date:~7,2%-%date:~10,4%@h%time:~1,1%m%time:~3,2%s%time:~6,5%.mkv"</args>
<hidexbmc>false</hidexbmc>
</player>
<player name="save-url" type="ExternalPlayer" audio="false" video="true">
<filename>cmd.exe</filename>
<args> "/c echo" "{0}" > "d:\entertainment\urls\video_%date:~4,2%-%date:~7,2%-%date:~10,4%@h%time:~1,1%m%time:~3,2%s%time:~6,5%.txt"</args>
<hidexbmc>true</hidexbmc>
</player>
</players>
</playercorefactory>

I've saved the file (with xml extension) in D:\Users\alan\AppData\Roaming\Kodi\Userdata. Unfortunately, I cannot even test if any of these external players work, because they don't show in Kodi at all. When I press y in Kodi, while playing a stream in the default video player, only one option is shown (DVDPlayer (Default)). I'm not sure if there are syntax errors in my playercorefactory.xml file which prevent these external players to show in Kodi, or there are other reasons.

Any help will be greatly appreciated!

Thank you!
Reply
#2
Look again at the opening and closing tags: <players> you have an s in there?
Unsure about the arguments strings though seems a little too complex for me
Reply
#3
Thank you for your answer, but according to the external players wiki (http://kodi.wiki/view/external_players), <players> and <rules> are valid tags in the playercorefactory.xml file. Between the <players> and </players> tags, each external player is defined between <player> and </player> tags.
Reply
#4
The first defined player, VLC, is very basic. Only the path and name of the player executable, the location and name of the video stream ( "{0}" ), the tag to hide xbmc (kodi) during playback and the tag to show VLC control buttons. I cannot see where a syntax error can get in there. Nevertheless, even with a playercorefactory.xml containing only this player between <playercorefactory><players> and </players></playercorefactory>, VLC is not shown in Kodi when I press the y key.
Reply
#5
Is there *anybody* using Kodi on a Windows system, with a working playercorefactory.xml file??
If so, is there any other method to call the available players menu, other than pressing the y key while playing the stream in DVDPlayer?
If you have a working Windows playercorefactory.xml file, can you post it here?

Thank you!
Reply
#6
I meant the arg strings with the other players, ffmpeg, etc.
Per the link, I don't see any rules you have defined for the playercore file.

Here is the original one with file rules, I also see they use the context menu c for the external player?


Code:
<playercorefactory>
<players>
   <player name="vlc" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/vlc</filename>
     <args>"{0}"</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="rtmpdump" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/rtmpdump</filename>
     <args>-i "{0}" | vlc fd://0</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="vlc-save" type="ExternalPlayer" audio="false" video="true">
    <filename>/usr/bin/vlc</filename>
    <args>"{0}" --sout=file/ts:"/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
    <hidexbmc>false</hidexbmc>
   </player>
   <player name="rtmpdump-vlc-stdout" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/rtmpdump</filename>
     <args>-i "{0}" | vlc fd://0 --sout=file/ts:"/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="ffmpeg-save" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ffmpeg</filename>
     <args>-i "{0}" -c:v copy -c:a copy "/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>false</hidexbmc>
   </player>
   <player name="record 30 minutes" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ffmpeg</filename>
     <args>-i "{0}" -c:v copy -c:a copy -t 00:30:00 "/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>false</hidexbmc>
   </player>
  <player name="record 1 hour" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ffmpeg</filename>
     <args>-i "{0}" -c:v copy -c:a copy -t 01:00:00 "/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>false</hidexbmc>
   </player>
  <player name="record 2 hours" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ffmpeg</filename>
     <args>-i "{0}" -c:v copy -c:a copy -t 02:00:00 "/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>false</hidexbmc>
   </player>
   <player name="ssh record 30 minutes" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ssh</filename>
     <args>pi '/usr/bin/ffmpeg -i "{0}" -c:v copy -c:a copy -t 00:30:00 "/home/username/mount/ffmpeg/video-$(date +"%H-%M-%m-%d-%y").mkv"' &</args>
     <hidexbmc>false</hidexbmc>
   </player>
   <player name="ssh record 1 hour" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ssh</filename>
     <args>pi '/usr/bin/ffmpeg -i "{0}" -c:v copy -c:a copy -t 01:00:00 "/home/username/mount/ffmpeg/video-$(date +"%H-%M-%m-%d-%y").mkv"' &</args>
     <hidexbmc>false</hidexbmc>
   </player>
   <player name="ssh record 2 hours" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/ssh</filename>
     <args>pi '/usr/bin/ffmpeg -i "{0}" -c:v copy -c:a copy -t 02:00:00 "/home/username/mount/ffmpeg/video-$(date +"%H-%M-%m-%d-%y").mkv"' &</args>
     <hidexbmc>false</hidexbmc>
   </player>
   <player name="save-url" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/echo</filename>
     <args>"{0}" > "/home/username/Desktop/video-url-$(date +"%H-%M-%m-%d-%y").txt"</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="mpv" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/mpv</filename>
     <args>"{0}"</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="mpv-capture" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/mpv</filename>
     <args>"{0}" --stream-capture="/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv"</args>
     <hidexbmc>true</hidexbmc>
   </player>
   <player name="mpv-dump" type="ExternalPlayer" audio="false" video="true">
        <filename>/usr/bin/mpv</filename>
     <args>"{0}" --stream-dump="/home/username/Desktop/video-$(date +"%H-%M-%m-%d-%y").mkv" &</args>
     <hidexbmc>false</hidexbmc>
   </player>
<rules action="overwrite">
   <rule name="rtmp" protocols="rtmp" player="rtmpdump"></rule>
   <rule video="true" internetstream="true" player="vlc"></rule>
   <rule name="smb" protocols="smb" player="vlc"></rule>
</rules>
</players>
</playercorefactory>
Reply
#7
@k4sh1n:
Ok, thank you again for being helpful! The file you posted is indeed the one I used for inspiration, but it's a Linux file. I had to translate it into Windows language. Besides replacing the / with \, the most difficult part was to adapt the naming of the video file created by ffmpeg and the text file created by the Linux echo command into something similar. The video file created say on 03-25-2015 at 9:15:43 am will be named in Linux video-09-15-25-03-15.mkv and the text file created by the Linux echo command named the same, but with a txt extension.

In Windows, things work differently. There are no separate variables for Hour, Minute, Day, Month and Year. The output of the DATE command is Wed 03/25/2015 and the output of the TIME command is 9:15:43.27. Both these strings include characters which are not allowed in the name of a file (/ and : ). Consequently I had to use syntax to extract only some numbers from these outputs and concatenate them to create the name of the file. According to Windows syntax my files created at the same date and time as above, will be named [email protected] and [email protected].
`
Thus %date:~4,2% translates to: take the output of the DATE command (Wed 03/25/2015), go to (~) position 4 (count starts from 0 which is W in Wed) and extract two characters starting at that position (03).

%time:~6,5% translates to: take the output of the TIME command (9:15:43.27), go to (~) position 6 (4) and extract the first 5 characters starting from there (43.27 counting the dot as well).

In Windows, there is no separate echo command. Echo is an internal command part of the shell cmd.exe. Consequently to dump the name of the stream ( "{0}" or "{1}") to a text file, I have to call cmd.exe as the "player". Then I applied the /c (close) switch, the echo internal command and the {0} Kodi variable as arguments for cmd.exe and I redirected the output (>) to a text file named using the syntax explained above.

The arguments for ffmpeg.exe are the same as in Linux. I've added only the -i switch which needs to be followed by the name of the input file or stream (and path) in ffmpeg for Windows.

Although I tested that my files are created with the desired names correctly in a console (cmd.exe) window, I don't know if it works from Kodi. That's because the external players are not shown, even if it's only one (like VLC player, which I've tried). I suspect in Kodi Helix 14.2 rc1 which I'm using, the support for external players in Windows is broken.

I'd like to have somebody else, with a Windows system, try this simple playercorefactory.xml, with only one defined player:

<playercorefactory>
<players>
<player name="vlc" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
</player>
</players>
</playercorefactory>

C:\Program Files (x86)\VideoLAN\VLC is the default location for a 32-bit VLC Player installation, on a Windows 64-bit machine. I'm using a portable 64-bit version of VLC, which I run from under C:\Apps. I'd really appreciate reports if it's working or not. That is, if the external VLC player is shown when y is pressed (in 14.2 rc1 c calls a different menu).

Thank you!
Reply
#8
@k4sh1n:
Oh, I forgot! The <rules> node is not mandatory. It is used only to add new rules before (prepend), after (append) or replace (overwrite) the default rules defined in playercorefactory.xml under Kodi\System.

For example, the rules defined in the Linux file that you posted translate to:

1. If the protocol of the video stream is rtmp use the rtmpdump player instead of the default Kodi DVDplayer.
2. if the video is an internet stream, not a local file, use vlc player instead of the default Kodi DVDplayer.
3. if the protocol is smb (file or stream located on the local network), also use vlc player instead of the default Kodi DVDplayer.

Without these rules, all three types of those video streams will be automatically opened by the Kodi DVDplayer. However, if a <players> node exists and at least one player is defined through a <player> tag, the external player(s) should be shown when the "Play using:" menu is invoked by pressing y.
Reply
#9
Although (Y) is defined as: Switch/choose player
I find there is setting: video>file list>default action>choose for context menu

By the way I made one to test out using x64 bit vlc, works fine, but does not launch from (Y) only with C context menu.

Code:
<playercorefactory>
<players>
   <player name="VLC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
   </player>
</players>
</playercorefactory>
Reply
#10
@k4sh1n:
This is weird! I'm getting the same menus when pressing c (or right clicking) and y, on a mix of six different Windows computers (laptops, desktop, netbook and Windows tablet). What all have in common is the Kodi Hellix v14.2 rc1 version and that I configured all of them with the Configuration Wizard program add-on. Here are three screenshots:

1. Image Pressing c or right clicking on a list item.
2. Image Pressing c twice when playing a video.
3. Image Pressing y while playing a video.

I have replaced the my playercorefactory.xml with the very basic one which works on your computer. It does not work on any of my six Windows devices. Can you post in this thread a screen shot of the menu from where you can choose the VLC player?

Many thanks in advance!
Reply
#11
KODI does not have a configuration wizard, to which are you referring. (I hope its not those banned piracy ones)

Play using
Image
VLC
Image

Run from C context menu
Reply
#12
Thank you for the screenshots! Which version of Kodi are you using?
Reply
#13
14.2 Helix from the Kodi website: http://kodi.tv/download/
Reply
#14
Had the same problem on a mac and found out that the xml file wasn't the correct file format. So I copied one of the existing xml's in the userdata folder, renamed it playercorefactory.xml and pasted the parameters in it. Then, pressing y when playing the file brought up DVDPlayer and the VLC option. Next problem to solve is when I select VLC, Kodi stops playing and returns to the movie/video list, no matter which video filetype I try..
Reply
#15
In the mean time I added Kodi to 2 Windows 8 PC's (desktop and Minix mediaplayer). As some codecs don't play well with the built-in player (same as on the MAC), I wish to add VLC as external player but under Windows cannot get it done successfully. I already tried the xml with a variety of file contents (simple, more extensive, etc.) and double checked the vlc.exe file location (is in order). Still, pressing the y key when playing a video only shows the option for the built-in DVDplayer.

@simple0 - did you get it resolved? Can you post your xml code? Where did you place the xml file (I have it in AppData\Roaming\Kodi\userdata)?
Reply

Logout Mark Read Team Forum Stats Members Help
External players don't show in Kodi0