Hi All
Im very new when it come to Plex and Python in general but I have a lot of other coding experience, I recently decided to give creating a Plex channel a try. Im working on a channel for ABC iView, so far its going very well I have been able to parse all the media info and display it however when it comes to actually playing the video im a bit stumped...
I have been googling and searching these forums for a while now with not luck...
Here is the code I have been used to test playback..
oc.add(VideoClipObject(key = RTMPVideoURL(url = 'rtmp://cp53909.edgefcs.net/ondemand?auth=daEcrdpc8acdcbrdAa8avdpa5bGd3c8dQbB-brz_kl-8-qnq_rEtqH&aifp=v001', clip = 'mp4:flash/playback/_definst_/kids/bobbuilder_13_12', swfurl = 'http://www.abc.net.au/iview/images/iview.jpg' swfvfy = True), rating_key = '123',title = 'TEST'))
Im not sure what the rating_key is but without it I get an error in the logs...
AttributeException: If no URL is provided, the key and rating_key attributes must be set.
now the videos seems to start playing but its like it can't connect or something as I get black screen with the following message....
201: unable to load stream or clip file
If I change the url to something that i know is broken (eg rtmp://some.fake.address ) it doesnt even get that far so its like its connecting to the server ok but not finding the correct video.
After even more digging around I found a plugin that already worked! .... but it was for XBMC so after doing some more digging I found that the XMBC plugin used the following code to display the video....
rtmp_url = "%s?auth=%s playpath=%s swfurl=%s swfvfy=true" % (auth['rtmp_url'], auth['token'], playpath, config.swf_url)
xbmc.Player().play(rtmp_url, listitem)
When checking the logs I found its using the following url...
rtmp://cp53909.edgefcs.net/ondemand?auth=daEcrdpc8acdcbrdAa8avdpa5bGd3c8dQbB-brz_kl-8-qnq_rEtqH&aifp=v001 playpath=mp4:flash/playback/_definst_/kids/bobbuilder_13_12 swfurl=http://www.abc.net.au/iview/images/iview.jpg swfvfy=true
So i know the URL is valid and works its just that either im passing it to plex in the wrong format (which i suspect is the case) or Plex handles RTMP feed differently