[mythtv] [mythtv-commits] Ticket #3350: Threaded Preview Gen does not use qmap index consistently

Daniel Kristjansson danielk at cuymedia.net
Wed Apr 25 23:28:19 UTC 2007


On Thu, 2007-04-26 at 08:52 +1000, Mark Spieth wrote:
> > #3350: Threaded Preview Gen does not use qmap index consistently
> 
> I think there might also be another problem. I suspect in threaded preview 
> gen mode, if you scan each item in playbackbox quickly and all have no 
> preview image, then they all get launched simultaneously.
> this can cause excessive resource usage, esp on a remote FE with network 
> usage. if 10 are generating images, then you get 10x network usage during 
> avf initial stage where it works out what the recording is.

I'm pretty sure this is the case if the videos are on locally
accessible drives.

> Is it a good idea to only ave one preview gen going at any one time per FE 
> or perhaps shift preview gen to the/a backend as a job like commercial det 
> etc.?

You would want to change the preview generation queue from a
FIFO to a FILO so that the currently selected recording
wouldn't be the last to be previewed, but otherwise it is
not problem to limit the number of preview generation sessions
going on at a time. I believe the preview generator will use
the backend that recorded the video if it can't find the video
locally, although some assumptions may have changed with storage
groups.

Preview Generation is primarily handled as a backend process
like commercial detection and is kicked off when a recording
finishes. The frontend preview generation is only done when
(the recording hasn't finished, the backend crashed while
recording something, or when a bookmark is changed and MythTV
is configured to update the preview when a bookmark is changed)
AND the recording can be found on a locally mounted drive.

If network usage is the problem, I think it might make sense to
change the preview generators concept of a locally accessible
video. You could use the information that the storage groups
code collects to decide whether to use the backend for the
preview generation rather than the frontend when both have
access to a drive, but only one of them has true local access.

NOTE: I haven't looked at the code lately, but this is how it
worked when I last looked at it.

-- Daniel



More information about the mythtv-dev mailing list