Option to fully disable detailed file analysis

In order to show a file detail like the 1080p, 4K, or HDR badge for a given piece of content in the UI, Infuse assumedly needs to analyze the file. Analyzing that file means it needs to be available in some way, like on a filesystem, for example.

In configurations where a user has “Jellyfin, Emby, or Plex as a source Infuse will rely on the specs provided by those servers instead of reading the files and generating its own specs.” In a sense, because the details of a given file are never analyzed, they are lazily accepted. The source has already done the heavy work of analyzing the file and so Infuse does not need to read the file itself and figure out its codec and a myriad of other file metadata. Infuse does not need to have the file available to it at that moment in order to index it for a Library.

I would love to extend that functionality into an option that simply disables detailed file analysis on everything… until a file needs to be streamed. In other words, lazy load the detailed file analysis until the very moment it needs to be known.

What that would mean is that a fresh index of files would get you most of the way to having the visually rich Library browsing experience. Metadata from online services would fill descriptions, posters, ratings, actors, trailers, collections, etc. That alone gives you the visually rich Library browsing experience. What it would leave out are the badges, and maybe some filters that can isolate all HDR movies or all 4K movies.

Why?

This will mean 1) faster indexing times, but—and this is where my personal motivations come in—it also means that 2) in cases where you have a filesystem that can optimize away files like iCloud Drive, a file does not need to be completely available at the moment of indexing. iCloud Drive’s “optimize” feature works by ultimately turning a regular file into a sparse file (0 blocks) and leaving only its apparent size (e.g., 12.4GB), which you can observe with the stat command; in other words, the path to the file exists, its name is available, and apparent size, but it occupies zero blocks on the underlying filesystem, which means it occupies no real space on the hard drive.

The way MacOS works with optimized files is simple: the moment the file is attempted to be opened, iCloud Drive seamlessly downloads the contents of the file, or blocks, so that the sparse file (which is exactly what torrents leverage) becomes the real file with its content, and can then be opened and played.

I’ve noticed that Infuse nicely triggers this seamless download (many apps do not), which means that if you request a file over, say, a SMB share, that Infuse will wait for MacOS to download the file, and once its complete it will then stream it over SMB. This is awesome. The flip side to this is that when you add a tonne of content that has been optimized away, Infuse will need to download all those files during its indexing process. This is not awesome.

If Infuse did not need to get a detailed analysis of a file at indexing time, then this seamless iCloud Drive download would never occur, which would mean that the index would be immediate, and the network would not go crazy trying to download potentially thousands of files… for the express purpose of showing a badge and doing all that heavy lifting upfront. Instead, there should be an option to lazy load detailed file analysis to the moment a file is requested to watch so that Infuse can figure out what codec and features to use then.

Thanks!

This is possible in the current version of Infuse by disabling the ‘Pre-Cache Details’ option found under the Advanced tab of a share’s settings. With this option disabled the codec related information will be fetched as-needed when viewing the details page for a specific video.

That’s awesome!

I had no idea this was available. Next time I’ll RTFM :laughing:.

In testing this out, it works exactly as you described. The files get indexed into the Library very quickly without triggering the detailed file analysis, and (in my case) therefore also without triggering iCloud Drive downloads.

There are two interactions that did cause the detailed file analysis to trigger (and therefore an iCloud Drive download), which I was not expecting:

  • Editing the metadata of a file triggers detailed file analysis (and therefore an iCloud Drive download). I only expected to choose another match, not have the whole file analyzed.
  • Simply opening the page for a piece of media, like a movie, where the fanart, title, description, play button, etc, also triggers detailed file analysis (and therefore an iCloud Drive download). I only expected to see the usual page, not have the whole file analyzed.

The upside is that it kicks off the download process even before pressing the Play button. The downside is that browsing a library trying to find something to watch can potentially kick off hundreds of GBs of iCloud Drive downloads. For example, just reading the movie descriptions of ten 4K remuxed movies could push 300GB over the Internet, and then through your local network (the double whammy is expected because of this setup, but it’s the fact of just browsing that hurts a bit).

In observing this, then, I would like to make a modification to my initial suggestion:

Can Infuse only trigger detailed file analysis the moment a user presses the “Play” button? In other words, push that file analysis just a teensy-weensy bit later, down to the very moment before it’s unavoidable.

I fully recognize this is such a limited use case and many users are probably not viewing iCloud Drive as a viable component to their media needs (given iCloud does not actually support streaming, and it’s expensive AF), but what I see here is almost a perfect orchestration of features and simplicity, where you can host TBs of data in iCloud Drive without the content actually occupying filesystem storage (“optimized”)… but being available on-demand when MacOS’ SMB server attempts to open an optimized file, which in turn triggers the seamless iCloud Drive download. In our Gigabit-connected world, even a crazy 60GB remux would mean just a few minutes of initial “buffering” before the file then opens in Infuse without a hiccup. It’s such an excellent cooperation of technologies that nails the simplicity I’m after.

Anyway, this is my suggestion for the day :smiley:

No immediate plans for this right now, but I’ve changed the title of this thread to track interest in this.

1 Like

I appreciate it!

In addition to how late file analysis can be pushed (i.e., only to the very moment “Play” is pressed), I think it could be great if there were a “Pre-Cache Details” option in the “General” section of the settings to apply to all sources by default or not. For example, that ability to delay detailed file analysis is not available as an option for the “Add Local Folder” source on MacOS, whereas most of the other sources have the advanced options that provide the configuration.