Hardware accelerated video playing with Totem

Introduction

Various months ago I had hardware problems. To debug this and because I wanted a small server I bought an Intel NUC5PPYH. It’s a really small low power PC. Using this I discovered that my hardware troubles weren’t related to my SSD. Since that time I’ve been using the NUC as my main machine. My previous machine had upgraded parts, but GPU/motherboard and memory all were from around 2007. A slow low power 2015 NUC is somewhat in the same performance range as that 2007 machine (50% slower in some things, faster in others) while using way less power. My previous machine had 2 cores, the new one has 4.

My previous machine already had difficulty with some of the super high quality videos. Depending on the settings, some videos can use a very high amount of CPU. The CPU of the NUC is slightly slower to play videos.

Initially the various GNOME video playing bits crashed when trying to play video. Those crasher bugs got fixed, but Totem never properly played anything. I quickly discovered that mpv didn’t have any problem with hardware accelerated video playing, so used that and stopped filing bugs.

It helped me to improve the Mageia mpv package. Ensuring it had an OSD, was compiled with vaapi support, etc. Then recently gstreamer-vaapi 0.7.0 was released and gave me the idea to try Totem again. I’m guessing that change made things work, though not exactly sure.

Hardware accelerated video playing

Two frames from Tears of Steel showing Koen Martens, GUADEC 2010 organizer (together with Vincent and Reinout). First screenshot shows Totem with 6-7% CPU usage. The second shows MPV with 3-4% CPU usage. System Monitor itself uses around 20% CPU. Now that it works nicely, I’m working on having Mageia 6 automatically install VAAPI for you if your system has a similar GPU as mine.

Playing 1080p movie using Totem with 6-7% CPU usage
Tears of Steel using Totem – 6-7% CPU
Playing 1080p movie using mpv with 3-4% CPU
Tears of Steel using MPV – 3-4% CPU

Secret bonus: Polari

If you look at the CPU usage, you’ll not spot something. I’m also running Polari on a different workspace. It previously used 10-20% even when idle. I filed a bug but the developer couldn’t reproduce. Now I cannot reproduce as well — 0% CPU!! :-D

3 Replies to “Hardware accelerated video playing with Totem”

  1. I have the same problem with totem. Im running Debian testing so gstreamer-vaapi 0.7.1 . Totem doesnt crash, but doesnt play. So i looked for another player based on gstreamer and found Parole. It has 7mb depencies, so not much and runs with 4% CPU load. System is a Core I5-2520 (Latitude E5520)

  2. Hello,

    did you also notice a stronger tearing effect for moving objects?

    It does not happen with gst-player and totem without gst-vaapi or with mpv, but with gst-vaapi totem shows these effects, as well as gst-player-1.0. Can you confirm this?

  3. Thanks for the article!

    Could you give some additional information about the software you are using? Like version numbers and stuff? I was trying myself to get totem running with hardware acceleration, but failed. When installing gstreamer1.0-vaapi package totem always starts with a black screen. mpv runs flawlessly.
    What are those patches you were referring to?

Comments are closed.