# Slightly complicated streaming

**URL:** <https://forums.plex.tv/t/slightly-complicated-streaming/9660>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [June 16, 2011, 5:02pm UTC](https://forums.plex.tv/t/slightly-complicated-streaming/9660 "2011-06-16T17:02:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![himym](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@himym](https://forums.plex.tv/u/himym)\
**Post date:** [June 16, 2011, 5:02pm UTC](https://forums.plex.tv/t/slightly-complicated-streaming/9660/1 "2011-06-16T17:02:37Z")

</div>

Hi,  
  
  
  
I have some slightly complicated streaming requirements and I was wondering if there was any way to improve the user experience.  
  
  
  
I have a set of urls and titles. Each url represents one video file but it is slightly time consuming to convert the url I have to the final url from which I can download the videos. When I have the video url I have to wait a certain amount of time before I can download it (currently 45 seconds). Currently this is implemented as below but there are a number of drawbacks.

1. For some reason get\_stream is being executed twice. This doubles the amount of time waited.  
2. Sometimes the process for converting the url to a video url requires entering a captcha. Is this possible with Plex?  
3. It would be nice to give the user some feedback/distraction while they wait for 45 (or as it is now 90) seconds. Is that possible with Plex?  
  
  
  
Number 1 is pressing issue for now but anything that could help the overall experience would be helpful too.  
  
Thanks for your time.  
  
  

```auto

<br />
<br />
mc = MediaContainer( viewGroup = "/video/blah" )<br />
mc.Append( Function(<br />
	              VideoItem(<br />
			             get_stream,<br />
				     title = title<br />
			        ),<br />
			title = title,<br />
			url = url<br />
		)<br />
	)<br />
<br />
def get_stream( sender , title , url ):<br />
<br />
	Log( "Title = " + title + "Url = " + url )<br />
<br />
	# work out the url to stream<br />
<br />
	time.sleep(45)<br />
	return Redirect(stream_url)<br />

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 9:10pm UTC](https://forums.plex.tv/t/slightly-complicated-streaming/9660/2 "2019-12-20T21:10:13Z")

</div>

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