help with external player

nmyshkin

Member
Sep 23, 2014
77
1
8
I'm trying to write a playercorefactory.xml file that will automatically open a particular file in VLC player (this one particular file will not play in Kodi). This is what I have so far:

Code:
<playercorefactory>
<players>
   <player name="VLC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</filename>
    <args>"{1}" /fullscreen /close</args>
    <hidexbmc>false</hidexbmc>
    <hideconsole>false</hideconsole>
    <warpcursor>none</warpcursor>
   </player>
</players>
<rules action="prepend">
   <rule filetypes="strm" player="VLC"/>
</rules>
</playercorefactory>
Of course it does not work or I would not be here... It does allow VLC as an external player for any file by "Play using" and in the context menu for strm files it does show VLC as the default player. But when I select a strm file to play Kodi takes over and tries to play it (which it can't in this one particular case) instead of VLC opening.

Why?
 

FXB78

Member
Aug 18, 2013
981
0
16
At a guess you may need to choose rtmp instead of strm. Or try m3u if it's an m3u file inside the strm.
 

nmyshkin

Member
Sep 23, 2014
77
1
8
At a guess you may need to choose rtmp instead of strm. Or try m3u if it's an m3u file inside the strm.
In fact, that seems to be the issue. "strm" is just not recognized as a filetype. Here is the amended file that works too well:

<?xml version="1.0" encoding="UTF-8"?>
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="m3u8" player="VLC" />
</rules>
</playercorefactory>
Now VLC starts up automatically, but for many, many things :-(

All of the strm files I have written (about a half-dozen) are for m3u8 live TV links. The one that is different and will not play in Kodi is apparently a chunk list of .ts files. So "m3u8" paints too broad a brush and "strm" is not recognized. I tried writing a general rule for "m3u8" to play with DVDPlayer and added a filename="index.m3u8" sub-rule for VLC player as default. The one odd-ball stream and only that one has that filename at the end of the URL. That does not work.

So I guess my issue now is that I need a finer filter to somehow select that one file to play in VLC but not every m3u8 that comes along. I also did try writing a specific rule for each filename at the end of each URL, directing it to play in DVDPlayer, except for the one file. That also does not work, or if it does I am not doing it correctly :-(
 

skyhigh

Member
Jan 11, 2015
62
1
8
why not use f4mtester for .ts files? you can install that from shanis repo, than use the link like so for m3u8 or xml....sometimes just changing the extension from .ts to m3u8 works..

#EXTINF:-1, [COLOR blue]TEST[/COLOR]
plugin://plugin.video.f4mTester/?url=Your link here&streamtype=TSDOWNLOADER

or like so for xml

<item>
<title>TEST</title>
<link>plugin://plugin.video.f4mTester/?url=Your link here&streamtype=TSDOWNLOADER</link>
</item>
 

nmyshkin

Member
Sep 23, 2014
77
1
8
why not use f4mtester for .ts files? you can install that from shanis repo, than use the link like so for m3u8 or xml....sometimes just changing the extension from .ts to m3u8 works..

#EXTINF:-1, [COLOR blue]TEST[/COLOR]
plugin://plugin.video.f4mTester/?url=Your link here&streamtype=TSDOWNLOADER

or like so for xml

<item>
<title>TEST</title>
<link>plugin://plugin.video.f4mTester/?url=Your link here&streamtype=TSDOWNLOADER</link>
</item>
I had read about f4mtester in all my frantic searches but did not know how to use it in context, so thanks for that. Unfortunately it will not play the stream in Kodi using the strm file example you gave above. I'm trying to avoid going the xml route because I have such a small number of links and don't want to burden the system with a PVR client that is always checking things at start up.

There just doesn't seem to be enough control in the playerfactorycore , unless it's through a regex of some sort. I tried a filetypes rule based on ts, only to find that although this is the only URL file that can be downloaded to show a chunk list of ts files, each and every other m3u8 opened in VLC under the same rule, so I guess they all work the same way but some are just better hidden.

I tried a filename rule based on the last four digits of the very long ts filenames (which were constant) but, again, that brought up all of the m3u8 links with VLC.

Aargh. It may be that there is no way to do this in Kodi and I will just have to keep this one stream for VLC as a stand-alone.
 

FXB78

Member
Aug 18, 2013
981
0
16
I tried writing a general rule for "m3u8" to play with DVDPlayer and added a filename="index.m3u8" sub-rule for VLC player as default. The one odd-ball stream and only that one has that filename at the end of the URL. That does not work.
If it's a local file you can rename it simply m3u, then change the rule to "m3u". This will avoid it picking up the m3u8 files.

The extension is basically the same so renaming to m3u should still allow you to play it.
 

nmyshkin

Member
Sep 23, 2014
77
1
8
If it's a local file you can rename it simply m3u, then change the rule to "m3u". This will avoid it picking up the m3u8 files.

The extension is basically the same so renaming to m3u should still allow you to play it.
Unfortunately it's not a local file but a URL, so no possibility of renaming. But you are right about the m3u vs. m3u8, at least in this context, as a rule written for either grabs all of the streams and sends them to VLC.
 

nmyshkin

Member
Sep 23, 2014
77
1
8
Well, I'm back. Now my playercorefactory.xml looks like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</filename>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="m3u8" player="DVDPlayer"/>
   <rule filename=".*cnn.*" player="VLC" />
</rules>
</playercorefactory>
As far as the context menu is concerned, this is the "fix". Right-clicking on random files shows DVDPlayer as the default and VLC as an option. Those files open correctly in the default Kodi player.

But....although the cnn.strm file shows, in the context menu, that VLC is the default player (yes!), when selected it tries to play in the Kodi DVDPlayer which it cannot and so fails. If the context menu is used to manually select the stated default player for this file (VLC) then it opens properly in VLC.

AARGH!:mad: I don't get it. I've tried all kinds of combinations and this comes the closest, so far, to doing what I want. What is keeping VLC from opening as it should?
 

skyhigh

Member
Jan 11, 2015
62
1
8
I think your a little OCD lol...all this for a single stream...really the best way to play live streams is with LSP...just add your xml and your golden and you dont have to worrie about PVR...than the ts files will work 100% the way I showed your before..its also possible that you cant open that type of file as strm but I dont use your method so I really dont no..
 
Last edited:

nmyshkin

Member
Sep 23, 2014
77
1
8
Guilty as charged. I'm a bit like a dog on a bone when I get riled :)

I did try LSP but don't really understand it. I made up an xml file following your example (changing the f4mTester to live.streamspro since the f4mTester didn't work), added the file and source. It appears in the list when I click on the addon and nothing happens when I click on it.

So....you are probably right that the behavior I'm seeing is due to the strm file extension. There are just some things that can't be done using it, even though it looks on the screen like it should work.

One of the ideas behind Kodi is, of course, that you can put all your eggs in one basket, so to speak. That's all I'm trying to do...just get this one escaped egg into the basket.
 

skyhigh

Member
Jan 11, 2015
62
1
8
Well it works in LSP by adding a user agent, so maybe it will work for you as a strm? but if it don't this works in LSP

Code:
<item>
<title>CNN</title>
<link>http://zorro.cdn.newschat.tv/hls/cnn_live/index.m3u8|User-Agent=VLC</link>
</item>
Pic Val:

 

nmyshkin

Member
Sep 23, 2014
77
1
8
Wow! I never saw the "User Agent" thing documented for strm files. It works, just by adding that, no plugin needed!!

Thank you so much!
 

michelkovacic

New member
Mar 19, 2018
1
0
0
Hi,
How to play deviceMac links with f4m tester in kodi? I tryied on that way: plugin://plugin.video.f4mTester/?streamtype=TSDOWNLOADER&name=(stream name)&url=(stream url)&deviceMac=xx:xx:xx:xx:xx:xx but not working. when i put stream without f4m tester line, it works, but kick me out of stream after few seconds
Thanks