FAQ  •  Register  •  Login

an option to disable online resources caching

<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Sun Nov 11, 2012 6:08 pm

an option to disable online resources caching

I am not sure if this was already requested. but what about an option to disable online resources caching to avoid issues described here http://forum.serviio.org/viewtopic.php?f=6&p=55979#p55979. then there would be need to waste resources on scheduled full content refresh.
- Mike
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Nov 11, 2012 7:36 pm

Re: an option to disable online resources caching

After giving this more thought, would it not be simpiler to only refresh the feed items on a refresh, and only do the ffmpeg extract when an item is actually played. That way the latest url for every item is only obtained when required and there are no excessive delays when booting or refreshing folders. Seems to me that happens already when an expires immediately feed is bad and serviio redoes the extract, so turning off the original extract should be easy to do.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Nov 11, 2012 10:13 pm

Re: an option to disable online resources caching

FFmpeg is used to extract technical metadata, which is stored in cache (the content URL being the cache key). Therefore during feed refresh it parses the feed, possibly invokes a plugin, and if the item already has an entry in the cache, ffmpeg is not invoked.

FFmpeg has to be invoked before you browse, because the metadata is needed when you browse the folders on your TV.
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Sun Nov 11, 2012 11:41 pm

Re: an option to disable online resources caching

zip wrote:FFmpeg is used to extract technical metadata, which is stored in cache (the content URL being the cache key). Therefore during feed refresh it parses the feed, possibly invokes a plugin, and if the item already has an entry in the cache, ffmpeg is not invoked.

FFmpeg has to be invoked before you browse, because the metadata is needed when you browse the folders on your TV.
if metadata from ffmpeg is needed to browser folders on TV, so how do other media servers handle this stale metadata/content issue to be able to display up to date content each time when a folder of an online resource is browsed?

maybe it's possible to get rid of this ffmpeg metadata dependency completely or at least make it optional for online resources to display fresh content when online folders are displayed.
- Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 12, 2012 12:11 am

Re: an option to disable online resources caching

Maybe they always transcode to the same set of codecs/containers, and can assume the target file format. It's not the way Serviio works.
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Mon Nov 12, 2012 3:55 am

Re: an option to disable online resources caching

zip wrote:Maybe they always transcode to the same set of codecs/containers, and can assume the target file format. It's not the way Serviio works.
well, i don't think this is the case given huge variety of online sources media servers like PlayOn, Roku, Boxee, and XBMC support via standard and third-party applications / plugins.

most likely they determine codecs/containers ONLY when they start playing a file so they DON'T need to pre-load/cache transcoding metadata for each folder.

yes, it might take 5-10 seconds more to start a file but that allows to completely avoid metadata caching and content refreshштп issues.
- Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 12, 2012 1:37 pm

Re: an option to disable online resources caching

So most of the servers you mentioned are not DLNA, therefore they probably don't need to know the information as they use their own protocol.
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Mon Nov 12, 2012 3:08 pm

Re: an option to disable online resources caching

zip wrote:So most of the servers you mentioned are not DLNA, therefore they probably don't need to know the information as they use their own protocol.
Maybe PlayOn uses its own protocol. But their implementation of container/target metadata collection looks better than in serviio. because PlayOn can be played on many DLNA devices, supports a lot of online resources as folders tree and always displays the latest content without a refresh.
- Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 12, 2012 4:58 pm

Re: an option to disable online resources caching

So when you say refresh (in your initial post), what exactly do you mean by that? The contents of feeds on the system startup? Because it should not do any FFmpeg, other than for any new items. It'll just downlod the feeds again and parse them (possibly via a plugin)
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Mon Nov 12, 2012 5:06 pm

Re: an option to disable online resources caching

zip wrote:So when you say refresh (in your initial post), what exactly do you mean by that? The contents of feeds on the system startup? Because it should not do any FFmpeg, other than for any new items. It'll just downlod the feeds again and parse them (possibly via a plugin)
i mean no complete feeds scan / caching at all neither on start up nor by schedule. display only first level of resource folders and then scan a folder content without ffmpeg when it's selected. this why folder will always display. and when an item is selected then collect metadata with ffmpeg and start playing.
- Mike
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Mon Nov 12, 2012 5:08 pm

Re: an option to disable online resources caching

miksa wrote:
zip wrote:So when you say refresh (in your initial post), what exactly do you mean by that? The contents of feeds on the system startup? Because it should not do any FFmpeg, other than for any new items. It'll just downlod the feeds again and parse them (possibly via a plugin)
i meant no complete feeds scan / caching at all - neither on start up nor by schedule.

display only first level of resource folders. and then scan a folder content (without collecting ffmpeg metadata) when a folders selected. this way folder will always display recent content. and when a video item is selected then collect metadata with ffmpeg and start playing.

so basically the idea is to have an option to completely disable ALL caching of online resources to avoid necessity to determine what items are new and what are old.
- Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 12, 2012 5:25 pm

Re: an option to disable online resources caching

IN that case the brwsing experience would be awfully slow, it may take tens of seconds to parse a feed alone, and probably more if it has to invoke FFmpeg as well. I think one of the strong point for using Serviio is that it's very fast.
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Mon Nov 12, 2012 5:40 pm

Re: an option to disable online resources caching

zip wrote:IN that case the brwsing experience would be awfully slow, it may take tens of seconds to parse a feed alone, and probably more if it has to invoke FFmpeg as well. I think one of the strong point for using Serviio is that it's very fast.
i don't think so. my point is NOT to run ffmpeg when parsing online feed at all. this way parsing will be fast, right? and run ffmpeg only for a video item selected. this is also fast, right?

so there should not be a delay at all when parsing RSS and Web feeds to display folders and items. and this way implementation of nested folders will also be fast:

1. display top level of folders and items
2. when folder selected, display its nested folders and items
3. when video item select, run ffmpeg and start playing.
- Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 12, 2012 5:46 pm

Re: an option to disable online resources caching

miksa wrote:my point is NOT to run ffmpeg when parsing online feed at all. this way parsing will be fast, right?

NOt necessarily, it still has to download the feed from the internet and possibly invoke plugin, which make take considerable time (in the context of browsing)

and run ffmpeg only for a video item selected. this is also fast, right?

No, you have to run FFMpeg before you browse, or at the time of browsing, because the DLNA client needs to get the description of the items in a container/folder. So at this point it has to know what the file/stream looks like and if it needs to be transcoded (and what the target format would be).

So the flow would be:

1) Get list of folder A
2) run ffmpeg for each item in the folder
3) send the list to the client

.. which would cause massive delays
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Nov 12, 2012 10:24 pm

Re: an option to disable online resources caching

Bottom line: DLNA is a crappy solution for online streams. Why not pick a single format mpeg2video for online streams so that online stream menus can be sent to DLNA client without having to extract and parse each item first. That way refresh is only a build of current items, and then when one is selected the extract is performed on just that item and ffmpeg is run to get the stream parameters and then transcode it so we can play on the fly just like I do with ffplay.
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Tue Nov 13, 2012 12:30 am

Re: an option to disable online resources caching

zip wrote: DLNA client needs to get the description of the items in a container/folder. So at this point it has to know what the file/stream looks like and if it needs to be transcoded (and what the target format would be).
not sure why DLNA-client has to know if file needs to be transcoded if transcoding is done by Serviio, and not by the client.

i think there may be two workarounds how to avoid calling ffmpeg to get file/stream metadata during folder browsing:

1. return to DLNA-client most generic target format from client's profile and transcode to this format when video item selected.

2. return to DLNA-client most generic target format from client's profile and transcode to a actual target format determined by ffmpeg run when video item selected.
- Mike
<<

miksa

Serviio lover

Posts: 68

Joined: Fri Nov 09, 2012 2:30 am

Post Wed Dec 05, 2012 1:12 am

Re: an option to disable online resources caching

In addition to PlayOn I've found three other FREE DLNA servers which support sub-folders, don't do any caching and always display current online content:

- Plex Media Server
- PS3 Media Server
- Universal Media Server

they have their own issues. so i am looking forward when Serviio will be able to display current content without a refresh. then it will make sense to pay for it.
- Mike

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 28 guests

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