FAQ  •  Register  •  Login

Refresh on Demand plugin for linux?

<<

xs2inattar

DLNA master

Posts: 143

Joined: Sun Jun 24, 2012 5:49 pm

Post Sun Jun 24, 2012 6:05 pm

Refresh on Demand plugin for linux?

I read through the refresh_on_demand wiki that allows refreshing of web resources from the client, but it seems like it is specifically for serviio windows installation.

Can anyone please let me know if it could be setup on linux installation of serviio.

Thanks.
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Jun 24, 2012 7:48 pm

Re: Refresh on Demand plugin for linux?

I know nothing about Linux, but I see no reason why equivalent prereqs as I described in the wiki could not be setup and made to work.
<<

xs2inattar

DLNA master

Posts: 143

Joined: Sun Jun 24, 2012 5:49 pm

Post Mon Jun 25, 2012 9:07 pm

Re: Refresh on Demand plugin for linux?

Finally, got it working.

For people who might need it, below are the details.

I am using serviio on synology, so i used the spk provided by http://pcloadletter.co.uk/2012/01/25/se ... o-package/ to install the package.

The above package uses a ffmpeg-wrapper.sh file to implement the ac3 codec floating/fixed point thing for arm processor.

It also has serviio-wrapper.sh in place which has the ffmpeg location already set up.

So the only thing, I did to get Refresh on Demand working, was make the following changes to the ffmpeg-wrapper.sh file in /volume1/@appstore/Serviio/bin.

After the following code line in ffmpeg-wrapper.sh

  Code:
if [ ${INPUT} = 1 ]; then



Add the following:


  Code:
    #if the url is of the format 'rtsp://a1709.l1856953708.c18569.g.lm.akamaistream.net:554/D/1709/18569/vnnn/reflector:53708*'
    #extract VVAL from the url for Refresh-on-Demand (Refresh.groovy)
    VVAL="$PARAM"
    VVAL=`expr match "$VVAL" 'rtsp://a1709.l1856953708.c18569.g.lm.akamaistream.net:554/D/1709/18569/v\(.*\)/reflector:53708*'`
    if [[ ! -z "${VVAL}" ]]; then
      curl -X POST "http://localhost:23423/rest/action" -H "Content-Type: text/xml" -d "<action><name>forceOnlineResourceRefresh</name><parameter>${VVAL}</parameter></action>"
    fi



Make the above changes, not sure if serviio needs to be restarted or not, but do it any way and you should be all set.

Thanks.
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Jun 25, 2012 9:35 pm

Re: Refresh on Demand plugin for linux?

Cool. Why not add it to the wiki under linux with a pointer to my windows wiki? It will only get lost in the forum.
<<

xs2inattar

DLNA master

Posts: 143

Joined: Sun Jun 24, 2012 5:49 pm

Post Mon Jun 25, 2012 9:42 pm

Re: Refresh on Demand plugin for linux?

Ok Will do that.
<<

xs2inattar

DLNA master

Posts: 143

Joined: Sun Jun 24, 2012 5:49 pm

Post Mon Jun 25, 2012 11:14 pm

Re: Refresh on Demand plugin for linux?

Added to the wiki. Please take a look and let me know if it looks good.

http://wiki.serviio.org/doku.php?id=ref ... mand_linux
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue Jun 26, 2012 3:39 am

Re: Refresh on Demand plugin for linux?

Looks good. Thanks.
<<

ttguy

Serviio lover

Posts: 61

Joined: Sun May 27, 2012 10:52 am

Post Fri Oct 05, 2012 2:03 pm

Re: Refresh on Demand plugin for linux?

So I have been playing with the ffmpeg-wrapper.sh script that is posted on the Wiki in the link mentioned above. I am interested in it for puposes other than Refresh on Demand. I don't know if anyone else is using that script. But I found that it had quite a few issues.

I have made some corrections so that it runs for me. But I have not tested it with the whole Refresh on Demand set up.

I have posted it to the Wiki as ffmpeg-wrapperv2.zip
My changes are:
Make it a bash script instead of a sh script - so the [[ ]] extended test construct works
Fixed line feeds so they are Unix style not windows style
Fixed missing close quotes on the curl call (and added the closing </PARAMETER> tag
added [[ ]] to the test for =="-i"

Make it work if ffmpeg executable is not in the same folder as this script
To do this you set a FFmpegFOLDER variable to the location of your ffmpeg executable. If it resides in the same folder as
this ffmpeg-wrapper.sh then "." is valid

This is all just FYI stuff. Don't expect anyone to do any thing with this. Somone might find it useful. Or Not.
--
linux/XBOX 360

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 2 guests

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