bgx 17 Posted April 15, 2018 Posted April 15, 2018 (edited) Hi angelblue05. I think I spotted another bug in emby for kodi because in web-ui of emby file is playing fine but in emby for kodi it doesn't play. Here the part of the kodi log: 21:11:10.345 T:6552 NOTICE: EMBY.playbackutils -> Play called: Absage aus Belgien 21:11:10.427 T:6552 NOTICE: EMBY.playutils -> playback info: {u'SupportsDirectStream': True, u'Container': u'mkv', u'RequiresClosing': False, u'IgnoreDts': False, u'IgnoreIndex': False, u'DefaultAudioStreamIndex': 1, u'SupportsDirectPlay': True, u'MediaStreams': [{u'IsInterlaced': False, u'Index': 0, u'AverageFrameRate': 50, u'TimeBase': u'1/1000', u'Width': 1280, u'VideoRange': u'SDR', u'Codec': u'h264', u'IsForced': False, u'AspectRatio': u'16:9', u'Type': u'Video', u'IsTextSubtitleStream': False, u'Profile': u'High', u'DisplayTitle': u'720P H264', u'NalLengthSize': u'4', u'CodecTimeBase': u'1/100', u'RealFrameRate': 50, u'Level': 32, u'RefFrames': 1, u'BitDepth': 8, u'BitRate': 2929696, u'IsDefault': True, u'IsAnamorphic': False, u'SupportsExternalStream': False, u'Height': 720, u'IsAVC': True, u'PixelFormat': u'yuv420p', u'IsExternal': False}, {u'IsAnamorphic': False, u'IsInterlaced': False, u'DisplayTitle': u'Deu Dolby Digital stereo Default', u'ChannelLayout': u'stereo', u'Language': u'deu', u'Index': 1, u'Type': u'Audio', u'IsForced': False, u'Level': 0, u'Channels': 2, u'Codec': u'ac3', u'SupportsExternalStream': False, u'CodecTimeBase': u'1/48000', u'TimeBase': u'1/1000', u'SampleRate': 48000, u'BitRate': 384000, u'IsTextSubtitleStream': False, u'IsDefault': True, u'IsExternal': False}], u'Type': u'Default', u'ReadAtNativeFramerate': False, u'RequiresLooping': False, u'Path': u'{emby-server}/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key={emby-token}', u'RequiresOpening': False, u'Bitrate': 2929696, u'IsRemote': False, u'Name': u'S12E2897 - 2018-04-10-15-10', u'RequiredHttpHeaders': {}, u'SupportsTranscoding': True, u'Formats': [], u'Protocol': u'File', u'IsInfiniteStream': False, u'GenPtsInput': False, u'VideoType': u'VideoFile', u'ETag': u'ada0995dd53bbe668a72d081c3ccccce', u'RunTimeTicks': 30732161024L, u'SupportsProbing': True, u'Id': u'58f9796640fd500c660ac2aba2487186'} 21:11:10.438 T:6552 NOTICE: EMBY.playutils -> play method: DirectStream play url: {emby-server}/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key={emby-token} 21:11:10.554 T:6552 WARNING: CPythonInvoker(42, C:\Users\BGx\AppData\Roaming\Kodi\addons\plugin.video.emby.tvshows\default.py): the python script "C:\Users\BGx\AppData\Roaming\Kodi\addons\plugin.video.emby.tvshows\default.py" has left several classes in memory that we couldn't clean up. The classes include: class XBMCAddon::xbmcaddon::Addon 21:11:10.578 T:10148 NOTICE: VideoPlayer::OpenFile: http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key=bc5a116f0c6b4d939a38da5b945a16fa 21:11:10.594 T:7996 NOTICE: Creating InputStream 21:11:10.669 T:7996 ERROR: CCurlFile::Open failed with code 0 for http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key=bc5a116f0c6b4d939a38da5b945a16fa 21:11:10.669 T:7996 ERROR: XFILE::CFileCache::Open - failed to open source <http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key=bc5a116f0c6b4d939a38da5b945a16fa> 21:11:10.669 T:7996 ERROR: CVideoPlayer::OpenInputStream - error opening [http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd&api_key=bc5a116f0c6b4d939a38da5b945a16fa] 21:11:10.670 T:7996 NOTICE: CVideoPlayer::OnExit() The story behind this is: I record with tvheadend to a directory called TV. After record is finished I symlink into a virtual directory to sort my records and not to destroy the link to the original file in tvheadend. Here the part of the emby log: 2018-04-15 21:11:09.762 Info HttpServer: HTTP Response 500 to 192.168.177.216. Time: 72ms. http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd 2018-04-15 21:11:09.763 Info HttpServer: HTTP GET http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd. Host=192.168.177.98:8096, Range=bytes=0-, User-Agent=Kodi/18.0-ALPHA2 (Windows NT 10.0.16299) App_Bitness/32 Version/18.0-ALPHA2-Git:20180413-294d6a2754, Accept=*/*, Accept-Charset=UTF-8,*;q=0.8 2018-04-15 21:11:09.773 Info HttpResultFactory: Setting range response values for /mnt/symlinks/Serien/Sturm der Liebe/S12E2897 - 2018-04-10-15-10.ts. RangeRequest: bytes=0- Content-Length: 60, Content-Range: bytes 0-59/60 2018-04-15 21:11:09.789 Info HttpServer: HTTP Response 500 to 192.168.177.216. Time: 26ms. http://192.168.177.98:8096/emby/Videos/58f9796640fd500c660ac2aba2487186/stream?static=true&MediaSourceId=58f9796640fd500c660ac2aba2487186&PlaySessionId=e435af7988034519a5a88bf8fca7f9cd Why HTTP 500? As I said before, when I play in web-ui it plays. EDIT: Perhabs it has to do because I made a double symlink? Before I had only one symlink but I changed paths and thats the reason I have double symlinks. Before I had symlink on the same nfs mount. I found out that my nfs share is not stable and now I switched to smb mount wich is running a lot better. But my NAS can't share symlinks on smb share. That's the reason I make a symlink from local space of my odroid XU4 witch is running emby server to the directory of the samba share. Edited April 15, 2018 by bgx
Angelblue05 4132 Posted April 16, 2018 Posted April 16, 2018 Strange. the path looks fine. Are you able to direct play instead? If you can test, go into the add-on settings > video playback > disable Force HTTP playback. Usually HTTP 500 is a server error.
bgx 17 Posted April 16, 2018 Author Posted April 16, 2018 Switch to disable force HTTP Playback was the first I tried after I spottet the problem. But nothing changed. The problem remains. Only thing I mention is that symlink to a directory seems fine but symlink a file directly seems not to work anymore. The strange thing is that on nfs this had worked but there I was on mono, now I switched to net core.
Angelblue05 4132 Posted April 16, 2018 Posted April 16, 2018 @@bgx Maybe Emby created new content entries when you created that new symlink? Have you tried doing a database reset to make sure? Maybe the 500 is the server's way of saying the item id we are looking up does not exist anymore? 1
bgx 17 Posted April 16, 2018 Author Posted April 16, 2018 Good idea. Don't know if I tried this. Will do later when I'm at home and report back. :-) 1
Angelblue05 4132 Posted April 16, 2018 Posted April 16, 2018 (edited) Keep me posted. It's a weird one for sure. Might need Luke's input because I am not seeing the issue with the stream requested. And the error is internal to the server. Edited April 16, 2018 by Angelblue05
bgx 17 Posted April 16, 2018 Author Posted April 16, 2018 @@Angelblue05 So I reseted database in kodi and start from zero. Problem remains. Couldn't play the file. Now something weird. When I force transcoding in emby for kodi the same file plays. Directplay doesn't play. I think its a realy tricky bug. But I need to work this stuff. How can I help you more to fix this? What you need angelblue05?
Angelblue05 4132 Posted April 16, 2018 Posted April 16, 2018 @@Luke any idea why direct stream is not working? I am not seeing the issue, why is the server returning error 500. The url is fine, that's what I use as well. Is there something weird about symlink and direct stream? Sent from my iPhone using Tapatalk
Luke 42077 Posted April 16, 2018 Posted April 16, 2018 That means the client disconnected because it saw something it didn't like. In this case, based on the content-length it appears to be returning the symlink and not the actual file behind it. Unfortunately this is all handled by the netcore runtime so there might not be a whole lot we can do. If you can simplify your scenario you will definitely get a better experience. 1
bgx 17 Posted April 16, 2018 Author Posted April 16, 2018 (edited) Thats realy realy bad :-( Huh perhabs I had an Idea how I can solve my specific problem, width a little bit help of luke? I explain what I need to archive and what I do. Transcoding in emby is useless for me because all clients are kodi clients in my case. Kodi hasn't a great buffer on hls streams and that make this useless for me. I had code me a workaround. I transcode my tvheadend record on the fly while record is running. After that I save a stream version and the original version width different tags. Clients outside my house will only serve the version width tag stream and in local network only width tag nostream. Thats running great and the stream files are a lot smaller than the original and I can use the normal buffer in kodi. Overnight I take the original files and transcode them slowly again an overwrite the original version. Now this is small enough and I don't need the stream version. To not lost the viewmark of the file I set a symlink from the transcoded original file to the stream file. That's my initial situation. When I can't set a symlink I'm a little bit lost. Now the question to you @@Luke I experiment before width the emby API swagger but I couldn't get this realy to work. All I need is to run from a linux bashscript to get if the user outside (witch use the stream files) had view the file and the resume point and write this over to the other file. If I can archive this width a bash script and the emby API I don't need a symlink anymore. Can you help me here @@Luke ? Thanks for your time and for looking in my special problem. EDIT: Forget it, that will not solve my problem because I also have symlinks of movie files to sort them in specific libaries. To use the tvheadend purge mechanism I can't move the files because after that tvheadend will not see them. I had tho think more about it and what I can do... EDIT2: After thinking a bit about it there is a thing I don't understand? Why kodi will play it when emby transcode? I think when kodi can play the transcoded file it must also can play the direct file. The transcoding on the emby server is also a symlinked file. Edited April 16, 2018 by bgx
Luke 42077 Posted April 16, 2018 Posted April 16, 2018 Did you setup your library using smb:// paths, unc shares, or local folders?
bgx 17 Posted April 16, 2018 Author Posted April 16, 2018 @@Luke My libary is mounted smb share from my network drive on my linux debian strech running odroid xu4. The symlink is local on my linux running odroid to the smb share.
Luke 42077 Posted April 16, 2018 Posted April 16, 2018 Ok so then this isn't a netcore issue but still an issue in a third party library that we're depending on for SMB protocol support. It works with transcoding because ffmpeg supports the symlink, but if Emby has to touch the file directly then it doesn't work. Your best workaround is to simplify, or mount the share to a local path, and then try adding that local path to Emby.
Angelblue05 4132 Posted April 16, 2018 Posted April 16, 2018 We had another user with the same issue. I don't know if it's relevant, but in his case transcode also worked but not direct stream. https://emby.media/community/index.php?/topic/48959-follow-symlinks-not-working/ I just don't think it's something we can fix. 1
Luke 42077 Posted April 16, 2018 Posted April 16, 2018 Well we could but we'd have to contribute to the SMB library we're using to support symlinks, or ask them to add the feature. The workaround I'm suggesting is something that can get you where you want to go today.
bgx 17 Posted April 17, 2018 Author Posted April 17, 2018 Really sad. But I will try to change the part in tvheadend. If I can archive this I can move the files and don't need a symlink anymore. Gesendet von meinem MHA-L29 mit Tapatalk
jaaem 4 Posted April 24, 2018 Posted April 24, 2018 (edited) I was able to resolve most of my symlinks issues in Kodi by using NFS instead of smb. Sometimes the video does not have the correct length (end time gradually increases), making skipping forward impossible. Edit: Saw you switched from NFS to SMB which caused this problem. Edited April 24, 2018 by jaaem
bgx 17 Posted April 24, 2018 Author Posted April 24, 2018 NFS I had before on mono version this was running fine symlinks but width netcore I had problems with nfs why I switched to smb. After I couldn't resolve the problems I switched now to a symlinkfree file structure. Found a way to change the record path after the record in tvheadend and that's fine for me. Gesendet von meinem MHA-L29 mit Tapatalk
Luke 42077 Posted April 24, 2018 Posted April 24, 2018 I think that is a smart move. The more simple you make things, the more they will just work. 2
WillSo 0 Posted May 19, 2018 Posted May 19, 2018 (edited) I think I have similar problem,I like to symlink my TV shows to folder like "TV/Show Name/Season X/~Episode N.mkv" if this is direct symlink to mkv file, Kodi plugins (both sync and con) would not handle this, web app plays it correctly, also Roku app handles it correctly.Just starting with my library so I relinked all shows to /Season X/~Episode N Folder/episode N.mkv (~ denotes symlink), now kodi plugin plays fine.I'm not using samba, media files and Emby Server are on dedicated Linux (Ubuntu 18.04) server. Hope this will help to hunt down the issue. Will try to provide any logs needed. Edited May 19, 2018 by WillSo
tomimc 13 Posted May 20, 2018 Posted May 20, 2018 that's becouse net.core version cant follow file symlink, but can follow folder symlink.
Recommended Posts