Page 1 of 1

Movie (FFMPEG) Metadata Caching

PostPosted: Mon Sep 26, 2011 5:34 pm
by Jahava
I would like to request that Subsonic cache the movie thumbnails and information that it generates when it probes a movie directory. I have a flat (non-hierarchal) movie directory with a few thousand movies in it. Every time Subsonic attempts to get even a listing of the movie (left-side pane) directory, Subsonic's page-loading stalls for about 5 minutes as it runs an:
Code: Select all
ffmpeg -i <movie-name>

...command on each movie in the folder. During this time, the interface is more or less unusable.

Whatever information it's gathering with the multiple ffmpeg invocations (I assume play time, codec information, maybe thumbnail generation), it shouldn't need to do that every time I attempt to access the folder. It should gather that information when it's generating its search index, not during casual user interface usage. Furthermore, it should cache that information so that it only needs to run ffmpeg on each movie exactly once.

Currently, every time I access a movie directory, I see a lot of the following processes being run:
Code: Select all
media> ps aux | grep ffmpeg
root      3340  0.0  0.0  94856  2728 ?        D    13:24   0:00 /var/subsonic/transcode/ffmpeg -i /storage/media/movies/Some Movie.avi


The only current solution that I have is to break the monolithic movie directory into several sub-directories (A, B, C, etc.) and move the movies into that. While the ffmpeg commands are still run, far fewer are run during each directory access, so the interface stall is more tolerable. This is, however, not a very good solution, since I prefer the monolithic directory structure, as do several other services that I run that also access the movie directory.

Failing a complete query-on-index and/or caching implementation, a simple option to disable metadata gathering from movies would be greatly appreciated. I'd rather not see play times than have to wait five minutes each time I want to look at my movie directory.

Thanks!

Re: Movie (FFMPEG) Metadata Caching

PostPosted: Sat Oct 01, 2011 2:24 pm
by BrianDelShasta
+1
I experience similar issues. I don't have the monolithic structure presented above, but I've got folders filled with seasons of episodes and the load time is sluggish due to ffmpeg process spawning.

What metadata is actually being gathered? Can it simply be gathered the moment the play button is pressed on a single video?

Re: Movie (FFMPEG) Metadata Caching

PostPosted: Fri Mar 30, 2012 1:24 pm
by narutopgm
+1

Re: Movie (FFMPEG) Metadata Caching

PostPosted: Sat Mar 31, 2012 11:24 am
by Pilou
+1

Re: Movie (FFMPEG) Metadata Caching

PostPosted: Sun Apr 01, 2012 9:28 am
by fonsoy
Nice research, and a +1 from me.

Re: Movie (FFMPEG) Metadata Caching

PostPosted: Mon Apr 29, 2013 2:32 am
by BrianDelShasta
With the addition of the "Fast Access Mode" in 4.7 browsing directories full of video is much faster. As a matter of fact, even leaving fast access mode unchecked seemed to still browse video folders much, much quicker in 4.7. Now unfortunately, it seems back to the old way in 4.8.

It would be nice if Fast Access Mode could be enabled only on specific Media Folders.

I'll see if I can track down what changed for the better in 4.7 and then for the worse in 4.8. Or maybe I'm just crazy.