Kodi Community Forum
CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: Windows Media Center (WMC) (https://forum.kodi.tv/forumdisplay.php?fid=205)
+---- Thread: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One (/showthread.php?tid=339153)

Pages: 1 2


CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-08

If Kodi v18 Leia RC5 on Xbox One does not yet support Live TV using ServerWMC as the backend, then confirmation from an expert would be a prize, and nothing further is needed.  On the other hand, if there are Kodi fans who have succeeded with PVR-WMC enabled on Xbox One for Live TV, then I'm stumped and seeking advice. 

Besides missing Live TV, I cannot view recorded TV shows from the Kodi TV menu option although they play perfectly using the Video option.  Whether live or recorded under the TV option, the stream will start, possibly flash an image of the show for a second or two, then abort.  The ServerWMC log indicates a CloseLiveStream request from the client immediately following the OpenLiveStream execution (Complete Log: https://pastebin.com/NzWvXThy).

The Guide and Channels are populated and update properly.  The settings in ServerWMC look correct to me with the Recorded TV folder shared on the same network although the folder resides on a separate drive M (for 'Media') on the same computer as the host 'HP' (HP Media Center PC with Win 7).  The host uses a CableCard with a Ceton XfinitiTV PCIe 4, and a separate ATSC tuner.  For the path in ServerWMC, I have tried a number of variations including the IP address, with and without usernames and passwords.  Additionally, there is a watched folder, Recorded TV Comskip, but it makes no difference for live TV when removed from the WMC library.  I have tried multiple other combinations of settings in ServerWMC and Kodi to no avail.

I have an original Xbox One and an Xbox One X, neither of which can display live TV in Kodi with ServerWMC.  However, the host, a SurfaceBook, and an Android phone work with Kodi and ServerWMC using Kodi Krypton v17.6.  Moreover, the Surfacebook also worked completely with a separate install of the Leia v18 RC5 release.  Other media, such as music and pictures, have worked with Leia and SMB-identified sources.  Lastly, if I switch to NextPVR, or use it concurrently with ServerWMC, the Xboxes display live and recorded TV under the TV option in Kodi for NextPVR channels only, without aborting.  However, managing the channels with two PVRs is a chore, and also loses the ability to use the backend channel numbers.  Because WMC has more controls for series management (timers), I still want to be able set them up in the host with distributed viewing throughout the house (yes, like the Xbox 360 extenders).  If you made it this far, I hope you have ideas.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-10

I think it's failing because samba shares are not working on the xbox one with kodi.  Is this thread helpful?:
https://forum.kodi.tv/showthread.php?tid=331718


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-10

Thank you Krustyreturns for your reply.  I had found that thread to be particularly useful for installing SMB into Leia for the Xbox One and solving the missing SMB option to link to various video, music, and picture sources on my host computer.  If samba shares are the culprit, then I guess we can only hope for a fix in Kodi Leia to see live TV with PVR-WMC on Xbox.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-10

So you have samba working now in kodi/xbox-One but pvr.wmc still doesn't work?  If so, can you post the kodi log after trying to start a live stream?


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-10

Yes, I can get to shared media folders using an smb:\\ protocol.  That includes shows in the Recorded TV folder but only through the Video menu option in Kodi Leia.  Recent recordings are also listed under the TV menu item, but those will not play for more than a few seconds--unlike accessing the same recordings using the Video option in the menu, which play in their entirety.  It occurs to me that it might be helpful to know that when I unchecked 'Delete temporary stream files' in ServerWMC, the snippets of the aborted live TV streams remained in the TempSWMC sub-folder within the Recorded TV folder and were playable from there for their few seconds of duration.

Kodi log:  http://paste.kodi.tv/unihusuvon
Corresponding ServerWMC log: https://pastebin.com/fAhJxXKb

Again, thank you for taking a look.  I know there is none better.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-10

Looking at the kodi log, it looks like smb is working fine.  I'm not sure, but it looks like kodi thinks it has hit the end of file on the live stream.  As an experiment, in your settings change Debug_RemuxAllRecordings back to the default, which is false (and always should be kept false).  Then save and restart swmc, then try to playback one of your recordings using pvr.wmc.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-11

That's what it looks like to me too--somehow Kodi thinks it received a CloseLiveStream command when there wasn't one.  And here's a novelty: when I changed Debug_RemuxAllRecordings to false, recordings in my watched folder, Recorded TV Comskip, now play from the TV menu in Kodi (and continue to play under the Video menu).  However, there is no change for the recordings in the Recorded TV folder--those still play for a second or two before terminating.  Live TV is likewise.  Both folders are shared on the host the same way: read/write with 'Kodiuser' as set up in Kodi and ServerWMC with a password (the folders are also shared with 'Everybody'). 

I note that after the first selection of a TV channel or recording in the Recorded TV folder from the TV menu, there is typically just a flash of an image of the show for a second selection, and then nothing at all for further selections.  This makes me wonder if Kodi's cache is somehow unintentionally limited in the UWP version and fills up almost immediately when an item points to the Recorded TV folder.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-11

When you say from the 'play from the tv menu' do you mean pvr.wmc?


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-11

Yes.  The Channels and Guide are populated through PVR-WMC in my setup.  I have many series set up in WMC with new recordings almost daily that show up under the TV menu as recent recordings.  I only mention the TV menu item because of the difference in Kodi behavior for playing the same recordings within the Recorded TV folder, which is also a source for my Kodi Video files (the recordings are not playable if selected under the TV menu, but they are playable when selected under the Video menu).


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-12

Yeah, sorry I am even more confused.  Any file access through a video source other then through the pvr.wmc addon don't tell me about, it just messes my easily confused brain up.  Also make sure Debug_RemuxAllRecordings is kept false.  With that out of the way, tell me if this is the current status:

1) live tv plays for a few seconds then stops due to kodi sending a closelivestream (for some yet-to-be-determined reason).
2) recorded files have the same problem IF they are are stored in wmc's recorded tv folder.
3) if the recordings are moved to a network share (a watched folder) they play fine (!)

If that's not the current status, let me know what I am getting wrong.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-12

Essentially yes, but there has been a development.  While live TV is still not lasting more than a few seconds, the recorded files in the Recorded TV folder are now playable from Kodi Leia's TV menu, not just from Videos.   I discovered today that if Debug_RemuxAllRecordings is kept as false and I rescan the contents of the Recorded TV folder as a Kodi media source for Video, then all of the files are playable, regardless of how a file is accessed in Kodi Leia.  Even though the newest recordings are listed under contents of the TV menu, it takes a rescan to make them playable there from the Recorded TV folder.  Files remain playable if moved to, or duplicated in, my other WMC watched folder, Recorded TV Comskip (these are the same recorded shows with the commericials removed by MCEBuddy and Comskip). 

I set the Kodi video library to update upon start, which has worked with several tests today.  I believe this setting will capture all recordings except those that get recorded during the current Kodi session.  If I turn the setting off, the files in the Recorded TV folder are again unplayable from the TV menu upon restart.  This seems like a bug, but one that has a workaround.

I would not have made this discovery without your replies.  Thanks you very much.  Only live TV is the issue now.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-17

Something went awry in the Windows Store last night for the Kodi app, which might have produced a clue to solve the live TV issue on my Xboxes.  My SurfaceBook, which had Krypton 17.6 installed from the Windows Store, was updated to Leia RC 5.2, as was my Xbox One X but from Leia RC 5 (the other Xbox was off).  Live TV ceased to play on my SurfaceBook with Leia, which produced the exact same limitations that still apply to my Xboxes.  In a couple of attempts to resolve, I determined that the Windows Store will only install Leia RC 5.2 on my SurfaceBook today, whereas before it would install Krypton there, reserving Leia for my Xboxes.  Ultimately, I bypassed the Windows Store and reinstalled Krypton 17.6 as a desktop app.  Live TV works again on my SurfaceBook.

Here's the kicker that might offer a clue as to what is happening in Leia.  If I uninstall Krypton 17.6 on the SurfaceBook but keep its profile, then install Leia RC 5.2 as a desktop app (not from the Windows Store), then live TV will play after I re-enable PVR-WMC.  There seems to be a buffering issue, however, and I'll probably revert back to Krypton on my SurfaceBook.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-21

Almost live TV:  If I start to record a TV show on my Xboxes with Leia RC 5.2, wait a minute or so, then start to watch the recording while the show is still being recorded, I can watch the show nearly live through to the end of the recording (ending just after the actual show did).  It seems best to wait a couple of minutes, otherwise, the show might abort as if I attempted to watch live TV directly as above.  I know that live TV relies upon temporary recordings in the TempSWMC subfolder within the Recorded TV folder.  The conditions identified here seem to imply that the code related to live TV is pointing to an incorrect line causing the quick end since it is possible to watch the recordings in process when the recordings are not 'temporary'.  Since Leia RC 5.2 works with NextPVR for live TV, and ServerWMC works with Krypton 17.6 (reinstalled on my SurfaceBook), I suspect that PVR-WMC 2.4.3. might deserve the focus, but I cannot be sure.  Additionally, I wonder if SAMBA 2/3 is not entirely perfected for UWP for Xbox.


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - krustyreturns - 2019-01-23

Interesting, but that still doesn't explain why only the xbox-one has this problem.  Try changing this setting for live tv streams so that there is more of a ts data buggered before it starts, if you make it long enough it should be just like a recording.

 <BufferDelayLiveMS>0</BufferDelayLiveMS>

time is in milliseconds


RE: CloseLiveStream immediately follows OpenLiveStream - No Live TV in Leia on Xbox One - DJJR - 2019-01-23

Still no live TV on Xboxes.  I tested three settings for <BufferDelayLiveMS>: 2000, 20000, and 120000 ms, restarting ServerWMC in between.  The changes in settings did not affect Krypton 17.6 on my SurfaceBook, which continued to play live TV just fine.  Thanks for the idea.