MaterialFiles icon indicating copy to clipboard operation
MaterialFiles copied to clipboard

Thumbnail generation over SFTP extremely slow with large video folders

Open canklot opened this issue 4 months ago • 1 comments

Hi. I am hosting a sftp server on my computer and store my films in there. On my phone I am using material file explorer as sftp client. When I open the films folder on my phone network usage spikes to 12Mb/s and nothing loads for a few minutes untill all the thumbnails are created. I dont want to disable thumbnails. I guess the app is trying to fetch big chunk of the video files to create the thumbnails. Can we make the thumbnail creation less resource hungry?

I tried changing the videoFramePercent to 1.0/100.0 and also to 0.0 but it is still taking a long time.

val framePercent = options.parameters.videoFramePercent() ?: (1.0 / 3.0)

I also tried changing the OPTION_CLOSEST_SYNC to OPTION_NEXT_SYNC but still its taking a long time to create thumbnails for a folder with a lot of big videos.

val frameOption = options.parameters.videoFrameOption() ?: MediaMetadataRetriever.OPTION_CLOSEST_SYNC

VideoFrameFetcher.kt

canklot avatar Dec 04 '25 16:12 canklot

Relevant issues: https://github.com/zhanghai/MaterialFiles/issues/1030 https://github.com/zhanghai/MaterialFiles/issues/557#issuecomment-1031117218 https://github.com/zhanghai/MaterialFiles/issues/968 https://github.com/zhanghai/MaterialFiles/issues/895 https://github.com/zhanghai/MaterialFiles/issues/886 https://github.com/zhanghai/MaterialFiles/issues/1203 https://github.com/zhanghai/MaterialFiles/issues/1030

canklot avatar Dec 06 '25 04:12 canklot