PartObject Help

How do i add rollover URL's to a plugin
Hey Forum.

Been struggling with this problem for days.

I've got a plug-in for a live stream that has two problems

For my livestreams i have access to two urls where one is primary, and one is backup streaming with 1000 KB
Ass well i have a, for the same media, a 500 KB stream with rollover option.

I Know how to add them individually, but I would like to have one menu option that just picks the most appropriate stream.

From what I have read in the documentation this should be done by adding a PartObject element to a MetaData element then added to a MediaObject that i the add to a MediaContainer.

Can anyone provide a working example ?

EDIT:
This is what i've been doing:

	drRTMP = "rtmp://xxx.xxx.xxx/live"<br />
	dir = MediaContainer(title1="xxxx - Live TV", title2="Live TV")	<br />
	po1 = PartObject(key = RTMPVideoItem("rtmp://xxx.xxx.xxx/live", clip="livedr01astream3", width = 830, height = 467, live=True, title = "xxx", summary = "", thump=R(ICON_DR1), art=R(ART)))<br />
	media = MediaObject(<br />
					protocols = "RTMP",<br />
					bitrate = 1000,<br />
					video_codec = "MP4",<br />
					audio_channels = 2,<br />
					container = "MP4",<br />
					)<br />
	media.add(po1)<br />
	video = VideoClipObject(title = "test")<br />
	video.add(media)<br />
	dir.Append(video)



HuXDK


Looks like i solved the problem, but now, all i get, whet i select a livestream is a list, all named "unknown" of all the partobjects i have added.

So... is it possible fo plex client to taste the most aproproate stream and also rename the items ?


	drRTMP = "rtmp://rtmpserver.xxx.xxx"<br />
	dir = ObjectContainer(title1="title - Live TV", title2="Live TV")	<br />
	po1 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint1a", live=True, height=467, width=830))<br />
	po2 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint1b", live=True, height=467, width=830))<br />
	po3 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint2a", live=True, height=467, width=830))<br />
	po4 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint2b", live=True, height=467, width=830))<br />
	po5 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint3a", live=True, height=467, width=830))<br />
	po6 = PartObject(key = RTMPVideoURL(drRTMP, clip = "mountpoint3b", live=True, height=467, width=830))<br />
	medObj1 = MediaObject(<br />
						protocols = Protocol.RTMP,<br />
						bitrate = 1000,<br />
						video_codec = VideoCodec.H264,<br />
						container = Container.MP4<br />
						)<br />
	medObj2 = MediaObject(protocols = Protocol.RTMP,<br />
						bitrate = 1000)<br />
	medObj3 = MediaObject(protocols = Protocol.RTMP,<br />
						bitrate=500)<br />
	medObj4 = MediaObject(protocols = Protocol.RTMP,<br />
						bitrate = 500)<br />
	medObj5 = MediaObject(protocols = Protocol.RTMP,<br />
						bitrate = 250)<br />
	medObj6 = MediaObject(protocols = Protocol.RTMP,<br />
						bitrate = 250)<br />
	mo = MovieObject(url = RTMPVideoURL(drRTMP, clip="mountpointAsInFoirtsPartObject", live=True, height=467, width=830),<br />
					source_title="title",<br />
					title = "title",<br />
					summary=getTVLiveMetadata("challenID"),<br />
					thumb = R(ICON_DR1),<br />
					art = R(ART)<br />
					)<br />
	medObj1.add(po1)<br />
	medObj2.add(po2)<br />
	medObj3.add(po3)<br />
	medObj4.add(po4)<br />
	medObj5.add(po5)<br />
	medObj6.add(po6)<br />
	mo.add(medObj1)<br />
	mo.add(medObj2)<br />
	mo.add(medObj3)<br />
	mo.add(medObj4)<br />
	mo.add(medObj5)<br />
	mo.add(medObj6)<br />
	dir.add(mo)

GREAT !!!



Just letting people know that th eproblem has bees solved.

If you have the same problem have at look at our DR NU plugin code on github (https://github.com/maxandersen/DRNU.bundle)



/HuX

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