Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: dfuse on December 29, 2016, 02:47:41 PM

Title: [SOLVED] suddenly very slow and high cpu usage when using video previews
Post by: dfuse on December 29, 2016, 02:47:41 PM
Hey guys,

I suddenly have this problem where loading a video preview takes a few seconds (using the nevato theme but also in other themes) and my cpu usage is constantly at 40-50%, also after the video is loaded and playing. Basically as soon as I add the video preview folder to my mame config in AM, cpu usage rises and the ui performs sluggish. Funny thing is this seemingly happened suddenly, didn't have this problem yesterday or before. To my knowledge nothing changed on my machine (Windows10).

Any ideas?
Title: Re: [SOLVED] suddenly very slow and high cpu usage when using video previews
Post by: dfuse on December 29, 2016, 03:10:04 PM
As these things go, you can search for hours, post a message and find the solution 10 minutes later. I noticed in the logs something about  not being able to initialize audio. I unplugged the headset that was inserted (Intel NUC) which makes Windows not see any sound output devices. Loading a video probably searches for an audio device for a few seconds and then times out. Inserting the headphones again solved the problem.
And it seems the high cpu usage is 'normal' when playing videos. Although playing the same video in VideoLAN only takes 4% cpu...
Title: Re: [SOLVED] suddenly very slow and high cpu usage when using video previews
Post by: verion on December 29, 2016, 03:22:46 PM
Although playing the same video in VideoLAN only takes 4% cpu
This is because AM doesn't use hardware acceleration (hw decoding) when playing video - and VLC does.

But there is a hope because Raygun apparently is working on adding hw accel - at least in Rpi.
I can already see that option in settings (AM 2.2 on mac) but lists "software" as the only option.
Title: Re: [SOLVED] suddenly very slow and high cpu usage when using video previews
Post by: dfuse on December 30, 2016, 05:28:00 AM
Ah ok. Luckily my cpu can handle it. When a game starts the cpu usage also drops back to 0 so no problem there.