Kodi Community Forum
[RELEASE] LiveTV.ru (Video) Plugin - Play Sopcast Streams - 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: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] LiveTV.ru (Video) Plugin - Play Sopcast Streams (/showthread.php?tid=57322)

Pages: 1 2 3


[RELEASE] LiveTV.ru (Video) Plugin - Play Sopcast Streams - patstew - 2009-09-03

I've made a plugin for livetv.ru, which has links to live sports (Premiership football etc.), similar to myp2p.eu. Currently I've only tested it on linux. It supports mms, sopcast and justin.tv streams currently.

To play the sopcast streams you need to have sopcast for linux installed. Sopcast is packaged for arch and ubuntu at least. If you can't find a package you can get it here. You will need to extract sp-sc-auth to /usr/bin/sp-sc.

To play justin.tv streams correctly the Justin.tv plugin needs to be in .xbmc/plugins/video/Justin.tv. The LiveTV.ru plugin should be extracted into .xbmc/plugins/video/.

Hopefully I will get a chance to port sopcast support to windows, and possibly add tvants support. Please let me know if you have any suggestions/criticisms, this is the first bit of python I've written.

Download Here

Thanks to voinage for the basic plugin layout, sopcast-player for the way to get sp-sc's buffer status, the Justin.tv plugin authors, whose plugin is (ab)used by mine, and to the XBMC team.


- whufclee - 2009-09-03

This sounds brilliant, unfortunately I only have xbox to try it on but it doesn't work (boo). Anyone know of a fix that would get it working on xbox? I know the sopcast stuff won't work but if it could just list mms and justin.tv links that would be great. Plugin comes up with a python script error at start, I'll try and paste a debug log later on.


- whufclee - 2009-09-03

Ok I've taken out "subprocess" from the import line at the top of the code as that seemed to be the issue. No idea what I'm doing or what "subprocess" does so not sure if it will still show mms streams or not (there aren't any available to check, just checked the website) but the justin.tv links work great. If mms work too I'll be a very happy chappy!

Great work fella


Sopcast a possibiliy on xbox? - whufclee - 2009-09-03

patstew Wrote:To play the sopcast streams you need to have sopcast for linux installed. Sopcast is packaged for arch and ubuntu at least. If you can't find a package you can get it here. You will need to extract sp-sc-auth to /usr/bin/sp-sc.

As I've stated before I'm no coder so please feel free to shoot me down in flames for even suggesting this but... Would the sopcast file mentioned above be any use to xbox users? I'm pretty sure it wouldn't just be a simple case of copying the one file over to xbox and voila but would there be any possibility of sopcast running on the good old trusty xbox in future?


- patstew - 2009-09-03

oops that subprocess line shouldn't be there anyway, thanks. It's supposed to be the new way to launch other applications with python, but I can't get it to work on linux either. It does import on linux, but using it throws an OSError.
I was considering making it so that the script could attempt to launch sopcast on another computer from xbox, that's probably the best possible, there will never be a working sopcast on xbox native.


- patstew - 2009-09-05

I've posted a new version that fixes a bug with link scraping (The first one was only getting the 'Additional links') and set a short delay between starting the video and detecting if the video is still playing, as sometimes it doesn't start instantaneously. (It needs to detect when the video finishes so that it can kill sopcast)

Unfortunately I've looked into making a windows version, but there is no equivalent to sp-sc for windows, and it's not easy to turn off the video and sound from the sopcast application. The x-sopcast plugin svn version seems to have a way of using the windows api to press buttons on the sopcast gui to mute it etc. Unfortunately it doesn't seem to actually work properly, and I'm not going to invest that much time in windows support that I won't even be using. Sorry.

Windows/Xbox support in combination with a separate linux pc is on the way though. I suppose you could run the linux part with colinux or vmware Rolleyes


- whufclee - 2009-09-12

Loving this plugin, great stuff indeed. Just noticed on the livetv.ru/en site it brings up a league table and if you click on a particular team you can then watch highlights from previous matches, would it be possible to add this to your already great plugin? Personally I'd love to have this option instead of watching it on the PC screen. Here is a link to the West Ham page which I just clicked on, on the right of the screen there are videos of past games. Cheers.


- spozen - 2009-09-13

It didn't show any links when i tried it today, yesterday i only got the justin links to work. Might just be something temporary, great plugin anyway!


- whufclee - 2009-09-13

spozen Wrote:It didn't show any links when i tried it today, yesterday i only got the justin links to work. Might just be something temporary, great plugin anyway!

Yeah there is some maintenance going on with the people who were doing the streams for football, it was all a bit confusing but I think it had something to do with some people in China! Should hopefully be sorted out soon, if I remember correctly it was Sinatv which was causing the problem.


- patstew - 2009-09-15

Sorry, I'm on holiday at the moment, I'll look at it in a few days.


- whufclee - 2009-09-16

Just a little problem for you to come back to when you're off your holiday... plugin isn't working anymore! It was great but now it's not showing anything so I guess the website has changed their structure a little. Also if you fancy having a go, babyboy20p requested a plugin be made for http://www.p2p4u.net - I had a look at the site and watched a few football streams and it looks pretty good. All of the links on there I tried were normal mediaplayer streams which didn't need any p2p software which would obviously be a bonus.

P.S. When fixing the livetv.ru plugin if you could see if it's possible to add the feature of previous game highlights (which I posted earlier on in the week) that would be fantastic. I know I'm taking the p*** here but hey everyone needs a to-do list when they come back off holiday!


- spozen - 2009-09-17

whufclee, when this plugin was working did you watch any sopcast streams?


- patstew - 2009-09-18

New version uploaded, I've fixed the obvious problems, and I've fixed a few problems with the sopcast support (It no longer errors out when you press cancel or buffering fails, sound now works properly, and I've added a settings dialog where you can change the sopcast location and timeout). Sopcast support is still only for linux.

whufclee: I'll consider adding the highlights. The problem is it uses several different flash video types, so it might be difficult to add comprehensive support. What do you think would be the best way to arrange them? The choice is by date/game or sport/league/team/game.

To anyone who knows about xbmc/python:
Sound wasn't working before because of a problem with xbmc's os.spawn. When I used os.spawn the sound device was assigned to sp-sc, not xbmc.
Normal result is:
Code:
fuser -v /dev/snd/*                          
                     USER        PID ACCESS COMMAND  
/dev/snd/controlC0:  pat        2072 F.... knotify4  
                     pat        2107 F.... kmix      
                     pat        2127 F.... amarok    
/dev/snd/pcmC0D0p:   pat        6943 F...m xbmc.bin  
/dev/snd/timer:      pat        6943 f.... xbmc.bin
But after using os.spawn:
Code:
fuser -v /dev/snd/*                          
                     USER        PID ACCESS COMMAND  
/dev/snd/controlC0:  pat        2072 F.... knotify4  
                     pat        2107 F.... kmix      
                     pat        2127 F.... amarok    
/dev/snd/pcmC0D0p:   pat        7067 F.... sp-sc      
/dev/snd/timer:      pat        7067 f.... sp-sc
And XBMC complains that it cannot initialise the audio device. Subprocess doesn't work either so I'm now using os.fork. Can anyone shed any light on this?

EDIT: If anyone downloaded it in the last 30 minutes there was a slight bug in there that I've corrected now.


- whufclee - 2009-09-18

patstew Wrote:I'll consider adding the highlights. The problem is it uses several different flash video types, so it might be difficult to add comprehensive support. What do you think would be the best way to arrange them? The choice is by date/game or sport/league/team/game.

Ideally I guess it would be good to have league > choice of team or date but personally for me I only really want to see English Premiership (mainly West Ham) so sorted by team and then a list of games in date order would be fine. Thanks for fixing the plugin so quickly, I'll give it a test later on and the work you're doing on this really is much appreciated. Cheers


- spozen - 2009-09-19

Impressive work you are doing here, especially since you don't seem to be getting much help around here....

I have tested the plugin now and it's great when it works, but unfortunately it doesn't work that often. Justin.TV is working flawlessly, too bad the video tend to be a little laggy. MMS streams works some times, this could be the website also, not necessarily the plugin.

Sopcast on the other hand... I have gotten it to work 2 seconds without sound, after that xbmc restarts. As you described it assigns the audio to sopcast.

Something that really annoys me is that XBMC hangs sometimes when i load sopcast streams, I have to kill xorg to restart it. And it doesn't seem like it's Sopcast that is the issue here, it doesn't help to kill it.

Something thats even more annoying and probably isn't related to this plugin, is when i have to wait 2 minutes before XBMC displays the error message, under those 2 minutes you can't do anything. Really bugs the hell out of me.

Finally would you consider adding this to the SVN repos? Would be nice for updates so you don't have to download it from the google pages everytime.

whufclee Wrote:Just a little problem for you to come back to when you're off your holiday... plugin isn't working anymore! It was great but now it's not showing anything so I guess the website has changed their structure a little. Also if you fancy having a go, babyboy20p requested a plugin be made for http://www.p2p4u.net - I had a look at the site and watched a few football streams and it looks pretty good. All of the links on there I tried were normal mediaplayer streams which didn't need any p2p software which would obviously be a bonus.


P2P4U is kinda like Justin.TV, the streams are easy to view but are a pain to watch, it has extreme jitter sometimes and sound goes out of sync, etc... But that might just be the streams i watch i guess...