Author Topic: CPU Usage 100%!! PC User  (Read 18154 times)

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
CPU Usage 100%!! PC User
« on: December 03, 2018, 01:09:29 PM »
I'm having serious problems with the cpu usage while displaying videos. Which video decoder should I use? dxva2 or software? Is there any bugged option I should turn off to improve cpu usage?

Just finished with the Sega collection, and I didn't notice the cpu usage. Videos start lagging after several minutes, even freezing the front end. What should I do?

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #1 on: December 03, 2018, 03:50:53 PM »
1- Video decoder: Hardware is better then software but you will need to either compile AM or use XP version which comes with hardware support.
2- Videos with 30 FPS put less strain on system then videos with 60 FPS.
3- 360p likewise are better then 480p for performance
4- You can use a trigger like end navigation so video only loads when you stop scrolling the list. This might solve the problem of CPU usage increasing in consistent manner.

That said if your CPU usage keeps on increasing then it might probably be something related to layout. Try some default layout and use videos instead of snaps to ensure its not the layout.  I'm presuming you are on PC.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #2 on: December 04, 2018, 12:48:04 AM »
How do you activate the hardware support on XP? Do you have to turn on dxva2? I'm not on the Xp operating system, but I think it'll work.

Could you explain the end navigation trigger? How do you activate this?

I'm a computer user, yes. Right now, I'm using the cosmos theme. Thanks in advance.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #3 on: December 04, 2018, 03:24:47 AM »
Even with the default theme, the snap videos are leaving my CPU usage at 100%. To name a few things, I changed Attract Mode's main folder to simply Attract. Also I did some modifications to the theme per si, mainly replaced a system video.

Heard that conflict may appear if names have been changed or something. The front end loops searching and overloads resources.
« Last Edit: December 04, 2018, 03:40:16 AM by UnknownFigure »

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #4 on: December 04, 2018, 06:17:37 AM »
You can download the XP hardware supported version from here> http://attractmode.org/download.html [Attract-Mode 2.5.1 (FFmpeg 3.4)]. To change video decoder go to options, General > Video Decoder. I checked and Cosmo theme is already using the trigger "Transition.EndNavigation". Going through the Cosmo thread the author suggests the following
Quote
The main menu eats video ram like crazy. To improve perfomance it's advised to disable animations or artwork. A bit of overclock can help.
System menu should work better as it doesn't have to change the 720p background with each selection, but you can disable animations and use  .jpg artworks instead of heavier .png

Changing the name of attract-mode folder might break some layouts if paths are absolute. It would be better to start fresh with the XP version and see how it effects the cpu usage with/ without videos on default layout. Have you tried running the videos in media player?

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #5 on: December 04, 2018, 06:53:57 AM »
Thanks for the help man.

I tried the windows XP version, without changing the folder name, only adding the video, rom and emulator. Only decoding options I have are dxva2 and software. dxva2 seems to reach 100% quite fast.

Is dxva2 the name of the decoder? I've read something about having another option called mmal, but I don't have it in the XP release.
« Last Edit: December 04, 2018, 07:13:38 AM by UnknownFigure »

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #6 on: December 05, 2018, 02:01:04 AM »
Need some help. What do you have to do to get the mmal option for the video decoder on the Windows XP version of Attract Mode? Only got dxva2 and software.

Do I need to download anything?

toothlessgrinn

  • Sr. Member
  • ****
  • Posts: 190
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #7 on: December 05, 2018, 01:26:15 PM »
this should not be happening... i mean well first is this on a home computer, is it dedicated to attract mode or what? second you might have other stuff running in the background. i spent over a year building my 4 player cab using win 7 and i have 0 issues. if your machine is dedicated to attract mode ill gladly share the info i have. (arcade,daphne,nes,snes,atari2600. is what im running.) also whats your hardware specs?
we came , we saw , we lost LOTS of quarters...

Win 7
Asus mobo amd 64bit 3core
12g ram
4 player. Custom built woody cab
46" plasma screen with 22" marquee

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #8 on: December 05, 2018, 10:22:02 PM »
this should not be happening... i mean well first is this on a home computer, is it dedicated to attract mode or what? second you might have other stuff running in the background. i spent over a year building my 4 player cab using win 7 and i have 0 issues. if your machine is dedicated to attract mode ill gladly share the info i have. (arcade,daphne,nes,snes,atari2600. is what im running.) also whats your hardware specs?

Nothing running on my background, I'm a msconfig maniac. Intel Core 2 Duo E6850 (Best Dual Core on the Market), it's running pretty much everything nowadays., 4 gb of 800Mhz ddr2, a Nvidia GPU special edition OC 2GB GDDR5 and two brand new components, a SSD of 120GB, and a 2 Tetra HHD.

I suppose you're using the Windows Xp version of Attract Mode, which has the mmal option (Hardware video decoder). Problem is, I don't have that option. DO I need to download and install ffmpeg to have this option show up in the video decoder setting?

By checking the forums, several people are having the same problem. Some of them solved it without mentioning the process, others simply left the front end.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #9 on: December 06, 2018, 06:55:30 AM »
AFAIK MMAL is a Raspberry Pi specific thing so won't work on Win machine. MMAL > https://github.com/techyian/MMALSharp/wiki/What-is-MMAL%3F

Only thing which comes to mind is that videos are not properly encoded (and EmuMovies does have this problem with some system video-packs)


toothlessgrinn

  • Sr. Member
  • ****
  • Posts: 190
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #10 on: December 06, 2018, 07:21:27 AM »
UnknownFigure   i sent you a pm.
we came , we saw , we lost LOTS of quarters...

Win 7
Asus mobo amd 64bit 3core
12g ram
4 player. Custom built woody cab
46" plasma screen with 22" marquee

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #11 on: December 06, 2018, 08:32:47 AM »
AFAIK MMAL is a Raspberry Pi specific thing so won't work on Win machine. MMAL > https://github.com/techyian/MMALSharp/wiki/What-is-MMAL%3F

Only thing which comes to mind is that videos are not properly encoded (and EmuMovies does have this problem with some system video-packs)

This doesn't make any sense. How can mmal be a specific thing for Rasp, when the XP version of Attract Mode has hardware support by ffmpeg 3.4?

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #12 on: December 07, 2018, 01:33:00 AM »
The link suggests its designed for a gpu built into r-pi. Perhaps someone with both a win-pc and pi could reflect on it. I have never used pi so not familiar with that.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #13 on: December 07, 2018, 02:04:38 PM »
This is a known issue that on some configurations ( like mine for example ) the software video decoder tanks the CPU and the hardware decoder does not work at all.
This is what I did a while back. I reencapsulated (not reencoded) all my mp4 into the avi containers and the CPU usage went down.

I just downloaded the ffmpeg encoder and run the following batch command
Code: [Select]
for %%a in ("mp4\*.mp4") do ffmpeg -i "%%a" -map 0:0 -vcodec copy -map 0:1? -acodec copy -f avi "avi\%%~na.mp4"
This batch encapsulates all files found in the mp4 folder and saves them as avi with mp4 extension into the avi folder.

Also if you are on Windows 10 with nVidia gpu make sure you have disabled the Threaded Optimization, and set the compatibility of attract.exe to Windows 8

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #14 on: December 08, 2018, 10:31:17 AM »
Oomek, your AM is on windows, right? Not rasp..

If so, could you explain a bit more? When you install/extract ffmpeg (From ffmpeg.org?), the folder itself contains a mp4/avi folder. So I need to transfer all my videos to those folders, and run the batch command.

Does this process take that long? Also, could you tell me how much it went down?