I previously used this code to play live rtmp streams, but after an update it no longer works.
def Live():
oc = ObjectContainer()
link = HTTP.Request('http://www.tbn.org/watch/mobile_app/v3/getlivestreams.php').content
match='rtmp://cp114430.live.edgefcs.net/live/ playpath=tbn_mbr_600@101613 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp114428.live.edgefcs.net/live/ playpath=churchch_mbr_600@101620 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp114432.live.edgefcs.net/live/ playpath=jctv_mbr_600@101615 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp114426.live.edgefcs.net/live/ playpath=soac_mbr_600@101622 live=true','rtmp://cp114434.live.edgefcs.net/live/ playpath=enlace_mbr_600@101618 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp114436.live.edgefcs.net/live/ playpath=enlacejuvenil_800@102106 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp129063.live.edgefcs.net/live/ playpath=nejat_mbr_600@101623 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp253352.live.edgefcs.net/live/ playpath=alhorreya_500@142129 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp129065.live.edgefcs.net/live/ playpath=tbnrussia-high@58776 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp129066.live.edgefcs.net/live/ playpath=soacrussia-high@58777 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp253350.live.edgefcs.net/live playpath=juce@142128 live=true','rtmp://cp253351.live.edgefcs.net/live/ playpath=tbnafrica@144071 pageURL=http://www.tbn.org/watch-us live=true','rtmp://cp210356.live.edgefcs.net/live playpath=tcilive_150@30064 pageURL=http://www.tbn.org/watch-us live=true'
title=re.compile('\"name\":\"(.+?)\"').findall(link)
thumbnail=re.compile('\"icon\":\"(.+?)\"').findall(link)
mylist=zip((match),(title),(thumbnail))
for url,name,thumbnail in mylist:
oc.add(VideoClipObject(
key = url,
rating_key = url,
title = name,
thumb = thumbnail,
items = [
MediaObject(
protocols = Protocol.RTMP,
video_codec = VideoCodec.H264,
audio_codec = AudioCodec.AAC,
parts = [PartObject(key = url)]
)
]
))
return oc
The plugin log tells me.
2013-12-13 14:31:35,025 (7f7ccf7fe700) : WARNING (objectkit:199) - The 'protocols' attribute is deprecated and should not be assigned (rtmp).
2013-12-13 14:31:35,031 (7f7ccf7fe700) : WARNING (objectkit:199) - Media part has no streams - attempting to synthesize
2013-12-13 14:31:35,042 (7f7ccf7fe700) : DEBUG (runtime:914) - Response: [200] MediaContainer, 12413 bytes
How do we play RTMP streams now? All i see in the documentation is the RTMPVideoURL() function but this uses webkit which makes the addon only compatible with certain platforms am i correct?
Also note these are live streams.