Jump to content

Emby for Kodi "network credentials" and "ip path substitution" needed under libreelec to play mp3s


hoppel118

Recommended Posts

hoppel118

Hello guys,

 

I use emby for kodi (v2.2.10) on 3 clients with kodi jarvis (v16.1) in the house and it works very flawless. It's my greatest kodi addon. Thank you for all the hard work you investigated.

 

The emby server (v3.0.5972.0) is installed on a debian jessie 8.4 (openmediavault3).

 

In the past I used 3 windows clients with kodi as the frontends. Now I changed my main htpc in the living room to an odroid c2 with libreelec as the os. After installing the "emby for kodi" addon and configuring the addon per assistent, it's not possible to play mp3s within kodi on libreelec.

 

The following path substitutions work fine for my windows clients:

 

/mediatank/movies -> \\mediatank\movies

/mediatank/music -> \\mediatank\music

 

Besides I don't need to configure the "network credentials" in the "emby for kodi - settings" under windows.

 

For my libreelec I have to configure the network credentials and I have to change my path substitutions to following manner:

 

/mediatank/movies -> \\10.11.11.11\movies

/mediatank/music -> \\10.11.11.11\music

 

It's not possible to get the mp3s to play without these settings. DNS resolution works fine on the libreelec client. If i ping the server, I get the following output on the command line:

LibreELEC:~ # ping mediatank
PING mediatank (10.11.11.11): 56 data bytes
64 bytes from 10.11.11.11: seq=0 ttl=64 time=0.750 ms
64 bytes from 10.11.11.11: seq=1 ttl=64 time=0.849 ms

I checked it with with both playback modes:

  1. Addon(Default): only the movies workes as expected, mp3s didn't play
  2. Native(Direct paths): movies and mp3s didn't work because of an inexistent path

With the playback mode Addon(Default) I got this kind of errors in the kodi log:

00:19:24 T:547635171328   ERROR: Open - failed to open source <musicdb://albums/135/25.mp3?albumid=135>
00:19:24 T:547635171328   ERROR: Init: Error opening file musicdb://albums/135/25.mp3?albumid=135
00:19:24 T:547635171328   ERROR: CAudioDecoder: Unable to Init Codec while loading file musicdb://albums/135/25.mp3?albumid=135
00:19:24 T:547635171328 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder

So, at the moment everything is fine for me

 

But why differs the configuration of the "emy for kodi" addon between libreelec and windows?

 

It costed a lot of my lifetime to find this out. ;)

 

 

Greetings Hoppel

Edited by hoppel118
Link to comment
Share on other sites

Angelblue05

It has nothing to do with the emby add-on. Linux cannot resolve netbios hostname (I think...or at least not by default). The safest way to get everything working cross platform is to use the ip address instead.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

hoppel118

Why this should not be possible?

 

Resolving the hostname works for me:

LibreELEC:~ # ping mediatank
PING mediatank (10.11.11.11): 56 data bytes
64 bytes from 10.11.11.11: seq=0 ttl=64 time=0.750 ms
64 bytes from 10.11.11.11: seq=1 ttl=64 time=0.849 ms

I have never read in any documentation that it is preferred to use an ip adress in the path substitution for cross platforms.

 

Also it isn't mentioned in the official documentation (path substitution is explained at the end of the page): https://github.com/MediaBrowser/Wiki/wiki/Library setup

 

Why are the "network credentials" needed in libreelec and not needed in windows?

 

 

Greetings Hoppel

Edited by hoppel118
Link to comment
Share on other sites

hoppel118

Why are the "network credentials" needed in libreelec and not needed in windows?

 

At the moment I am 100% unsure if I maybe configured the network credentials under windows in confluence. The menu doesn't look like in aeon nox. For the new odroid c2 in the living room I installed the skin aeon nox before the "emby for kodi" addon. So, forget this question.

Edited by hoppel118
Link to comment
Share on other sites

Angelblue05

Hm interesting. Well I wasn't sure to begin with. However, a static ip address is more reliable using samba. Anyway, as I mentioned, this issue has nothing to do with emby for kodi. The add-on uses Kodi api. This could be a result of the security update to samba back in april which seems to require a user/pass. search google terms "kodi april samba security update" to see if it might effect this situation.

 

Let me know your findings, or post to the Kodi forums (official Kodi forums) for assistance. All the add-on does with network credentials is add them to passwords.xml which is default Kodi behavior; the rest is handled by Kodi itself (verifications)

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

  • 3 weeks later...
hoppel118

@Angelblue05: Yes, you are right. There was a samba security update in 04/2016. Google brings up a lot of users with similar network credential problems under kodi 16.1.

 

Thanks for this hint!

 

Greetings Hoppel

Edited by hoppel118
  • Like 1
Link to comment
Share on other sites

Blueeyiz702

@@Angelblue05, is i use path substitution and have movies on Z:\Shared Videos\Movies the other path on network would be \\WDMYCLOUD\Public\Shared Videos\Movies? Is this correct,jiust want to make sure. I'm trying to ease the load on my computer till i upgrade. this takes the trancoding and stream out for direct access by emby. 

Edited by blueeyiz7021
  • Like 1
Link to comment
Share on other sites

Angelblue05

@

 

Yes, as long as the end path is accessible over the network. You can validate by navigating to your content in Kodi settings > add-ons > install from zip > smb > The path will be at the top. Just make sure your path substitution follows this and you should be good to go.

  • Like 1
Link to comment
Share on other sites

Blueeyiz702

@

 

Yes, as long as the end path is accessible over the network. You can validate by navigating to your content in Kodi settings > add-ons > install from zip > smb > The path will be at the top. Just make sure your path substitution follows this and you should be good to go.

I'm going to use the path substitution in emby as well.i think it will relieve alot of problems i'm having.thanks

Link to comment
Share on other sites

xnappo

Just FYI many routers let you add local DNS names.  You can also edit your hosts file on the Linux boxes.

Link to comment
Share on other sites

hoppel118

Yes, that's right. But as you can see above the ping from the libreelec client to the servers hostname wird fine (it also works vice versa). Anyway emby for kodi doesn't work correct if I use the hostname in the path substitution or as the primary server. That was my problem.

Edited by hoppel118
Link to comment
Share on other sites

xnappo

Yes, that's right. But as you can see above the ping from the libreelec client to the servers hostname (and vice versa) works fine. Anyway emby for kodi doesn't work correct if I use the hostname in the path substitution or as the primary server. That was my problem.

Yeah, I have noticed that the lookup using some Linux command line tools can do that, but I don't think it is getting it from a 'traditional' Unix name lookup.

 

I am curious - what does 'nslookup <machinename>' do?

Link to comment
Share on other sites

hoppel118

I will have a look at it later, but I don't know if libreelec provides nslookup.

Edited by hoppel118
Link to comment
Share on other sites

hoppel118

My guess is that Kodi can only use DNS, and that libreelec is preconfigured like this:

https://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/

 

to be able to use dns or wins.

 

Hi @@xnappo

 

nslookup works out-of-the-box on the libreelec client.

 

Here the result of the nslookup on my libreelec client:

LibreELEC:~ # nslookup mediatank
Server:    10.11.11.1
Address 1: 10.11.11.1 fritz.box

Name:      mediatank
Address 1: 10.11.11.11 mediatank.fritz.box

The nslookup from the server to the libreelec client isn't working.

root@mediatank:~# nslookup LibreELEC
Server:         10.11.11.1
Address:        10.11.11.1#53

** server can't find LibreELEC: NXDOMAIN

The ping from the libreelec client to the server works as expected:

LibreELEC:~ # ping mediatank
PING mediatank (10.11.11.11): 56 data bytes
64 bytes from 10.11.11.11: seq=0 ttl=64 time=0.595 ms
64 bytes from 10.11.11.11: seq=1 ttl=64 time=0.658 ms
64 bytes from 10.11.11.11: seq=2 ttl=64 time=0.664 ms
^C
--- mediatank ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.595/0.639/0.664 ms

The ping from the server to the libreelec client also doesn't work.

root@mediatank:~# ping LibreELEC
ping: unknown host LibreELEC

The ping from the server to the ip address of the libreelec client also works fine.

 

root@mediatank:~# ping 10.11.11.88
PING 10.11.11.88 (10.11.11.88) 56(84) bytes of data.
64 bytes from 10.11.11.88: icmp_seq=1 ttl=64 time=0.635 ms
64 bytes from 10.11.11.88: icmp_seq=2 ttl=64 time=0.597 ms
64 bytes from 10.11.11.88: icmp_seq=3 ttl=64 time=0.578 ms
^C
--- 10.11.11.88 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.578/0.603/0.635/0.031 ms

Is the nslookup from the server to the client needed to get it to work?

 

I have to investigate some time to get it to work, maybe tomorrow. I think I have to tell the libreelec client the dns domain name in the samba configuration.

 

Greetings Hoppel

 

Edited by hoppel118
Link to comment
Share on other sites

xnappo

I am not sure - again if you don't have DNS set up to handle this on your router, then it is only working through some automagic.  Basically you have to add the names to your hosts file or to your router for it to work, or use your IP address as you have already found.

 

I was just curious if NSLOOKUP would indicate HOW it was getting the name resolved, but doesn't seem like it does.

Link to comment
Share on other sites

hoppel118

My guess is that Kodi can only use DNS, and that libreelec is preconfigured like this:

https://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/

 

to be able to use dns or wins.

 

OK, after installing winbind to my debian jessie server:

apt-get install libnss-winbind

and changing the configuration of "hosts" in "/etc/nsswitch.conf" from:

hosts:          files mdns4_minimal [NOTFOUND=return] dns

to:

hosts:          files mdns4_minimal [NOTFOUND=return] dns wins

the ping from the server to librelec client works:

root@mediatank:~# ping libreelec
PING libreelec (10.11.11.88) 56(84) bytes of data.
64 bytes from 10.11.11.88: icmp_seq=1 ttl=64 time=0.624 ms
64 bytes from 10.11.11.88: icmp_seq=2 ttl=64 time=0.571 ms
64 bytes from 10.11.11.88: icmp_seq=3 ttl=64 time=0.582 ms
^C
--- libreelec ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.571/0.592/0.624/0.030 ms
I had to add the following line to "/etc/hosts.conf":
 
10.11.11.88 libreelec.fritz.box libreelec

To get the ping to work in the domain "fritz.box" my router provides as the default domain:

root@mediatank:~# ping libreelec.fritz.box
PING libreelec.fritz.box (10.11.11.88) 56(84) bytes of data.
64 bytes from libreelec.fritz.box (10.11.11.88): icmp_seq=1 ttl=64 time=0.551 ms
64 bytes from libreelec.fritz.box (10.11.11.88): icmp_seq=2 ttl=64 time=0.581 ms
64 bytes from libreelec.fritz.box (10.11.11.88): icmp_seq=3 ttl=64 time=0.591 ms
^C
--- libreelec.fritz.box ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.551/0.574/0.591/0.025 ms

This looks nice, but nslookup from the server brings the following message:

 

root@mediatank:~# nslookup fritz.box
Server:         10.11.11.1
Address:        10.11.11.1#53


Name:   fritz.box
Address: 10.11.11.1


root@mediatank:~# nslookup librelec
Server:         10.11.11.1
Address:        10.11.11.1#53


** server can't find librelec: NXDOMAIN


root@mediatank:~# nslookup libreelec.fritz.box
Server:         10.11.11.1
Address:        10.11.11.1#53


** server can't find libreelec.fritz.box: NXDOMAIN

nslookup works for the domain/router (fritz.box), but not for libreelec.

 
 
Enough for today...
 
Greetings Hoppel
Link to comment
Share on other sites

hoppel118

Hello,

 

I had to edit the router dns config for the libreelec client manually from "LibreELEC" to "libreelec" to get the nslookup to work. Found the advise in a german raspi forum:

 

http://www.forum-raspberrypi.de/Thread-hostname-des-rpi-wird-im-netzwerk-nicht-gefunden?pid=10399#pid10399

 

579f12a0af006_nslookup1.png

 

579f12b14cc65_nslookup2.png

 

 

I don't know why i have to edit the dns name in my router settings, but now it works. nslookup now completely works without the need for "wins" in the "hosts" entry of the "/etc/nsswitch.conf" and without an entry in the "/etc/hosts".

 

Here the nslookup results from my server:

root@mediatank:~# nslookup libreelec
Server:         10.11.11.1
Address:        10.11.11.1#53

Name:   libreelec.fritz.box
Address: 10.11.11.88
root@mediatank:~# nslookup 10.11.11.88
Server:         10.11.11.1
Address:        10.11.11.1#53

88.11.11.10.in-addr.arpa        name = libreelec.fritz.box.

and here the results from the libreelec client:

LibreELEC:~ # nslookup mediatank
Server:    10.11.11.1
Address 1: 10.11.11.1 fritz.box

Name:      mediatank
Address 1: 10.11.11.11 mediatank.fritz.box
LibreELEC:~ # nslookup 10.11.11.11
Server:    10.11.11.1
Address 1: 10.11.11.1 fritz.box

Name:      10.11.11.11
Address 1: 10.11.11.11 mediatank.fritz.box

The next step is to change back the ip to the hostname in the path substitution under the emby webui and to reset the emby database on the libreelec client.

 

 

Greetings Hoppel

Edited by hoppel118
Link to comment
Share on other sites

hoppel118

OK, now where dns resolution works fine, I want to write down the rest for a complete documentation:

 

First I changed the path substituions back to the hostname:

579f1db6b06a4_pathsubip.png

 

579f1dc14c19c_pathsubhostname.png

 

Then I did the following first for my windows client and second for my libreelec client:

 

  1. remove the "passwords.xml" under "userdata" (kodi)
  2. "Reset local Kodi database" under "advanced" in the emby addon settings. Answered the questions as follows:
    - Are you sure you want to reset your local Kodi database? -> YES
    - Remove all cached artwork? -> YES
    - Reset all emby addon settings? -> YES
    -> Emby reports: "Database reset has completed, Kodi will now restart to apply the changes." -> OK
  3. After starting Kodi the emby assistant came up automatically with the following questions:
    - Proceed with the following server? Address: http://10.11.11.11:8096 -> YES
    - Select user: -> "htpc"
    - Playback mode: Caution! If you choose Native mode, certain Emby features will be missing, such as: Emby cinema mode, direct stream/transoce options and parental access schedule. -> Addon (Default)
    - Disable Emby music library? -> NO
    - Direct stream the the music library? Select this option if the music library will be remotely accessed. -> NO
    -> Emby starts syncing the library

windows 10:       The sync completed without errors and my movie, music and picture libraries work as expected without telling emby any network credentials. Nice!

libreelec 7.0.2:   I get the following message while syncing:

 

Can't locate file:

smb://mediatank/music/Chillout/...mp3. You may need to verify your network credentials in the add-on settings or use the Emby path substitution to format your path correctly (Emby  dashboard > library). Stop Syncing?

 

 

-> NO

 

After syncing process completed successfully I tried to play a movie and got the following messages:

 

Unable to directplay file

smb://mediatank/movies/...mkv

 

and:

 

Playback failed:

One or more items failed to play. Check the log for more information about this message.

 

 

 

After that I configured the "network credentials" under "playback" in the Emby addon settings of the libreelec client:

 

  • Enter the server name or ip address -> mediatank
  • Enter the network user name -> htpc
  • Enter the network password -> ***

 

Then I checked to play a movie again, but still the same messages: "unable to direct play file", "one or more items failed to play...". So I decided to "Reset local Kodi database" under "Advanced" in the Emby addon settings again. This time the emby sync process didn't report any message like "Can't locate file ..." and finished completely. But after clicking a movie nothing happened, no message, nothing. Restartet the libreelec client. Tried again and now everything (movies, music, pictures) works expected.

 

The result of the whole thing is:

 

  1. With a well configured dns resolution you don't need the ip address in the path substitution. It's a little bit of work, but it's nice!
  2. Under libreelec (maybe other linux distributions) you have to configure the network credentials before syncing the database.

 

@@xnappo

 

Thanks for the hint to nslookup.

 

  • Is it somehow possible for you to code the initial emby configuration assistant to ask for the network credentials, at least for arch (What is libreelec/openelec?) and maybe other linux distributions?
    -> I (and maybe other guys) needed a lot of time to figure out that I have to enter the network credentials manually
  • If this is not possible: Where should it get documented that "linux" users get rid from this behavior? I am willing to document that and also the whole dns resolution thing. But where should this be done?

 

Thank you @@xnappo and @@Angelblue05 very much!

 

Greetings Hoppel

Edited by hoppel118
  • Like 1
Link to comment
Share on other sites

xnappo

Not a bad idea.  I thinking it would be easy to add a link to 'add network credentials' as an option from the 'Unable to direct play' dialog at least.

 

@@Angelblue05 - thoughts?  I may have time to look into this.

  • Like 1
Link to comment
Share on other sites

Angelblue05

Kodi needs to be rebooted to load the new credentials added to passwords.xml. We need a way to validate them prior to restarting.

 

The question is, in @@hoppel118 prior post - was the database reset after failure to play and adding credentials was really necessary. I'm pretty sure it wasn't and the client just needed to start again with the new passwords.xml for Kodi.

 

When I wrote that part, I tested it on my firetv stick and adding credentials before or after the initial sync didn't matter, as long as Kodi was restarted.

 

 

Sent from my iPhone using Tapatalk

  • Like 1
Link to comment
Share on other sites

hoppel118

Kodi needs to be rebooted to load the new credentials added to passwords.xml. We need a way to validate them prior to restarting.

 

The question is, in @@hoppel118 prior post - was the database reset after failure to play and adding credentials was really necessary. I'm pretty sure it wasn't and the client just needed to start again with the new passwords.xml for Kodi.

Ok, I did the complete procedure again to check this.

  • deleted the passwords.xml
  • resetted the local kodi database and all the addon settings
  • rebooted the libreelec client
  • went through the assistent with the same settings like before
  • synced the database completely without stopping the sync while the message came up that I need to verify my network credentials
  • after sync I tried to play a movie, but got the "Can't locate file" message
  • rebooted the librelec client and tried to play a movie again, but got the "Can't locate file" message again
  • provided the network credentials in the emby addon settings
  • tried to play a movie, but got the "Can't locate file" message
  • rebooted the librelec client and tried to play a movie once more

The result is, that my movies, music and pictures work as expected. I do not need to reset the database again.

 

So it would be nice if the initial emby assistant asks for the network credentials, restarts kodi and after that starts to sync the database.

 

 

Greetings Hoppel

Edited by hoppel118
  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...