depreciated protocol attribute?

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.

I'll start with the bad news first - live content is not currently supported by the PMS transcoder. The only client that can currently play these streams is Plex Home Theater.

The (badly named) "protocols" attribute controlled something completely different. It was used to selectively provide different media items to different clients based on capabilities. This turned out to not work very well in practice, and we've since moved to returning all items & letting the client decide what to play.

The attribute you're looking for is "protocol", however you really should see if RTMPVideoURL works for you. This sets the relevant attributes and builds an RTMP URL for you. WebKit RTMP support has been deprecated since it no longer works with most sites. 

Thanks for the info. Hopefully live streams will be supported in the future. For now I will just leave it out. Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.