RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    x86 ES video preview - high cpu usage

    Scheduled Pinned Locked Moved Help and Support
    emulationstatiox86 ubuntuvideo preview
    5 Posts 2 Posters 648 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      praetorian55
      last edited by

      Did my best to search this out, but most topics revolved around the Pi and OMX player...

      Video preview works great in Carbon theme (using mp4 videos from sselphs scraper) on x86 retropie/emulationstation, but I tracked very heavy CPU usage using top while the videos play. I tested hardware acceleration using the same videos in VLC player and had ~6x <less> CPU usage indicating the hardware acceleration works.

      Are there any settings I need to set in ES to enable hardware acceleration?

      hardware: Intel Atom Z8350
      RetroPie Version Used: 4.4
      Built From: Source using retropie install script on Ubuntu 18.04
      USB Devices connected: 8bitdo sn30
      Controller used: 8bitdo sn30
      Error messages received: NONE - tracked high CPU usage

      How to replicate the problem: Turn on video preview in carbon theme/emulationstation and run top to track CPU usage while videos play

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @praetorian55
        last edited by mitu

        @praetorian55 said in x86 ES video preview - high cpu usage:

        How to replicate the problem

        That's going to be a bit difficult since the problem appears only when using VLC on your particular config, on the PI the OMXPlayer takes care of this automatically.

        In ES, the only setting is toggling between OMXPlayer and the VLC based playback, but in your case OMXPlayer is not available so you always use libVLC.

        How did you test the HW accelerated playback in VLC in your case ?

        P 1 Reply Last reply Reply Quote 0
        • P
          praetorian55 @mitu
          last edited by

          @mitu - Thanks for the info. I tested from the terminal in X - It shows "va-api" is in use and the CPU usage was dramatically reduced in comparison to the same video playing in emulationstation.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @praetorian55
            last edited by

            @praetorian55 OK, try to force libVlc to use the va-api backend by using an environment variable (LIBVA_DRIVER_NAME) (see https://wiki.archlinux.org/index.php/Hardware_video_acceleration#Configuring_VA-API). Check if you get the same hardware accelerated playback in ES after this change.

            P 1 Reply Last reply Reply Quote 0
            • P
              praetorian55 @mitu
              last edited by

              @mitu - Thanks for the link. I added the system environment variables mentioned in the ARCH wiki and verified the were set and showed up using vainfo. VLC itself still was accelerated (~30% CPU), emulationstation was still not @~165% cpu

              pc@pc:~$ vainfo

              libva info: VA-API version 1.1.0
              libva info: va_getDriverName() returns 0
              libva info: User requested driver 'i965'
              libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
              libva info: Found init function __vaDriverInit_1_1
              libva info: va_openDriver() returns 0
              vainfo: VA-API version: 1.1 (libva 2.1.0)
              vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.1.0
              vainfo: Supported profile and entrypoints
              VAProfileMPEG2Simple : VAEntrypointVLD
              VAProfileMPEG2Simple : VAEntrypointEncSlice
              VAProfileMPEG2Main : VAEntrypointVLD
              VAProfileMPEG2Main : VAEntrypointEncSlice
              VAProfileH264ConstrainedBaseline: VAEntrypointVLD
              VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
              VAProfileH264Main : VAEntrypointVLD
              VAProfileH264Main : VAEntrypointEncSlice
              VAProfileH264High : VAEntrypointVLD
              VAProfileH264High : VAEntrypointEncSlice
              VAProfileH264MultiviewHigh : VAEntrypointVLD
              VAProfileH264MultiviewHigh : VAEntrypointEncSlice
              VAProfileH264StereoHigh : VAEntrypointVLD
              VAProfileH264StereoHigh : VAEntrypointEncSlice
              VAProfileVC1Simple : VAEntrypointVLD
              VAProfileVC1Main : VAEntrypointVLD
              VAProfileVC1Advanced : VAEntrypointVLD
              VAProfileNone : VAEntrypointVideoProc
              VAProfileJPEGBaseline : VAEntrypointVLD
              VAProfileJPEGBaseline : VAEntrypointEncPicture
              VAProfileVP8Version0_3 : VAEntrypointVLD
              VAProfileVP8Version0_3 : VAEntrypointEncSlice
              VAProfileHEVCMain : VAEntrypointVLD

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.