News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Power consumption tests playing videos on my Swift

    Posted on Ascaris Comment on the AskWoody Lounge

    Home Forums AskWoody support Non-Windows operating systems Linux – all distros Power consumption tests playing videos on my Swift

    Viewing 0 reply threads
    • Author
      Posts
      • #2313254 Reply
        Ascaris
        AskWoody_MVP

        Now that Firefox has proper hardware video decoding support in Linux, I decided to test Firefox 83 vs. Chromium 87 (Saiarcot895 PPA, with hardware video decode enabled) vs. my media player of choice, SMPlayer with MPV as the backend.

        Previously, I had found that while the new video hardware decode option in Firefox 80 (in Linux) noticeably improved the performance of video playback, there was not much difference in power consumption. Hardware video decoding reduces the CPU utilization, but it does that by offloading the task to the GPU, whose load naturally increases. There have been reports on some laptops that enabling hardware decoding may actually increase power consumption as the integrated GPU is loaded more heavily. Mine, fortunately, was not one of those, but I had hoped for a noticeable decrease in power usage with the new hardware decode feature. In contrast, the media player standalone used noticeably less power than Firefox.  As this is the laptop I frequently use on battery while I am out and about, it’s the one where saving power matters the most, as each bit saved means longer run time on the battery.

        Now Firefox is at version 83, so there have been a few more releases that have the hardware video decode acceleration through Linux’s VAAPI (Video Acceleration API). Had it improved?

        I put each browser to the test, playing a nearly 3 minute segment of a Youtube video at 1920×1080 resolution at 60 fps, with and without VAAPI. I also tested the media player with VAAPI (it’s had hardware decode for a long time, so there’s nothing new there, whereas in Firefox, VAAPI support is new, and it’s not in the official builds of Chromium yet, so it’s worth investigating whether there is a benefit compared to the old normal).

        First up is the media player, SMPlayer + MPV. There was no doubt in my mind it was going to win, but the question was by how much. Even on Windows, where the Firefox and Chrome hardware video decoding feature is much more mature, a media player will still beat them.

        Over the 2:55 length of the test, the media player drew an average of 8.36 watts. It used the h.264 codec rather than Youtube’s preferred VP9, and there does not seem to be a GUI-based way to change that. In the browser tests, both Firefox and Chromium showed lower power consumption with VP9 than h.264 while using VAAPI. I don’t know if that applies to the media player as well, and I will restest it with VP9 if I find out how it can be done.

        Next came Chromium 87. With VAAPI decoding disabled and with the VP9 encoding, it drew 9.62 watts average over the course of the video. That rose slightly to 9.68 watts using the h.264 encoding.

        With VAAPI enabled and with VP9, the power consumption dropped to 9.19 watts.

        Finally, it was time for Firefox 83. With VAAPI off, it scored 9.63 watts average, using h.264. I haven’t tested Firefox 83 with VP9 with hardware acceleration off yet, and that wasn’t really the focus here. I would expect it to go down by a small bit.

        With VAAPI enabled and with VP9, the power consumption dropped to 8.93 watts, more than a quarter of a watt lower than Chromium, but still more than half a watt higher than the dedicated media player.

        The code for hardware video decoding has been in Chrome for a while, but it’s disabled by Google, even though when it is enabled, it’s still hidden behind a flag that the user must enable to turn it on. They unblock it when it comes to Chromebooks, but they’ve refused to with standard Linux Chrome/Chromium, supposedly because of fears of compatibility issues leading to problems. It’s been that way since long before Firefox got on board with VAAPI support, but already Firefox has managed to best Chromium not only in coming to market with hardware decoding in a released product, but also in the power consumption when it gets there. Not bad at all, Mozilla!

         

         

        Group "L" (KDE Neon Linux 5.20.4 User Edition)

    Viewing 0 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Power consumption tests playing videos on my Swift

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.