dukejames 3 Posted March 21, 2016 Posted March 21, 2016 Hello all, I'm using Emby Server 3.0.5882.0 on Ubuntu Server 15.10, and Kodi Client 15.2 with the Emby plugin 2.2.10 on Windows. The server has 2 hard drives and both hold Emby data. Drive 1: /media/uuid/share/emby Drive 2: /Share/emby2 Each directory has a "Movies" folder and my clients can connect to the Ubuntu Server using SMB with read and execute permissions. Kodi would not play any title until I set path substitution. Even after that, only some titles were playing back. I later learned that if I create path substitutions for both directories, only the first substitution will work. If I remove the first, leaving only the second substitution, then that path substitution will work. I was able to confirm this by reviewing the Kodi log file. When a title plays, Direct Play is used and when it fails, the log displays: EMBY PlayUtils -> Verifying path: /Share/emby/ Is there something wrong with having multiple path substitutions within Emby? Perhaps because it's on the same physical server? Perhaps this is a bug and if so, is there a workaround? Why wouldn't Emby switch to Direct Stream if it's not going to use Direct Play? Thanks!
dukejames 3 Posted March 21, 2016 Author Posted March 21, 2016 I forgot to mention that when there's no path substitution set, I can see in the Emby log: Access to the path "/media/uuid/Share/emby2/Movies/TITLE/VIDEO_TS/VIDEO_TS.nfo" is denied.
Luke 42080 Posted March 21, 2016 Posted March 21, 2016 Multiple path substitutions will work just fine. Can you tell us what you've added for path substitutions? Thanks.
Solution Luke 42080 Posted March 21, 2016 Solution Posted March 21, 2016 I forgot to mention that when there's no path substitution set, I can see in the Emby log: Access to the path "/media/uuid/Share/emby2/Movies/TITLE/VIDEO_TS/VIDEO_TS.nfo" is denied. This error is exactly what it sounds like. Emby is trying to access a file and is being denied. In most cases this is a permissions issue that you'll need to resolve, although providing complete log files can help us see the complete picture in case there's something else going on. 1
dukejames 3 Posted March 21, 2016 Author Posted March 21, 2016 Sure, here's a log. In regards to permissions, both directories are set to 755. Originally, Emby could not browse the secondary drive's directory. I realized it was set to 750, so changed it to 755. Does Emby need more than Read and Execute permissions to access the titles and play them? Log.txt
Luke 42080 Posted March 22, 2016 Posted March 22, 2016 No I would think that would be fine, but you've enabled saving of metadata within media folders which means write access is also needed
dukejames 3 Posted March 22, 2016 Author Posted March 22, 2016 Thanks, I overlooked that. I've just disabled this option so that the data can stay with the server files.
dukejames 3 Posted March 22, 2016 Author Posted March 22, 2016 As you said, it's a permission issue. My existing and newly created directories have 755, but my files have 754. i later learned that this is a built-in security function, removing the Execute permission with newly created files in a directory for Groups and Others. I thought I wouldn't have this issue by using "create mask = 755: within the smb.conf. I'm now reading that i'll have to use force create instead. For now, I used "chmod 755 -R xxx" as a temporary fix. I need a permanent solution. If anyone already has an answer, please post. I appreciate your time! Also, is it true that the user which Emby uses to read data on the drives is located in "/etc/default/emby-server", in the "EB_USER=" entry? I found this here: http://emby.media/community/index.php?/topic/21852-new-debian-and-ubuntu-install-instructions/ If so, could I change that to the existing Ubuntu user name to immediately resolve the permission issues? Thanks!
Luke 42080 Posted March 23, 2016 Posted March 23, 2016 I'm sure in theory you could but I don't think we have a documented procedure related to that. There is a good reason why these custom user accounts are common for server-type apps which is that it's for your own security. Having a server application run under it's own limited user account means that if the server software is ever compromised, your risk is vastly reduced by the limited capabilities of the user that it runs under. If you change it to run under your own user account then you lose that benefit. @@fc7 might have some tips related to your chmod issue.
dukejames 3 Posted March 24, 2016 Author Posted March 24, 2016 (edited) Ok, I've setup samba to apply the correct permission to files I add in the future. I added to smb.conf: force create mode = 0755 I understand what you mean about the possible security risk. I was looking for a temporary fix, but can understand how people may do this in production. The multiple path substitution issue is fixed. I do still have a question about Direct Streaming. With no path substitution, Emby Server still doesn't Direct Stream. Why is this? I've attached a log. Thanks! Edit: misspelled samba configuration file name. Log_DirectStream_1.txt Edited March 24, 2016 by dukejames
Luke 42080 Posted March 24, 2016 Posted March 24, 2016 what emby app did you try to play from? the kodi addon just like before?
dukejames 3 Posted March 24, 2016 Author Posted March 24, 2016 That's right. I reset Kodi to defaults using the "fresh start" addon, and then reconfigured the Emby Add On. Once everything sync'd, i tried to watch a video but it failed. Here's a Kodi log. "Play from http instead of smb" is disabled within the addon. The Playback mode is "Addon(Default)". I'm under the impression that this allows Emby to choose which method to use, but now am unsure. kodi.log
Angelblue05 4132 Posted March 24, 2016 Posted March 24, 2016 (edited) If you want to direct stream, enable Play from http instead of SMB. In Kodi, there's no way to verify linux paths. So we can't say if the file exists for sure. If your paths are formatted like /media/ or similar, it will still try to play it, in the event that it is a local linux path to Kodi (which Kodi will be able to access). If it's a network path, then it's not valid because Kodi needs the file protocol in front (smb or nfs). If your paths were formatted differently, it would automatically fall back to direct stream (windows path for example). ERROR: CDVDPlayer::OpenInputStream - error opening [/media/8fd4730c-995e-44bc-9882-9751f056685e/Share/emby2/Movies/JOHN WICK/VIDEO_TS/VIDEO_TS.IFO] I also see that playback worked at a later time in the log, so what exactly is the issue? DVDPlayer: Opening: smb://mediasrv/emby 2/Movies/JOHN WICK/VIDEO_TS/VIDEO_TS.IFO Edited March 24, 2016 by Angelblue05
dukejames 3 Posted March 24, 2016 Author Posted March 24, 2016 Thanks for the response! I was confirming that multiple path substitutions was working, and if Direct Playing or Direct Streaming was being used. The log you saw where playback worked, was when path substitutions was configured. During this time, Direct Playing was used. Playback fails when I remove the path substitutions. Understanding Kodi has the path verification limitation, is it possible for the plugin to do so instead? Or possibly detect the failed playback of a linux path and if so, check for SMB path? If so, I'd like to suggest this. What is the purpose of the two playback modes? Thanks! 1
Angelblue05 4132 Posted March 24, 2016 Posted March 24, 2016 (edited) The plugin uses the Kodi api to check the file existence with the given path. Also, how would the addon know to convert to using smb://mediasrv/ ? There's very little to no difference between direct play and direct stream. Essentially, with direct play, Kodi reads the file. With direct stream, the file is fed to Kodi as is. This is also used for remote viewing, playing over http (local or remote address). Hope this helps Sent from my iPhone using Tapatalk Edited March 24, 2016 by Angelblue05
dukejames 3 Posted March 24, 2016 Author Posted March 24, 2016 Sorry, I'm not a programmer and was wondering if it's possible. I'm planning to install this system into an environment where Kodi and Roku would be used. I was hoping for the Roku playback to transcode and Kodi to Direct Play. Although transcoding works very well, I understand that it requires more system resources. Just in case multiple clients are used, I'd like to help prevent any issue. Do you know if the Roku app has the same limitation? If it doesn't, then I'll configure the path substitutions and Kodi to use smb instead of http. Thanks!
dukejames 3 Posted March 26, 2016 Author Posted March 26, 2016 (edited) I just wanted to follow-up on the question about the different Playback Modes. Would you please explain what they are and they are to be used? If I choose Native(Direct paths) and then play a video,I get an error which reads: This file is no longer available. Would you like to remove it from the library? Choosing Addon(Default) works just fine. Thanks! Edit: Uploaded logs. kodi_directpaths.log Log_directpaths.txt Edited March 26, 2016 by dukejames
Angelblue05 4132 Posted March 26, 2016 Posted March 26, 2016 @@dukejames Sorry just saw your post. Your kodi log shows that you are actually direct streaming/transcode. You have the play from http setting enabled. Go to the emby add-on settings > playback > Play from http / disable it. Then grab a new kodi log. Thanks, seems Kodi is unable to locate your files. Can you let me know your server path substitution you ended with? Please see this for the settings: https://github.com/MediaBrowser/plugin.video.emby/wiki/Emby-for-kodi-settings Did you reset your local database after changing the playback mode to Native? The message you get means Kodi is unable to locate your files with the given path.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now