Author Topic: Steps needed to force hardware Video Decoder?  (Read 98 times)

Asterra

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Steps needed to force hardware Video Decoder?
« on: June 17, 2017, 03:03:58 PM »
Finally found the opportunity to hand reasonable-quality 60fps videos over to the front end.  They are all undemanding 480p in CPU-friendly MP4.  And yet AttractMode can't really handle them.  Frames drop all over the place, causing the audio to quickly and increasingly lose sync with the video.

A glance at CPU usage reveals that it's doing the decoding in software, almost entirely on one core, and it is capping.  So, solution, hardware decoding, right?  Can't seem to enable it.  There's a lot of help on this issue for people using RetroPie, but that's not me.  It would frighten me to learn that you can only hardware-accelerate videos on a $30 toy, using a codec that originated on PC, so I won't go there.
« Last Edit: June 17, 2017, 03:56:34 PM by Asterra »

keilmillerjr

  • Sr. Member
  • ****
  • Posts: 263
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #1 on: June 17, 2017, 08:37:18 PM »
Maybe this will help? Not sure. I’m not a pi-pro.

https://www.raspberrypi.org/blog/another-new-raspbian-release/
Quote
In this release we are shipping an experimental OpenGL driver for the desktop which uses the GPU to provide hardware acceleration. This is turned off by default – if you want to enable it, you can find it in the command-line version of raspi-config, under Advanced Options->GL Driver.

Asterra

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #2 on: June 17, 2017, 09:34:14 PM »
Maybe this will help? Not sure. I’m not a pi-pro.
Sadly, that is a resource for the Raspberry Pi.  I'm on Windows.

Hardware Decoder cannot be selected in AttractMode on the Pi unless a certain step is taken (the installation of ffmpeg).  I assume the barrier I'm running into on PC is something similar, even though I definitely have ffmpeg installed already.  Really hoping someone knows the answer to this.  Would desperately hate to have to abandon this frontend.

mortron

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #3 on: June 18, 2017, 10:41:28 AM »
I am on a Pi and am having issues with getting FFMPEG to show up in AM. Not sure what's up. I posted some output from my Pi, and hopefully that may tell me the issue. It would be interesting (and beneficial) if they were related issues.

Asterra

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #4 on: June 18, 2017, 01:38:03 PM »
I am on a Pi and am having issues with getting FFMPEG to show up in AM. Not sure what's up. I posted some output from my Pi, and hopefully that may tell me the issue. It would be interesting (and beneficial) if they were related issues.
For Pi users, there is a preexisting thread covering what's needed here:

http://forum.attractmode.org/index.php?topic=1249.0

For PC users like myself, there is literally zero information to be had.  I don't even know if my question has an answer at all.  I am at the mercy of the likely very few people responsible for developing the app to hopefully drop by the official forums and clear this matter up.

mortron

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #5 on: June 18, 2017, 04:45:06 PM »
I am on a Pi and am having issues with getting FFMPEG to show up in AM. Not sure what's up. I posted some output from my Pi, and hopefully that may tell me the issue. It would be interesting (and beneficial) if they were related issues.
For Pi users, there is a preexisting thread covering what's needed here:

http://forum.attractmode.org/index.php?topic=1249.0

For PC users like myself, there is literally zero information to be had.  I don't even know if my question has an answer at all.  I am at the mercy of the likely very few people responsible for developing the app to hopefully drop by the official forums and clear this matter up.

I wish that worked... unfortunately it did not, and that's why I am in similar boat.

akafox

  • Hero Member
  • *****
  • Posts: 723
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #6 on: June 18, 2017, 06:13:42 PM »
I don't think there is a way to enable "hardware acceration" on a PC as mml (hardware acceleration for the pi) is well..for the pi. However I agree with you there has to be something. It wouldn't make a lot of sense otherwise. I have looked "everywhere" on the net as well for that. However a linux user might be able to do it..that is what the pi uses. Windows uses a much different type of hardware acceleration (directx maybe?) so The would have to be added into the code. That would be up to Ray on that one.

Asterra

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Steps needed to force hardware Video Decoder?
« Reply #7 on: June 21, 2017, 02:32:55 AM »
This apparent oversight led me to briefly test the waters of BigBox.  I had examined various videos of BigBox in action and determined that it did not suffer from the same issue, and indeed, BigBox uses hardware acceleration for videos by default.

Unfortunately, BigBox has major drawbacks that I didn't discover until I had it in front of me.  Specifically, it is hardcoded to load visual assets in a certain timed sequence.  The upside of this method is that you minimize the chances of disk access causing visible stuttering (which is definitely a problem with any AttractMode theme you'd care to name).  The downside is that you have no choice but to wait on those assets to load if you want to see more than just the game logo.  A video snap, for example, always waits exactly 1.0 seconds before loading.  And as we all know, the video assets that have been widely distributed all spend their first second fading in from black.  That is a long time to wait just to get an idea of what the game looks like in action, especially if you're specifically trying to skim through titles to find something interesting.

It's a big enough problem that I consider my purchase a complete waste, on top of other issues like the extremely long loading time, the unresponsiveness of the interface, and the fact that wheels can't be told to have a sub-100ms transition time.  Basically I'm glad AttractMode exists, and just sincerely wish the dev would take those few minutes to flip a switch so the PC version can get videos playing with hardware decoding.