Please help me with this new RMTP stream script?
#1
Hi,
I'm a bit new to xbmc scripts so excuse me if I've done something really stupid. I am a programmer but this is my first time looking at python so i did the obvious and copied from other scripts to get what i need.

I'm trying to watch an RTMP stream. I've done lots of reading in this forum and settled on using 'net transport' network sniffer to get the URL of the stream. I also note that net transport can download from the stream just fine. So, what is it doing that I'm not?

I've pasted my code below and from that you can see the page URL. Is ti possible that the server is checking something else such as this random number attached to the swf url? Or have I missed something else?

Any help greatly appreciated!

Thanks
Toad


[HTML]import xbmc, xbmcgui

item = xbmcgui.ListItem("Inter")
item.setProperty("SWFPlayer", "http://inter.ua/images/player.swf?t=9821890")
item.setProperty("PlayPath", "inter.flv")
item.setProperty("PageURL", "http://inter.ua/uk/live/")
item.setProperty("name", "live_player")
item.setProperty("quality", "1")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://62.149.26.237:80/live", item)[/HTML]
Reply
#2
Hey, welcome to the XBMC forums.

You almost got it there. name and quality is not a parameter. Other than that, your play path was wrong. And for this stream the page url wasn't required. If you enable debug log on xbmc (Settings>>System>>Debugging *the log saves to xbmc.log*), you will notice an error "Failed to play inter.flv; stream not found." So, I first tried the playpath "inter" and that didn't work either. Then I remember found another script I made, that I had to use "mp4:filename" for the playplay. And it worked.

Code:
import xbmc, xbmcgui
                      
item = xbmcgui.ListItem("Inter")
item.setProperty("SWFPlayer", "http://inter.ua/images/player.swf")
item.setProperty("PlayPath", "mp4:inter")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://62.149.26.237:80/live", item)
Reply
#3
I believe you can find this out directly by decompiling the player.swf file?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
Stacked,
Thanks for the reply! That worked a treat and now we're watching Ukrainian TV through our Xbox.
Maybe *if* I get time I could write a plugin for watching free TV streams but i suspect there's something out there already.

jmarshal, thanks for the hint on the decompiling the swf, I'll bear that in mind for next time.

thanks again guys

Toad
Reply
#5
Thanks so much for this script guys!!!

It looks so much better on TV!

Do you think you could possibly make scripts for other Ukrainian channels?Big Grin


Thanks.
Reply
#6
sorry guys, can someone share the script - i cant find it here
Reply
#7
привіт,

I have the script for some channels but others are just straight forward easy play lists that you can open directly as if they were music.

Once I find the upload file button I'll submit a .zip file with all I have.

Bittihuduga, the script is in the reply from stacked. You need to save it as a .py file and place it in the script directory of your xbmc install.

Tony
Reply
#8
Star 
OK, After reading the FAQ, I still don't see the button to upload attachments (firefox 3.5.7 for anybody interested), maybe this forum doesn't allow files?

So, here'a ll the files you need. The filename I used is at the top of each code window. Make sure you use the correct file extension and upload .m3u to you usual video folder and the .py to your scripts folder.

For those who aren't sure. You need to put the text in each box into a file named as the filename above the box (using notepad for example - dont' try it with word). Then put them in the right place for your xbmc installation to read them (see the instructions for that part).

Citi TV.py
Code:
import xbmc, xbmcgui
item = xbmcgui.ListItem("K1")
item.setProperty("SWFPlayer", "/i/player/newfp/flvplayer.swf")
item.setProperty("PlayPath", "mp4:livestream")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://91.206.48.103/live", item)


inter.py
Code:
import xbmc, xbmcgui
item = xbmcgui.ListItem("Inter")
item.setProperty("SWFPlayer", "http://inter.ua/images/player.swf")
item.setProperty("PlayPath", "mp4:inter")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://62.149.26.237:80/live", item)


K1HQ.py
Code:
import xbmc, xbmcgui
                      
item = xbmcgui.ListItem("K1")
item.setProperty("SWFPlayer", "http://k1.ua/images/player.swf")
item.setProperty("PlayPath", "mp4:k1_hq")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://62.149.26.237:80/live", item)

K1.py (lower quality)
Code:
import xbmc, xbmcgui
                      
item = xbmcgui.ListItem("K1")
item.setProperty("SWFPlayer", "http://k1.ua/images/player.swf")
item.setProperty("PlayPath", "mp4:k1")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://62.149.26.237:80/live", item)

eska.m3u
Code:
mms://streamtv.eska.pl:6000/eskatv

interia.m3u (Polish)
Code:
mms://streamlive.interia.pl/interiatv400

news24.asf (might work as m3u too i guess)
Code:
mms://217.20.164.165:8000/24tv.asf

otv.m3u
Code:
http://212.26.146.148/asxgen/wmtencoder/otv

rmfMaxxx.m3u (Polish)
Code:
http://217.74.72.29/RMFMAXXXVIDEO200

StarTV.m3u
Code:
mms://77.222.135.42/startv

TBTV.m3u
Code:
http://91.195.53.34:8081/stream.flv

UBC.m3u
Code:
mms://89.187.1.165/UBC?WMContentBitrate=300000

Первый Деловой.asx ( i can't remember if this one works or not )
Code:
<ASX Version = "3.0">
   <ENTRY>
      <REF HREF = "mms://212.26.146.70:1755/wmtencoder/tv1.wmv"/>
      <REF HREF = "http://212.26.146.70:80/wmtencoder/tv1.wmv"/>
   </ENTRY>
</ASX>

If you find any more channels on the web with live streams, post them here and I'll try to work them out for us all.

all the best,
Tony
Reply
#9
Hi all,
is it possible to consolidate all these streams as one Addon?

Another channel that would be interesting for me is: http://tv.a.ua/show/novyj_kanal/

A lot of other streams are availiable here: http://tv.a.ua

I was also trying to add inter.py as addon by creating script.inter folder and addon.xml in .xbmc/addons folder in Dharma Live, but the script is not shown under Programs in Aeon Skin.
Reply

Logout Mark Read Team Forum Stats Members Help
Please help me with this new RMTP stream script?0