Add settings option to increase timeouts during ffmpeg extractions
I have a number of fairly large videos on a network drive. This network drive is not particularly fast, and thus I have been unable to exact a good number of the thumbnails and filmstrips as the drive times out.
I was able to easily bypass this by running the this project locally (thank you for providing the source!), but I suggest providing some way to increase the timeouts.
I would also suggest actually popping up errors if they occur like this. Perhaps adding some toast errors that you can trigger, though I recognise that's a little more annoying given that this process is done in a worker thread. I'm also happy to try implementing any changes myself (though I don't have much time), but I would need to know how or what you'd like implemented here.
@whyboris I would like to support this. After simply ignoring the thumbnail issues for several years, with the magic of language models I managed to pinpoint the issue as short timeouts during the generation process, following your advice to use Debugtron in another thread. Like this chap, I use a network drive with many large videos, although it largely works well. Any older container or codec, like WMV files, and the generation times out.
I unpacked the app.asar to test. In the setExtractionDurations() function in the main-extract.js, I manually adjusted the timeouts to be four times the default for the thumb and filmstrip. This basically eliminated all failures that were not genuine corruption. Generation went from around 85% success rate to probably 99%. It now looks like this:
return {
// currently 4x default
thumb: 2000 * sourceFactor * thumbHeightFactor,
filmstrip: 1400 * sourceFactor * thumbHeightFactor * numOfScreens,
clip: 350 * sourceFactor * clipHeightFactor * clipSnippets * snippetLength,
clipThumb: 400 * clipHeightRatio, // never above 600ms
};
I added some logging to catch the ffmpeg errors during generation and they weren't particularly useful. Usually, even most corrupted files worked if given enough time. The addition of a timeouts adjustment in the UI or through a config file would be enough.
Thank you @sebiimaks for this!
I'm intending to have another VHA release in the coming months / early 2026 and I'll test these out on my machine and update the timeouts 👍