User Tools

Site Tools


refresh_on_demand

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
refresh_on_demand [2012/04/30 17:36]
jhb50
refresh_on_demand [2012/08/06 14:06] (current)
jhb50
Line 21: Line 21:
 The hahasports.groovy implements this option via a refresh=nnn parameter that removes the automatic refresh based on event times and only refreshes the feed every nnn minutes. Other dynamic feeds should implement a similar capability. A "Force Refresh" from the server or a remote console, or from a client device menu may then be used to refresh the feeds prior to opening them.  The hahasports.groovy implements this option via a refresh=nnn parameter that removes the automatic refresh based on event times and only refreshes the feed every nnn minutes. Other dynamic feeds should implement a similar capability. A "Force Refresh" from the server or a remote console, or from a client device menu may then be used to refresh the feeds prior to opening them. 
  
-The facility to initiate "Force Refresh" from menu on a client device consists of a WebResource RefreshWebResources.groovy that generates a menu of "Force Refresh" feed items for all WebResource feeds in the Serviio online library. Clicking on a listed feed item initiates a "Force Refresh" of that feed by intercepting the call to play the video associated with that menu item. The feed is then removed from the list of Online menu feeds while it refreshes and it becomes available again by opening the Online menu once the refresh is complete. The implementation is documented below.+The facility to initiate "Force Refresh" from an online menu on a client device consists of a WebResource Refresh.groovy that generates a menu of "Force Refresh" feed items for all enabled WebResource feeds in the Serviio online library. Clicking on a listed feed item initiates a "Force Refresh" of that feed by intercepting the call to play the video associated with that menu item. The feed is then removed from the list of Online menu feeds while it refreshes and it becomes available again by opening the Online menu once the refresh is complete. The implementation is documented below.
  
 __ON DEMAND METHODOLOGY__ __ON DEMAND METHODOLOGY__
  
-The ability to implement "Force Refresh" feed items in the RefreshWebResources.groovy is based on prerequisite one time implementations:+The ability to implement "Force Refresh" feed items in the Refresh.groovy is based on prerequisite one time implementations:
  
 1) The installation of CURL.EXE which provides the abilty to access the Serviio repository data and initiate forced refreshes per the latest "Serviio REST interface specification.pdf" The curl.exe may be obtained from http://curl.haxx.se/dlwiz/?type=bin and use the wizard to select the correct package for your operating system and install it in the appropriate system library. I used the generic Win64-ssl package and copied curl.exe into C:\windows\sysWOW64. W32 users should get the generic Win32 package and copy curl.exe into C:\windows\system32 1) The installation of CURL.EXE which provides the abilty to access the Serviio repository data and initiate forced refreshes per the latest "Serviio REST interface specification.pdf" The curl.exe may be obtained from http://curl.haxx.se/dlwiz/?type=bin and use the wizard to select the correct package for your operating system and install it in the appropriate system library. I used the generic Win64-ssl package and copied curl.exe into C:\windows\sysWOW64. W32 users should get the generic Win32 package and copy curl.exe into C:\windows\system32
Line 35: Line 35:
 4) The addition of the line -Dffmpeg.location="C:\Program Files\Serviio\lib\ffmpeg.bat" to the file C:\Program Files\Serviio\bin\ServiioService.exe.vmoptions to cause all Serviio ffmpeg calls to be sent to ffmpeg.bat  This needs to be repeated after each Serviio new install, which will restore that file. 4) The addition of the line -Dffmpeg.location="C:\Program Files\Serviio\lib\ffmpeg.bat" to the file C:\Program Files\Serviio\bin\ServiioService.exe.vmoptions to cause all Serviio ffmpeg calls to be sent to ffmpeg.bat  This needs to be repeated after each Serviio new install, which will restore that file.
 After the addition it will contain: After the addition it will contain:
-<code>-Xmx384m+<code>-Xmx512m
 -Dffmpeg.location="C:\Program Files\Serviio\lib\ffmpeg.bat" -Dffmpeg.location="C:\Program Files\Serviio\lib\ffmpeg.bat"
 </code> </code>
 5) The installation of the attached ffmpeg.bat as C:\Program Files\Serviio\lib\ffmpeg.bat which will detect the ffmpeg calls containing the ISS URL, extract the "vValue" nnn and issue the curl command to refresh the Serviio online library nnn, before calling ffmpeg to process the original ffmpeg call. Note the ffmpeg.bat also logs each ffmpeg call in C:\Program Files\Serviio\log\ffmpeg.log which I have found useful for debugging. The bat may be edited to comment out that line as noted in the bat. 5) The installation of the attached ffmpeg.bat as C:\Program Files\Serviio\lib\ffmpeg.bat which will detect the ffmpeg calls containing the ISS URL, extract the "vValue" nnn and issue the curl command to refresh the Serviio online library nnn, before calling ffmpeg to process the original ffmpeg call. Note the ffmpeg.bat also logs each ffmpeg call in C:\Program Files\Serviio\log\ffmpeg.log which I have found useful for debugging. The bat may be edited to comment out that line as noted in the bat.
  
-With these changes, a Refresh menu will be created with items showing the library id and name of each Web Resource online source together with a "Click to Refresh Folder" icon. Clicking on an item, initiates playback of the ISS stream while the feed refreshes. Note that a refresh can require up to 30 seconds to cache a new item, but with hourly automatic updates many of the new events should already be cached. After waiting an appropriate period, playback may be stopped, the Refresh and Online Folders exited, and the Online Folder reopened. If the refresh is complete the Refreshed folder should appear. If not repeat the closing and reopening of the Online Folder until it does.+6) The addition of WebResource to the Library Online Sources section of the console using the dummy url http://www.refresh.com 
 + 
 +With these changes, a Refresh menu will be created with items showing the library id and name of each active Web Resource online source together with a "Click to Refresh Folder" icon. Clicking on an item, initiates playback of the ISS stream while the feed refreshes. Note that a refresh can require up to 30 seconds to cache a new item, but with hourly automatic updates many of the new events should already be cached. After waiting an appropriate period, playback may be stopped, the Refresh and Online Folders exited, and the Online Folder reopened. If the refresh is complete the Refreshed folder should appear. If not repeat the closing and reopening of the Online Folder until it does. 
 + 
 +__The FFMPEG.BAT - Updated for Serviio 1.0__ 
 +Download {{:ffmpeg.bat.zip}} 
 + 
 +**How to setup Refresh on demand from client for Linux and Synology NAS:** [[refresh_on_demand_linux|refresh_on_demand_linux]]
  
  
refresh_on_demand.1335807360.txt.gz · Last modified: 2012/04/30 17:36 by jhb50