Kodi Community Forum
Release TV Guide - with XMLTV and streaming support - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release TV Guide - with XMLTV and streaming support (/showthread.php?tid=120377)



RE: [RELEASE] TV Guide - with XMLTV and streaming support - learningit - 2013-02-03

Tommy, there seems to be an issue with the timer being set in source.play(). I've confirmed that the waitForPlayBackStopped() callback is never being called. I get the following thread error in xbmc.log:

01:22:58 T:5440 NOTICE: -->Python Interpreter Initialized<--
01:22:59 T:5436 NOTICE: Settings changed: False
01:23:01 T:5440 ERROR: EXCEPTION: Non-Existent Control 0
01:23:13 T:5440 NOTICE: Playing custom stream url: C:\Users\TV\AppData\Roaming\XBMC\userdata\playlists\cnn.strm
01:23:13 T:5196 NOTICE: DVDPlayer: Opening: rtmp://c.cdn.msnbclive.eu/edge/cnn_live swfurl=http://msnbclive.eu/player.swf pageUrl=http://blog.livenewschat.tv/rockinroosters/ swfVfy=true live=true timeout=60
01:23:13 T:5196 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
01:23:13 T:6096 NOTICE: Thread CDVDPlayer start, auto delete: false
01:23:13 T:6096 NOTICE: Creating InputStream
01:23:14 T:6096 NOTICE: Creating Demuxer
01:23:14 T:6096 NOTICE: Metadata:
01:23:14 T:6096 NOTICE: author
01:23:14 T:6096 NOTICE: copyright
01:23:14 T:6096 NOTICE: description
01:23:14 T:6096 NOTICE: keywords
01:23:14 T:6096 NOTICE: rating
01:23:14 T:6096 NOTICE: title
01:23:14 T:6096 NOTICE: presetname Custom
01:23:14 T:6096 NOTICE: creationdate Sat Feb 02 21:13:37 2013
01:23:14 T:6096 NOTICE: videodevice Dazzle DVC100 Video Device
01:23:14 T:6096 NOTICE: framerate 29.97
01:23:14 T:6096 NOTICE: width 640.00
01:23:14 T:6096 NOTICE: height 360.00
01:23:14 T:6096 NOTICE: videocodecid 7.00
01:23:14 T:6096 NOTICE: videodatarate 550.00
01:23:14 T:6096 NOTICE: avclevel 31.00
01:23:14 T:6096 NOTICE: avcprofile 66.00
01:23:14 T:6096 NOTICE: audiodevice Realtek HD Audio Input
01:23:14 T:6096 NOTICE: audiosamplerate 44100.00
01:23:14 T:6096 NOTICE: audiochannels 1.00
01:23:14 T:6096 NOTICE: audioinputvolume 37.00
01:23:14 T:6096 NOTICE: audiocodecid 2.00
01:23:14 T:6096 NOTICE: audiodatarate 112.00
01:23:15 T:6096 NOTICE: Opening video stream: 0 source: 256
01:23:15 T:6096 NOTICE: Creating video codec with codec id: 28
01:23:15 T:6096 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
01:23:15 T:6096 ERROR: CDVDPlayerVideo::OpenStream - Invalid framerate 125, using forced 25fps and just trust timestamps
01:23:15 T:6096 NOTICE: Creating video thread
01:23:15 T:6096 NOTICE: Opening audio stream: 1 source: 256
01:23:15 T:6096 NOTICE: Finding audio codec for: 86017
01:23:15 T:1604 NOTICE: Thread CDVDPlayerVideo start, auto delete: false
01:23:15 T:1604 NOTICE: running thread: video_thread
01:23:15 T:6096 NOTICE: Creating audio thread
01:23:15 T:5416 NOTICE: Thread CDVDPlayerAudio start, auto delete: false
01:23:15 T:5416 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
01:23:15 T:5416 NOTICE: Creating audio stream (codec id: 86017, channels: 1, sample rate: 44100, no pass-through)
01:23:15 T:1604 NOTICE: fps: 25.000000, pwidth: 640, pheight: 360, dwidth: 640, dheight: 360
01:23:15 T:1604 NOTICE: Display resolution DESKTOP : 1920x1080 @ 60.00 - Full Screen (16)
01:23:15 T:1604 NOTICE: D3D: rendering method forced to DXVA2 processor
01:23:16 T:3456 ERROR: Exception in thread Thread-19:
Traceback (most recent call last):
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 532, in __bootstrap_inner
self.run()
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 736, in run
self.function(*self.args, **self.kwargs)
TypeError: decorator() takes exactly 1 argument (2 given)
01:23:23 T:5196 NOTICE: CDVDPlayer::CloseFile()
01:23:23 T:5196 NOTICE: DVDPlayer: waiting for threads to exit

I am running Frodo 12.0 final release on Windows 7.
I believe this is a problem with the timer thread. The add-on seems to work ok, but when I stop the player in full screen, I get a blank screen which I have to use the tab key or escape to get back to the TVGuide. I thought that was normal behaviour, but after reading the thread code I realized it shouldn't behave that way - it's never coming out of the watchdog loop which restores the EPG screen when self.player.isPlaying goes false. I'll be damned if I can see what's wrong with the code unless the timer doesn't like having self passed in args[]. I mainly use python 3, so I'm not an expert on ver 2. BTW, I got into this because I was looking to add a notification of what program will play next near the end of the current program - I need to shut the alarm off if the player stops and waitForPlayBackStopped() or the callback seems the appropriate place. Thanks.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - fungify - 2013-02-03

i Tommy

I really like this mod, but i'm having som major issues I hope you can solve.

I'm using Danish LiveTV without a problem, and can watch hours of streaming DR in highest quality uninterrupted (or mostly - you know how DR can be), but when I use TV Guide, the video has to buffer for very long (>10 seconds) before playing, and when it finally is playing, it is choppy and laggy, and with lots of long pauses. I've tried to disable OSD, but this has no effect at all.

What can be wrong?

FFY


RE: [RELEASE] TV Guide - with XMLTV and streaming support - twinther - 2013-02-03

(2013-02-03, 08:49)learningit Wrote: Tommy, there seems to be an issue with the timer being set in source.play(). I've confirmed that the waitForPlayBackStopped() callback is never being called. I get the following thread error in xbmc.log:

I am running Frodo 12.0 final release on Windows 7.
I believe this is a problem with the timer thread. The add-on seems to work ok, but when I stop the player in full screen, I get a blank screen which I have to use the tab key or escape to get back to the TVGuide. I thought that was normal behaviour, but after reading the thread code I realized it shouldn't behave that way - it's never coming out of the watchdog loop which restores the EPG screen when self.player.isPlaying goes false. I'll be damned if I can see what's wrong with the code unless the timer doesn't like having self passed in args[]. I mainly use python 3, so I'm not an expert on ver 2. BTW, I got into this because I was looking to add a notification of what program will play next near the end of the current program - I need to shut the alarm off if the player stops and waitForPlayBackStopped() or the callback seems the appropriate place. Thanks.

Hi learningit,
It looks like you are not using the latest test version (1.3.99 at the moment). The error you got does not match with the source code. I have also made some change a little while ago to avoid the black screen you got.
Can you try with the latest test version?
Br.
Tommy


RE: [RELEASE] TV Guide - with XMLTV and streaming support - twinther - 2013-02-03

(2013-02-03, 00:59)Bobian Wrote: Ok. Source is xmltv, addon - Polish TV/WeebTV from sd-xbmc repository. I selected alternate streaming method in the tv guide setting. And when I choose channel in epg, open stream window appears. When I stop it, at the right bottom of the page information about the playlist is demonstrating itself.
1.3.5 version works almost correctly

I tried with 4fun tv in the polish tv addon (I don't know how to use weeb, all text is in polish Smile) and it works no problem.
In Frodo I don't see the "Opening stream" window at all. In Eden the "Opening stream" window is displayed for about 0.5 seconds before the stream starts and then the "Opening stream" window disappears.

I don't understand what you mean with the playlist?

I'm not able to reproduce the problem so I don't know what to do about it...

br.
Tommy


RE: [RELEASE] TV Guide - with XMLTV and streaming support - twinther - 2013-02-03

(2013-02-03, 11:47)fungify Wrote: i Tommy

I really like this mod, but i'm having som major issues I hope you can solve.

I'm using Danish LiveTV without a problem, and can watch hours of streaming DR in highest quality uninterrupted (or mostly - you know how DR can be), but when I use TV Guide, the video has to buffer for very long (>10 seconds) before playing, and when it finally is playing, it is choppy and laggy, and with lots of long pauses. I've tried to disable OSD, but this has no effect at all.

What can be wrong?

FFY


I don't know the exact reason, but the difference between enabled and disabled OSD is that the stream is played either in a windowed mode or fullscreen mode. When OSD is enabled the stream is played in windowed mode (even though the window takes up the entire screen) and sometimes XBMC has problem with this. My guess is that it is hardware related somehow, small cpu or gpu or something like that.

Have you tried with the alternate streaming method I added in the test version?

Br.
Tommy


RE: [RELEASE] TV Guide - with XMLTV and streaming support - twinther - 2013-02-03

I've just updated the first post with details on v. 1.4.0 and v. 2.0.0.



RE: [RELEASE] TV Guide - with XMLTV and streaming support - dscraw4d - 2013-02-03

(2013-02-02, 17:46)vandonh Wrote:
(2013-02-01, 23:57)learningit Wrote:
(2013-01-31, 01:21)vandonh Wrote: I'm using TV Guide now with the Filmon plugin and it works great, have also set up several sports stream setup and that works too.

Now my next hurdle is the USTVNOW plugin, I can save the channels as favorites and select the channels in TV Guide to the correct program/station, however I've noticed now that the USTVNOW favorites are only valid for a 24 hour period, after that period they will need to be reselected and again assigned to the TV Guide channels. The end result is that it is a non working solution.

Now I wonder if we can do the same as done for the FilmOn plugin

To use the USTVNOW plugin from TV Guide, add the following code at the end of default.py, just before the last line which should read: Addon.end_of_directory()
You will find default.py in the plugin.video.ustvnow directory.

elif mode=='play':
name = Addon.plugin_queries['name']
try:
stream_type = 'rtmp'
channels = []
quality = int(Addon.get_setting('quality'))
channels = ustv.get_channels(quality,stream_type)
for c in channels:
if c['name'] == name:
print "URL = "+c['url']
print "setResolvedUrl"
item = xbmcgui.ListItem(path=c['url'])
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
except:
pass



Then, setup a .strm file containing the following line:
plugin://plugin.video.ustvnow/?name=ABC&mode=play

You can use ABC, CBS, NBC, CW, FOX, PBS, My9 (note case sensitivity) for the free channels. The resolution will follow whatever is set in settings for USTVNOW. I use mc2xml set to a harrisburg, pa zip code to get the .xml for listings.

For some reason the indentations on the code above don't show correctly, but if you 'quote' the post you'll see the proper indents or if you know python you can figure it out.

This is great, exactly whay I needed, thank you!!!

Have a problem with the code, I get the following script error:

Error Contents: ('invalid syntax', ('C:\\Users\\Sony\\AppData\\Roaming\\XBMC\\addons\\plugin.video.ustvnow\\default.py', 84, 7, ' for c in channels:\n'))

So I must be doing some thing wrong with inserting the code


Update, figured it out working like a champ!!!!

Many thanks my friend!!!

save problem here.... how did you work it out?




RE: [RELEASE] TV Guide - with XMLTV and streaming support - learningit - 2013-02-03

(2013-02-03, 15:57)twinther Wrote:
(2013-02-03, 08:49)learningit Wrote: Tommy, there seems to be an issue with the timer being set in source.play(). I've confirmed that the waitForPlayBackStopped() callback is never being called. I get the following thread error in xbmc.log:

I am running Frodo 12.0 final release on Windows 7.
I believe this is a problem with the timer thread. The add-on seems to work ok, but when I stop the player in full screen, I get a blank screen which I have to use the tab key or escape to get back to the TVGuide. I thought that was normal behaviour, but after reading the thread code I realized it shouldn't behave that way - it's never coming out of the watchdog loop which restores the EPG screen when self.player.isPlaying goes false. I'll be damned if I can see what's wrong with the code unless the timer doesn't like having self passed in args[]. I mainly use python 3, so I'm not an expert on ver 2. BTW, I got into this because I was looking to add a notification of what program will play next near the end of the current program - I need to shut the alarm off if the player stops and waitForPlayBackStopped() or the callback seems the appropriate place. Thanks.

Hi learningit,
It looks like you are not using the latest test version (1.3.99 at the moment). The error you got does not match with the source code. I have also made some change a little while ago to avoid the black screen you got.
Can you try with the latest test version?
Br.
Tommy

Tommy,

Installed 2.0.0. Initially had some problems with the db, so I cleared it and let the program rebuild it from the xmltv.xml file. In looking over some of the problems folks have, this may help them too- but they need to wait because (at least for my xml) it takes a long time to rebuild the db. After that, it runs great. There's a small issue that's a bit random when the stream being played has a load or not found error you get a blank screen instead of going back to the EPG, but I can live with that. A feature you may want to think about is adding a couple lines of code to call notification._scheduleNotification(self.database.getNextProgram(self.osdChannel)) when setting the waitForPlayBackStopped timer, and the _unscheduleNotification when the watchdog detects playback has stopped. This would give notification of what's playing next at the end of the current program without going back to the EPG. To do it right actually requires a separate timer and variable which updates the current program to the next program and resets the timer to the end of the next program each time the timer expires, but the quick way above gives you one next program before going back to the EPG. Thanks, and great work, your code is a joy to read.



RE: [RELEASE] TV Guide - with XMLTV and streaming support - Maniac - 2013-02-04

This plugin has come a long way Smile great work Tommy! Probably the best addon for watching, your own, streams with EPG,

Question: What is the trick to get channel logos to work? specific name? specific format (png/jpg)?
Thanks


RE: [RELEASE] TV Guide - with XMLTV and streaming support - dscraw4d - 2013-02-04

Worked for several hours to get it to work with USTVNOW and it works great! plus made/modified my own skin for it..

Image



RE: [RELEASE] TV Guide - with XMLTV and streaming support - learningit - 2013-02-04

(2013-02-04, 11:56)Maniac Wrote: This plugin has come a long way Smile great work Tommy! Probably the best addon for watching, your own, streams with EPG,

Question: What is the trick to get channel logos to work? specific name? specific format (png/jpg)?
Thanks

First set the directory for the logos in addon settings. In that directory save the logos that you want to be displayed. The filetype needs to be .png. The filename has to be exactly what the channel name is (note that filename IS case sensitive). So, for example, if you have a .xml file from mc2xml where the channel name is "136 E4", you need to include the channel number as well as the channel name separated by a space. I've noticed that the channel logos seem to reload only after the database is updated, so, if you're using xmltv, you can either create a new up to date .xml from mc2xml, or you can simply edit the file with an editor and insert a space in the beginning and save it out to update the file's datetime to force a reload.

If you are using mc2xml: To avoid the problem of the channel number and get a name that you can remember, create a .ren file as described at http://mc2xml.hosterbox.net/ to give you consistent channel names.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - fungify - 2013-02-04

(2013-02-03, 18:33)twinther Wrote: I don't know the exact reason, but the difference between enabled and disabled OSD is that the stream is played either in a windowed mode or fullscreen mode. When OSD is enabled the stream is played in windowed mode (even though the window takes up the entire screen) and sometimes XBMC has problem with this. My guess is that it is hardware related somehow, small cpu or gpu or something like that.

I'm using a I5 so CPU should not be a problem, and is usually running my XBMC in window mode.

But anyway - updated to 1.4.0 as of today, and this version seems to run very well. I'm using it with disabled OSD - not by choice but because the screen is black when OSD is enabled. But without OSD it seems to run really well.

Tak for dit gode arbejde og gode plugins Tommy.

FFY



RE: [RELEASE] TV Guide - with XMLTV and streaming support - Maniac - 2013-02-04

(2013-02-03, 20:09)twinther Wrote: I've just updated the first post with details on v. 1.4.0 and v. 2.0.0.
Maybe I am missing something, I have Frodo on my atv2 and on my windows htpc, and the only version available is 1.4.0 via the beta repo. Can't see any version 2.0.0.



RE: [RELEASE] TV Guide - with XMLTV and streaming support - learningit - 2013-02-04

(2013-02-04, 22:05)Maniac Wrote:
(2013-02-03, 20:09)twinther Wrote: I've just updated the first post with details on v. 1.4.0 and v. 2.0.0.
Maybe I am missing something, I have Frodo on my atv2 and on my windows htpc, and the only version available is 1.4.0 via the beta repo. Can't see any version 2.0.0.

Go here https://github.com/twinther/script.tvguide and click on the ZIP key.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - twinther - 2013-02-04

(2013-02-04, 22:05)Maniac Wrote:
(2013-02-03, 20:09)twinther Wrote: I've just updated the first post with details on v. 1.4.0 and v. 2.0.0.
Maybe I am missing something, I have Frodo on my atv2 and on my windows htpc, and the only version available is 1.4.0 via the beta repo. Can't see any version 2.0.0.

It hasn't been processed by Team XBMC yet. Probably tomorrow, they are usually pretty quick Smile

There isn't any changes between 1.4.0 and 2.0.0 anyway. Just Frodo API version changes...