Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

golemus
Posts: 9
Joined: Mon Dec 23, 2024 8:35 am

Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Post by golemus »

I've been using Faststone Image Viewer for years, but now changed to XnView as Faststone has started to get some issues and I want to get rid of last 32-bit programs.

So I have started migrating to XnView MP as in many ways it looks very good program. Anyway I have some issues with it.

My typical workflow is that I use only Xnview Viewer window and browse with arrow left / arrow right buttons through folders which have photos (JPG, and since 2 months HEIC/HEIF) and videos (MP4 H.264 and since 2 months MP4 H.265).

When browsing through JPGs Xnview is smooth but when browsing through HEIC/HEIF, H.264 or H.265 the browsing becomes slow and unpredictable. Sometimes when you press arrow button the next photo comes in less than 300ms but sometimes after pressing arrow button the program "freezes" and it is more like 1000-1500ms.

I did some benchmarks against faststone on same computer. I open the program and press arrow key 10 times to go through 10 photos. With faststone it takes abt. 7 seconds but with xnview it takes almost double 13 seconds. I've tried to tweak settings but am not absolutely sure what could affect it. I did some tests with Process Monitor on a test machine and it seemed that XnView is bundled with its own codecs but faststone uses ones on windows. On this machine (my main machine) i have not yet tested if it uses xnview bundled codecs as I have also K-Lite installed. But it is slow anyway and I think K-Lite does not help with still images?

Are thumnail, caching and catalog settings supposed to affect when using xnview in this way? I barely ever use browser and would assume that they affect browser more? I also tried to tweak them and didn't observe any difference.

Test machine 1 is Thinkpad T470s (i5 dual core from 2017 and intel integrated GPU), windows 10, my current machine is Thinkpad T490 (i5 2019ish quad core and also intel integrated) and there is third very old machine (Thinkpad E530) where I think I might have observed similar behaviour.



Thank you.
Last edited by golemus on Mon Dec 23, 2024 4:53 pm, edited 1 time in total.
cday
XnThusiast
Posts: 4214
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Post by cday »

golemus wrote: Mon Dec 23, 2024 8:58 am Couple of additional questions not directly related to topic:

1. Are there any keyboard shortcuts for fast forward / rewind of video player?

2. In faststone i used "edit with external program" feature to apply a mp4 video rotation with ffmpeg.

ffmpeg -i (filename) -metadata:s:v rotate=90 -codec copy (filename).mp4

Is there any way to achieve the same in xnview? Sometimes the orientation sensor of smartphone makes mistake and puts a vertical video horizontally (or vice versa) and I have to correct them afterwards.
One issue per thread helps everyone! :D
golemus
Posts: 9
Joined: Mon Dec 23, 2024 8:35 am

Re: Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Post by golemus »

cday wrote: Mon Dec 23, 2024 9:58 am One issue per thread helps everyone! :D
Aye sir =)

I put other issues to their own topics.
golemus
Posts: 9
Joined: Mon Dec 23, 2024 8:35 am

Re: Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Post by golemus »

I think I found the main cause for mp4 slowness.

Settings - View - Misc - Cache -*** Read one image ahead ***

This was enabled and it is supposed to make browsing faster but for whatever reason it does the opposite. After disabling it browsing mp4:s is butter smooth.

Browsing .heic images is still very slow but it is about equally slow also on Faststone.

I understand that this is new, more CPU intensive format than JPG but it feels far too slow. Even h.265 videos which are supposed to be same algorithm are faster to browse through.

But for everything else than .heic files XNView is now butter smooth and fast =)
golemus
Posts: 9
Joined: Mon Dec 23, 2024 8:35 am

Re: Viewer slow/sluggish when browsing HEIC/HEIF, H.264 or H.265 files (Windows)

Post by golemus »

more observations:

In Process Monitor Windows Photos seems to be not accessing at all MS HEVC extensions. It does access HEIF extensions but AFAIK decoding is usually done by HEVC. Could it be that Photos has its own optimized HEVC decoding algorithm for browsing that is not dependent on that extension?

Anyway for whatever reason both libx265.dll bundled with XN and MS HEVC extensions seem to be slow when they are used for photo browsing. Is there any solution?

I was thinking that if LAV Filters in K-LIte codec would perhaps be faster? But could they even be configured for XNView .hevc decoding (nor for any other still image viewing) ?