Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
servio_plugins [2011/12/20 08:24] illico [Development] |
servio_plugins [2014/06/17 03:28] butoijoh |
* read the [[http://forum.serviio.org/viewforum.php?f=22|plugin development forum]] and have a go at developing your own plugin. | * read the [[http://forum.serviio.org/viewforum.php?f=22|plugin development forum]] and have a go at developing your own plugin. |
| |
Currently the plugins mechanism only works with online sources that expose their content as RSS / Atom feeds. Note some feeds that link directly to media require no plugin at all! | From version 0.6.1 Serviio supports plugins for **RSS/Atom feeds** and other **Web Resources**. Note some feeds that link directly to media require no plugin at all! |
| |
Plugins help Serviio locate the exact location of the media streams as the feed often links to html pages rather than the stream. | Plugins help Serviio locate the exact location of the media streams as the feed often links to html pages rather than the stream. |
| |
====== Installation ====== | ====== Installation ====== |
1. Download the plugin | - Download the plugin |
2. Copy the plugin to the plugins folder | - Copy the plugin to the plugins folder (eg to /usr/bin/serviio-0.6.2/plugins on linux) |
3. Configure Serviio with at least one url to an RSS feed. This is done using the serviio console. | - Configure Serviio with at least one url to an RSS feed. This is done using the serviio console using the Online Sources Tab which is found on the Library tab. |
| |
After up to 5 mins the streams should be available to view. On the DLNA client look for a new folder called "Online Sources" | After up to 5 mins the streams should be available to view. On the DLNA client look for a new folder called "Online Sources" |
| |
Online content is usually served via **http** or **rtmp** protocol. The former is very easy to consume. The latter is mostly used by Adobe Flash servers and used in many online video services and FFmpeg compiled with [[http://rtmpdump.mplayerhq.hu/|libRTMP]] is necessary for playback. Some rtmp streams require swf verification (not implementing that usually means the stream is cut after a period of time, like 1 minute). | Online content is usually served via **http** or **rtmp** protocol. The former is very easy to consume. The latter is mostly used by Adobe Flash servers and used in many online video services and FFmpeg compiled with [[http://rtmpdump.mplayerhq.hu/|libRTMP]] is necessary for playback. Some rtmp streams require swf verification (not implementing that usually means the stream is cut after a period of time, like 1 minute). |
| [[http://www.trimasjaya.com/pintu-dan-jendela/index.html|Pintu dan jendela]], [[http://www.tokobungasabana.com|Toko Bunga]], [[http://vamostech.com/gps-tracking|Gps tracking]] |
| |
Feed item URLs can expire with time, if that is the case you will have to provide the expiry date so that Serviio can re-run the URL extraction when that happens and get a valid URL when necessary. | Feed item URLs can expire with time, if that is the case you will have to provide the expiry date so that Serviio can re-run the URL extraction when that happens and get a valid URL when necessary. You can also define whether the content is a live stream or static content. |
| |
<note tip> | <note tip> |
groovy -cp "C:\Program Files (x86)\Serviio\lib\serviio.jar;C:\Program Files (x86)\Serviio\lib\slf4j-api.jar;C:\Program Files (x86)\Serviio\lib\slf4j-log4j12.jar;C:\Program Files (x86)\Serviio\lib\log4j.jar" "C:\Program Files (x86)\Serviio\plugins\CNN.groovy" | groovy -cp "C:\Program Files (x86)\Serviio\lib\serviio.jar;C:\Program Files (x86)\Serviio\lib\slf4j-api.jar;C:\Program Files (x86)\Serviio\lib\slf4j-log4j12.jar;C:\Program Files (x86)\Serviio\lib\log4j.jar" "C:\Program Files (x86)\Serviio\plugins\CNN.groovy" |
| |
I suggest to create a MS-DOS batch file (ex: "PluginsTest.bat" ) with following content, then drag&drop the groovy over the batch file (%1 variable will be replaced by groovy file path): | I suggest to create a MS-DOS batch file (ex: "{{ :pluginstest.zip | PluginsTest.bat}}" ) with following content, then drag&drop the groovy over the batch file (%1 variable will be replaced by groovy file path): |
<code>@echo off | <code> |
| @echo off |
@ set ServiioPath="C:\Program Files (x86)\Serviio" | @ set ServiioPath="C:\Program Files (x86)\Serviio" |
@echo "Testing %1 plugin" | @echo "Testing %1 plugin" |
%GROOVY_HOME%\bin\groovy.exe -cp "%ServiioPath%\lib\serviio.jar;%ServiioPath%\lib\slf4j-api.jar;%ServiioPath%\lib\slf4j-log4j12.jar;%ServiioPath%\lib\log4j.jar;%ServiioPath%\lib\org.restlet.jar" "%1" | %GROOVY_HOME%\bin\groovy.exe -cp "%ServiioPath%\lib\serviio.jar;%ServiioPath%\lib\slf4j-api.jar;%ServiioPath%\lib\slf4j-log4j12.jar;%ServiioPath%\lib\log4j.jar;%ServiioPath%\lib\org.restlet.jar" "%1" |
@pause</code> | @pause |
| </code> |
| |
| |
__On Linux:__ | __On Linux:__ |
groovy -cp lib/serviio.jar:lib/slf4j-api.jar:lib/slf4j-log4j12.jar:lib/log4j.jar S4c.groovy | From your serviio install folder (eg /usr/bin/serviio-0.6.2) and with a s4c.groovy file installed in plugins: |
| |
| groovy -cp lib/serviio.jar:lib/slf4j-api.jar:lib/slf4j-log4j12.jar:lib/log4j.jar:lib/org.restlet.jar plugins/S4c.groovy |
| |
And of course you can use the [[http://forum.serviio.org/viewforum.php?f=22|Plugin development forum]] if you get stuck | And of course you can use the [[http://forum.serviio.org/viewforum.php?f=22|Plugin development forum]] if you get stuck |