Page 1 of 3

USTREAM.tv

PostPosted: Sun Jul 29, 2012 1:06 am
by xs2inattar
USTREAM.TV plugin for Serviio.

Thanks to piscui - http://piscui.webear.net/ustream.php for providing the logic to extract the stream information.

Add the links as video webresource in serviio after installing the plugin

v1
Sample links:
  Code:
http://www.ustream.tv/nasahdtv
http://www.ustream.tv/opensea



v2
Page urls and categories are also supported. Only the channels with the LIVE badge on the page are loaded.
Sample links:
  Code:
http://www.ustream.tv/nasahdtv
http://www.ustream.tv/opensea
http://www.ustream.tv/discovery/live/sports?order=most-views-all
http://www.ustream.tv/discovery/live/sports?order=most-views-all&page=2
http://www.ustream.tv/discovery/live/entertainment



v3
Fix for /new#./ and /new# links for the new USTREAM when using IE as reported here: viewtopic.php?f=20&t=6877#p49895
  Code:
http://www.ustream.tv/new#./nasahdtv
http://www.ustream.tv/new#./creativelive
http://www.ustream.tv/new#channel/live-iss-stream
http://www.ustream.tv/nasahdtv
http://www.ustream.tv/opensea
http://www.ustream.tv/discovery/live/sports?order=most-views-all
http://www.ustream.tv/discovery/live/sports?order=most-views-all&page=2
http://www.ustream.tv/discovery/live/entertainment



v4
August 25, 2012
USTREAM made some changes to how their stream work. Updated the plugin to reflect those changes.

v5
August 27, 2012
Update provided by jhb50
Added support for new categories.
The following category format is now also supported.
  Code:
http://www.ustream.tv/new#new/spotlight/underthesea

Re: USTREAM.tv

PostPosted: Sun Aug 05, 2012 2:02 pm
by prmadmax
Hi,

Great plugin and I really appreciate it.

However, I'm still not able to get either http://www.ustream.tv/nasahdtv or http://www.ustream.tv/opensea to work

I'm using a Sony KDL-22EX320, neither of the above appear in the list but they both have the live badge in the top left. I added as a web resource as stated and nothing.

Re: USTREAM.tv

PostPosted: Sun Aug 05, 2012 3:20 pm
by CigDangle
prmadmax wrote:...I'm still not able to get either http://www.ustream.tv/nasahdtv or http://www.ustream.tv/opensea to work


What Source URL are you using?
rtmp://ustreamlivefs.fplive.net/ustream3live-live/ playpath=stream_live_1_1_6540154 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
and
rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9600798 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
...should work for the two channels you listed.

Re: USTREAM.tv

PostPosted: Sun Aug 05, 2012 5:51 pm
by jhb50
The new ustream at http://www.ustream.tv supports live streams but displays and uses links of the form

  Code:
http://www.ustream.tv/new#./usarugby
or
http://www.ustream.tv/new#channel/drag-story


It also has new category support using links of the form

  Code:
http://www.ustream.tv/new#new/explore/entertainment
and
http://www.ustream.tv/new#new/spotlight/underthesea


Can you update the groovy to support these as well?

Note also that your V2 groovy still says V1 in the header comments.

Re: USTREAM.tv

PostPosted: Mon Aug 06, 2012 1:57 pm
by xs2inattar
jhb50 wrote:The new ustream at http://www.ustream.tv ...


For the direct channel links:
  Code:
http://www.ustream.tv/new#./usarugby and http://www.ustream.tv/new#channel/drag-story

I am still unable to get the links that you have here. When I double click on a video in the new USTREAM, I get the link of the following form in my browser window:
  Code:
http://www.ustream.tv/usarugby and http://www.ustream.tv/channel/drag-story
respectively. I am not sure why you are getting different links tham myself.

For the new page links, http://www.ustream.tv/new/explore/entertainment and http://www.ustream.tv/new/spotlight/underthesea, I will update it in a day or two.

Re: USTREAM.tv

PostPosted: Mon Aug 06, 2012 2:46 pm
by jhb50
Its kind of weird

www.ustream.tv opens at category explore/all and the browser bar changes to http://www.ustream.tv/new and a video plays in the little window.

If I double click the first video "NASA TV ..." it opens and plays it in the medium size window an the browser bar displays http://www.ustream.tv/new#./nasahdtv

If I double click the second video "Creative ..." it opens and plays it in the medium size window an the browser bar displays http://www.ustream.tv/new#./creativelive

If I double click the third video "Live from the ISS" it opens and plays it in the medium size window an the browser bar displays http://www.ustream.tv/new#channel/live-iss-stream

This is with W7-64 IE8.

When I repeat with firefox I see that the /new#. and /new# are removed from the browser bar links, but I would like to be able to copy these IE links directly to Serviio and have the groovy remove the /new#, and /new# so the links become "normal".

I've moded my copy of your groovy to do this and it works fine, but you may want to update yours to do the same.

Re: USTREAM.tv

PostPosted: Mon Aug 06, 2012 4:25 pm
by xs2inattar
jhb50 wrote:Its kind of weird

...

This is with W7-64 IE8.

When I repeat with firefox I see that the /new#. and /new# are removed from the browser bar links, but I would like to be able to copy these IE links directly to Serviio and have the groovy remove the /new#, and /new# so the links become "normal".

I've moded my copy of your groovy to do this and it works fine, but you may want to update yours to do the same.



Updated.

Re: USTREAM.tv

PostPosted: Fri Aug 10, 2012 1:15 pm
by jhb50
For the new page links, http://www.ustream.tv/new/explore/entertainment and http://www.ustream.tv/new/spotlight/underthesea, I will update it in a day or two.


have the groovy remove the /new#, and /new# so the links become "normal".

Updated.


I don't know if the update included the new categories but " http://www.ustream.tv/new/spotlight/underthesea" does not work yet.

Re: USTREAM.tv

PostPosted: Fri Aug 10, 2012 1:35 pm
by prmadmax
CigDangle wrote:
prmadmax wrote:...I'm still not able to get either http://www.ustream.tv/nasahdtv or http://www.ustream.tv/opensea to work


What Source URL are you using?
rtmp://ustreamlivefs.fplive.net/ustream3live-live/ playpath=stream_live_1_1_6540154 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
and
rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9600798 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
...should work for the two channels you listed.


When I generate them via the php script they sometimes work (on and off).
My TV connection is wifi but I cant see that affecting anything since everything else through serviio works fine. The problem with those streams is nasa restarts them a lot which causes the address to change slightly every time which is why this plugin would be great for me :)

Re: USTREAM.tv

PostPosted: Fri Aug 10, 2012 2:05 pm
by jhb50
The problem with those streams is nasa restarts them a lot which causes the address to change slightly every time which is why this plugin would be great for me

Just use the plugin then. It works fine for those links.

Re: USTREAM.tv

PostPosted: Fri Aug 17, 2012 6:47 pm
by jhb50
For the new page links, http://www.ustream.tv/new/explore/entertainment and http://www.ustream.tv/new/spotlight/underthesea, I will update it in a day or two.


@xs2inattar
Any progress on this? http://www.ustream.tv/new#new/spotlight/underthesea
is not returning results for me.

Also neither
http://www.ustream.tv/new#channel/madsci9001
or
http://www.ustream.tv/hannel/madsci9001
work.

All the above return video not found in the log.
does not work

Re: USTREAM.tv

PostPosted: Fri Aug 24, 2012 6:57 pm
by xs2inattar

The stream urls extracted using the new url: http://www.ustream.tv/new#channel/madsci9001 is completely different from one extracted from the old url: http://www.ustream.tv/channel/madsci9001.
The one extracted using the new url without removing the /new# seems to extract the correct url. Can you please test with some urls after removing the following two lines from the code.

ustreamURL = ustreamURL.replaceFirst("/new#\\./", "/")
ustreamURL = ustreamURL.replaceFirst("/new#", "/")



jhb50 wrote:Any progress on this? http://www.ustream.tv/new#new/spotlight/underthesea
is not returning results for me.

Also after removing the above two lines from the code, this link: http://www.ustream.tv/new#new/spotlight/underthesea works fine. Again if you could run some test with other urls as well.


Please let me know, if all the urls that you usually use work fine afvter the above changes, and I will update the plugin here.

Re: USTREAM.tv

PostPosted: Fri Aug 24, 2012 7:48 pm
by jhb50
Removed those 2 lines from your groovy.

Tried
http://www.ustream.tv/channel/live-iss-stream
and
http://www.ustream.tv/new#new/spotlight/underthesea
and
http://www.ustream.tv/new#channel/madsci9001

All 3 fail as shown by the following log entries.

  Code:
2012-08-24 15:59:28,471 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/channel/live-iss-stream not in cache yet, loading it
2012-08-24 15:59:28,472 DEBUG [WebResourceParser] Parsing web resource 'http://www.ustream.tv/channel/live-iss-stream'
2012-08-24 15:59:28,473 DEBUG [WebResourceParser] Found matching url extractor (ustream.tv) for resource http://www.ustream.tv/channel/live-iss-stream
2012-08-24 15:59:28,473 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting parsing resource: http://www.ustream.tv/channel/live-iss-stream
2012-08-24 15:59:28,939 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting extraction of url for item: Live from the International Space Station
2012-08-24 15:59:29,526 DEBUG [FeedItemUrlExtractor] ustream.tv: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1, thumbnailUrl=http://static-cdn1.ustream.tv/i/channel/picture/9/4/0/8/9408562/9408562_iss_hr_1330361780,66x66,r:1.jpg, expiresImmediately=true, cacheKey=USTREAM_9408562, live=true, ]
2012-08-24 15:59:29,526 DEBUG [WebResourceParser] Added resource item 1: 'Live from the International Space Station' (rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1)
2012-08-24 15:59:29,526 DEBUG [OnlineContentCacheDecorator] Stored online content 'http://www.ustream.tv/channel/live-iss-stream' in the cache (online_feeds), returning it
2012-08-24 15:59:29,526 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/channel/live-iss-stream will expire in the cache on Sat Aug 25 15:59:29 EDT 2012
2012-08-24 15:59:29,527 DEBUG [FeedUpdaterThread] Retrieving information about the video stream 'Live from the International Space Station'
2012-08-24 15:59:29,527 DEBUG [FFMPEGWrapper] Invoking FFMPEG to retrieve media information for file: rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
2012-08-24 15:59:29,527 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1
2012-08-24 16:00:40,731 WARN  [FeedUpdaterThread] Failed to retrieve online item information for rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.

2012-08-24 16:31:45,538 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/new#new/spotlight/underthesea not in cache yet, loading it
2012-08-24 16:31:45,539 DEBUG [WebResourceParser] Parsing web resource 'http://www.ustream.tv/new#new/spotlight/underthesea'
2012-08-24 16:31:45,539 DEBUG [WebResourceParser] Found matching url extractor (ustream.tv) for resource http://www.ustream.tv/new#new/spotlight/underthesea
2012-08-24 16:31:45,539 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting parsing resource: http://www.ustream.tv/new#new/spotlight/underthesea
2012-08-24 16:31:49,342 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting extraction of url for item: USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows
2012-08-24 16:31:50,421 DEBUG [FeedItemUrlExtractor] ustream.tv: Finished extraction of url: no result
2012-08-24 16:31:50,421 WARN  [WebResourceParser] Plugin ustream.tv returned no value for resource item 'USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows'
2012-08-24 16:31:50,421 DEBUG [WebResourceParser] Skipping web resource item 'USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows' because it's not of type VIDEO
2012-08-24 16:31:50,421 DEBUG [OnlineContentCacheDecorator] Stored online content 'http://www.ustream.tv/new#new/spotlight/underthesea' in the cache (online_feeds), returning it
2012-08-24 16:31:50,421 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/new#new/spotlight/underthesea will expire in the cache on Sat Aug 25 16:31:50 EDT 2012

2012-08-24 16:31:50,424 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/new#channel/madsci9001 not in cache yet, loading it
2012-08-24 16:31:50,424 DEBUG [WebResourceParser] Parsing web resource 'http://www.ustream.tv/new#channel/madsci9001'
2012-08-24 16:31:50,425 DEBUG [WebResourceParser] Found matching url extractor (ustream.tv) for resource http://www.ustream.tv/new#channel/madsci9001
2012-08-24 16:31:50,425 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting parsing resource: http://www.ustream.tv/new#channel/madsci9001
2012-08-24 16:31:53,743 DEBUG [FeedItemUrlExtractor] ustream.tv: Starting extraction of url for item: USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows
2012-08-24 16:31:57,588 DEBUG [FeedItemUrlExtractor] ustream.tv: Finished extraction of url: no result
2012-08-24 16:31:57,588 WARN  [WebResourceParser] Plugin ustream.tv returned no value for resource item 'USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows'
2012-08-24 16:31:57,588 DEBUG [WebResourceParser] Skipping web resource item 'USTREAM - You're On - Broadcast Live Streaming Video, Watch Online Events, Chat Live, send a Tweet, follow on Facebook, MySpace, record your Live Shows' because it's not of type VIDEO
2012-08-24 16:31:57,588 DEBUG [OnlineContentCacheDecorator] Stored online content 'http://www.ustream.tv/new#channel/madsci9001' in the cache (online_feeds), returning it
2012-08-24 16:31:57,588 DEBUG [OnlineLibraryManager] Resource http://www.ustream.tv/new#channel/madsci9001 will expire in the cache on Sat Aug 25 16:31:57 EDT 2012


The ISS failure is due to the URL that was used
  Code:
rtmp://ustreamlivefs.fplive.net/ustream2live-live/ playpath=stream_live_1_1_9408562 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1


URL snooper gave me this link which works:
  Code:
rtmp://cp39920.live.edgefcs.net:1935/live/ustream-lax@11229 swfUrl=http://static-cdn1.ustream.tv/swf/live/viewer.rsl:96.swf swfVfy=1 live=1


I've played around with this today but just cannot figure out how to get these new links. They seem to change all over the place.

Re: USTREAM.tv

PostPosted: Sat Aug 25, 2012 2:26 pm
by xs2inattar
UPDATE
Version:4
August 25, 2012
USTREAM made some changes to how their streams work. Updated the plugin to reflect those changes.

Thanks to jhb50 for testing out the changes.

Re: USTREAM.tv

PostPosted: Mon Aug 27, 2012 10:37 pm
by xs2inattar
UPDATED
v5
August 27, 2012
Update provided by jhb50
Added support for new categories.
The following category format is now also supported.

  Code:
http://www.ustream.tv/new#new/spotlight/underthesea

Re: USTREAM.tv

PostPosted: Mon Aug 27, 2012 11:35 pm
by jhb50
Regarding Version 5 and the new categories support:

The new www.ustream.tv site now provides a menu of categories (home, spotlight and explore) and under each category there are a number of subcategories (eg:explore has news, pets & animals, entertainment, sports, music etc), which when selected may contain a menu of recorded and live streams.

The browser line will also show a URL of the form http://www.ustream.tv/new#new/category/subcategory or www.ustream.tv/new/category/subcategory depending on the browser; for example http://www.ustream.tv/new#new/spotlight/underthesea or (http://)www.ustream.tv/new/spotlight/underthesea

Entering either of these url forms as a video web resource, will produce an online menu of the live streams for that subcategory. We have not yet determined how to access the recorded content.

This version works fine for me but xs2inattar has received index errors when accessing these new categories. Please post if you encounter similar problems.

Re: USTREAM.tv

PostPosted: Mon Sep 03, 2012 2:06 pm
by peje1873
bit of a novice query here but I'm trying to use Serviio to grab the feed off the following UStream page:

http://www.ustream.tv/GTWorld

Unfortunately it is only online when the race is live so once a month or so which makes me troubleshooting the link a bit of a nightmare.

I have the latest ustream plugin. I am unsure of what I do next as it doesn't seem to fall into a category that I can find.

Do I enter a livestream of "http://www.ustream.tv/GTWorld"
or a web Resource of "http://www.ustream.tv/GTWorld"
or possibly both are wrong...

Any advice would be really appreciated.

Pete

Re: USTREAM.tv

PostPosted: Mon Sep 03, 2012 5:50 pm
by jhb50
I thought he made it pretty clear
Add the links as video webresource in serviio after installing the plugin

Re: USTREAM.tv

PostPosted: Mon Sep 03, 2012 6:17 pm
by peje1873
thanks for the quick reply. thanks for that info on which category it goes in.

my other question would be is my link "http://www.ustream.tv/GTWorld" the correct format? it seems quite different to the other formats like "http://www.ustream.tv/new#new/spotlight/underthesea" which include the category and sub-category parts.

If i simply insert my channel link as a resource will it be fine?

Thanks again jhb50,
Pete.

Re: USTREAM.tv

PostPosted: Mon Sep 03, 2012 6:26 pm
by jhb50
As it says:
Add the links as video webresource in serviio after installing the plugin

Sample links:

Code:
http://www.ustream.tv/nasahdtv
http://www.ustream.tv/opensea