FAQ  •  Register  •  Login

Trying simple plugin

<<

dfreadhoff

Serviio newbie

Posts: 12

Joined: Tue Mar 29, 2011 8:46 pm

Post Sat Dec 03, 2011 9:17 pm

Trying simple plugin

I want to watch some content from the daily show and tried the following simple plugin. I don't see any items listed on my TV. am I missing something? Thanks for any help.

Dylan


import org.serviio.library.metadata.*
import org.serviio.library.online.*

/**
* Comedy Central plugin.
*
*
*
* @author Dylan Freadhoff
*
*/
class ComedyCentralExctractor extends FeedItemUrlExtractor {

String getExtractorName() {
return getClass().getName()
}

boolean extractorMatches(URL feedUrl) {
return feedUrl == 'http://www.comedycentral.com/rss/tdsvideos.jhtml'
}

ContentURLContainer extractUrl(Map links, PreferredQuality requestedQuality) {
def contentUrl = 'http://media.mtvnservices.com/mgid:cms:episode:thedailyshow.com:403447'
return new ContentURLContainer(contentUrl: contentUrl)
}

}
<<

dfreadhoff

Serviio newbie

Posts: 12

Joined: Tue Mar 29, 2011 8:46 pm

Post Sun Dec 04, 2011 2:30 am

Re: Trying simple plugin

I turned on DEBUG and this is the error I get. Anyone know what this means?

2011-12-03 19:57:09,174 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 4)
2011-12-03 19:57:09,175 DEBUG [OnlineLibraryManager] Feed http://www.comedycentral.com/rss/tdsvideos.jhtml not in cache yet, loading it
2011-12-03 19:57:09,175 DEBUG [FeedParser] Parsing feed 'http://www.comedycentral.com/rss/tdsvideos.jhtml'
2011-12-03 19:57:10,792 DEBUG [FeedParser] Found matching url extractor (ComedyCentral) for feed http://www.comedycentral.com/rss/tdsvideos.jhtml
2011-12-03 19:57:10,792 DEBUG [FeedItemUrlExtractor] ComedyCentral: Starting extraction of url for item: Recap - Week of 11/28/11
2011-12-03 19:57:10,842 DEBUG [FeedParser] Unexpected error during url extractor plugin invocation (ComedyCentral): index is out of range 0..-1 (index = 0)
2011-12-03 19:57:10,843 DEBUG [FeedParser] Cannot add feed entry of feed Daily Show Videos because of invalid metadata. Message: Unknown feed entry URL.
2011-12-03 19:57:10,843 DEBUG [FeedItemUrlExtractor] ComedyCentral: Starting extraction of url for item: Indecision 2012 - Mittstorm
2011-12-03 19:57:10,843 DEBUG [FeedParser] Unexpected error during url extractor plugin invocation (ComedyCentral): index is out of range 0..-1 (index = 0)
2011-12-03 19:57:10,843 DEBUG [FeedParser] Cannot add feed entry of feed Daily Show Videos because of invalid metadata. Message: Unknown feed entry URL.
2011-12-03 19:57:10,843 DEBUG [FeedItemUrlExtractor] ComedyCentral: Starting extraction of url for item: 12/1/11 in :60 Seconds
2011-12-03 19:57:10,843 DEBUG [FeedParser] Unexpected error during url extractor plugin invocation (ComedyCentral): index is out of range 0..-1 (index = 0)
2011-12-03 19:57:10,843 DEBUG [FeedParser] Cannot add feed entry of feed Daily Show Videos because of invalid metadata. Message: Unknown feed entry URL.
2011-12-03 19:57:10,843 DEBUG [FeedItemUrlExtractor] ComedyCentral: Starting extraction of url for item: America's Next TARP Model
2011-12-03 19:57:10,843 DEBUG [FeedParser] Unexpected error during url extractor plugin invocation (ComedyCentral): index is out of range 0..-1 (index = 0)
2011-12-03 19:57:10,843 DEBUG [FeedParser] Cannot add feed entry of feed Daily Show Videos because of invalid metadata. Message: Unknown feed entry URL.
2011-12-03 19:57:10,844 DEBUG [FeedItemUrlExtractor] ComedyCentral: Starting extraction of url for item: Bob Costas
2011-12-03 19:57:10,844 DEBUG [FeedParser] Unexpected error during url extractor plugin invocation (ComedyCentral): index is out of range 0..-1 (index = 0)
2011-12-03 19:57:10,844 DEBUG [FeedParser] Cannot add feed entry of feed Daily Show Videos because of invalid metadata. Message: Unknown feed entry URL.
2011-12-03 19:57:10,844 DEBUG [FeedCacheDecorator] Stored entry in the cache (online_feeds), returning it
2011-12-03 19:57:10,844 DEBUG [OnlineLibraryManager] Feed http://www.comedycentral.com/rss/tdsvideos.jhtml will expire in the cache on Sat Dec 03 20:57:10 CST 2011
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Dec 04, 2011 4:34 am

Re: Trying simple plugin

Read the guide in sticky.

Your ContentUrl must be a playable file, which your groovy needs to find within the link being passed to it.

Look at some of the other groovys and add the test code at the bottom to yours and test until it returns a valid ContentUrl
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sun Dec 04, 2011 9:05 am

Re: Trying simple plugin

With WireShark I found these packets, it seems you have to provide a particular Http Get message.
You'll receive multiple rtmpe url.
Look at Youtube.groovy plugin, that should help you.

  Code:
GET /global/feeds/entertainment/media/mediaGenEntertainment.jhtml?uri=mgid%3Acms%3Aitem%3Acomedycentral.com%3A403512&showTicker=true HTTP/1.1
Host: www.comedycentral.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: app-instance=comedycentral-com-1-comedy-jboss-041; JSESSIONID=57C3A588B9C0AEF89464F7A5CF06B072.comedy-jboss-041-811-mtvi-com-8851; MTV_ID=172.16.3.9.1322987997062
DNT: 1
Connection: keep-alive

HTTP/1.1 200 OK
Server: Apache/2.0.63 (Unix) mod_jk/1.2.27
Content-Length: 2353
Content-Type: text/xml
MTVi-Edge-control: no-cache-downstream
X-Served-By: 172.16.6.92
Expires: Sun, 04 Dec 2011 08:49:30 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Sun, 04 Dec 2011 08:49:30 GMT
Connection: keep-alive


<package version="1.4">
<video>.
<item startTime="0">
<rendition cdn="level3" duration="248" width="384" height="216" type="video/mp4" bitrate="450">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_384x216_450.mp4</src>
</rendition>
<rendition cdn="level3" duration="248" width="512" height="288" type="video/mp4" bitrate="625">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_512x288_625.mp4</src>
</rendition>
<rendition cdn="level3" duration="248" width="512" height="288" type="video/mp4" bitrate="825">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_512x288_825.mp4</src>
</rendition>
<rendition cdn="level3" duration="248" width="640" height="360" type="video/mp4" bitrate="950">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_640x360_950.mp4</src>
</rendition>
<rendition cdn="level3" duration="248" width="640" height="360" type="video/mp4" bitrate="1300">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_640x360_1300.mp4</src>
</rendition>
<rendition cdn="level3" duration="248" width="768" height="432" type="video/mp4" bitrate="1720">
<src>rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_768x432_1720.mp4</src>
</rendition>
<beacons>
<beacon url="http://imx.comedycentral.com/sitewide/droplets/view_gen.jhtml?itemUrl=cms_item%3A%2F%2Fwww.comedycentral.com%2F403512&amp;tagParams=tag_action%3Dviewed%26" startTime="0" />
</beacons>
<action onEvent="viewed">.
<makeRequest url="http://t.flux.com/tracking.gif?CMU=4CFAFFFF009922C10002FFFFFA4C&amp;CUR=mgid:cms:item:comedycentral.com:403512&amp;WN=MTVNVideoPlayer&amp;ftg=1"/>
</action>.
</item>
<item placement="overlay" format="swf" xPercent="0" yPercent="0" startTime="0" duration="15" width="10000" height="23">
<src>http://www.comedycentral.com/comedycentral/video/assets/ticker.swf?d=http://www.comedycentral.com/comedycentral/video/data/ticker.jhtml%3FshowId%3D934</src>
<clickTag></clickTag>
</item>
</video>
</package>

GET /comedycentral/video/assets/ticker.swf?d=http://www.comedycentral.com/comedycentral/video/data/ticker.jhtml%3FshowId%3D934 HTTP/1.1
Host: www.comedycentral.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: app-instance=comedycentral-com-1-comedy-jboss-041; JSESSIONID=57C3A588B9C0AEF89464F7A5CF06B072.comedy-jboss-041-811-mtvi-com-8851; MTV_ID=172.16.3.9.1322987997062
DNT: 1
Connection: keep-alive

HTTP/1.1 200 OK
Server: Apache/2.0.63 (Unix) mod_jk/1.2.27
Last-Modified: Thu, 19 Mar 2009 17:37:45 GMT
ETag: "21c1e6a-1a24b-4657c4207cc40"
Accept-Ranges: bytes
Content-Length: 107083
X-Served-By: (null)
Content-Type: application/x-shockwave-flash
Cache-Control: max-age=1085
Expires: Sun, 04 Dec 2011 09:07:56 GMT
Date: Sun, 04 Dec 2011 08:49:51 GMT
Connection: keep-alive
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

dfreadhoff

Serviio newbie

Posts: 12

Joined: Tue Mar 29, 2011 8:46 pm

Post Tue Dec 06, 2011 10:20 pm

Re: Trying simple plugin

So I tried returning:

rtmpe://viacomccstrmfs.fplive.net/viaco ... 2_1720.mp4

as the content URL and I received the following error. Has anyone been able to make rtmp feeds work?

2011-12-06 15:32:32,041 WARN [FeedUpdaterThread] Failed to retrieve feed item information for rtmpe://viacomccstrmfs.fplive.net/viaco ... 2_1720.mp4. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.
at org.serviio.library.online.metadata.FeedUpdaterThread.updateLazyLoadedProperties(FeedUpdaterThread.java:188)
at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:93)
Caused by: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.
at org.serviio.library.metadata.FFmpegMetadataRetriever.validateCodecsFound(FFmpegMetadataRetriever.java:318)
at org.serviio.library.metadata.FFmpegMetadataRetriever.retrieveMetadata(FFmpegMetadataRetriever.java:68)
at org.serviio.library.online.metadata.FeedUpdaterThread.updateLazyLoadedProperties(FeedUpdaterThread.java:169)
... 1 more
2011-12-06 15:32:32,042 DEBUG [FeedUpdaterThread] Retrieving information about the video stream
2011-12-06 15:32:32,042 DEBUG [FFMPEGWrapper] Invoking FFMPEG to retrieve media information for file: rtmpe://viacomccstrmfs.fplive.net/viaco ... 2_1720.mp4
2011-12-06 15:32:32,042 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i rtmpe://viacomccstrmfs.fplive.net/viaco ... 2_1720.mp4
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 06, 2011 10:29 pm

Re: Trying simple plugin

if you run

  Code:
ffmpeg -i "rtmpe://viacomccstrmfs.fplive.net/viacomccstrm/gsp.comedystor/com/dailyshow/TDS/season_17/episode_028/ds_weekly_112811_768x432_1720.mp4"


you can see it doesn't return any metadata, because libRTMP doesn't know the encoding method. Nothing we can do now. Or maybe you have some attributes missing, like swfurl. Did you try the rtmpserv mehod linked in the plugins dev guide?
<<

wae3iejohhohZae5

Streaming enthusiast

Posts: 27

Joined: Sun Apr 29, 2012 9:10 pm

Post Thu May 03, 2012 12:01 pm

Re: Trying simple plugin

I would like to know where the "index is out of range 0..-1 (index = 0)" error is coming from as I'm getting the same error.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu May 03, 2012 12:24 pm

Re: Trying simple plugin

might be accessing results of unmatched reguar expesion, or any other array or collection really
<<

wae3iejohhohZae5

Streaming enthusiast

Posts: 27

Joined: Sun Apr 29, 2012 9:10 pm

Post Fri May 04, 2012 12:58 pm

Re: Trying simple plugin

zip wrote:might be accessing results of unmatched reguar expesion, or any other array or collection really

Thank you. It seems to be caused by the thumbnail URL (or rather the array access after the thumbnail regex) of the LiveFeeds Plugin which I was not specifying. The range "0..-1" is still confusing me, though. ;)

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 12 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.