Hardware-accelerated video encode?
-
I noticed the same thing. I think Chromium disabled hardware decode on Linux with version 91.
Although, even when the option was available in previous versions I never had much success getting it to work. In vivaldi:gpu it would say it was available but intel_gpu_top never showed any activity. And I'd end up with high CPU usage and temperatures.
-
@ugly Was it the same with installed intel-media-driver (Intel Media Driver for VAAPI) or intel-vaapi-driver (Intel Driver for Video Acceleration (VA) API for Linux)?
-
@gwen-dragon After some "ducking", i would sadly say that's chromium issue.. they ripped away that option for linux platform... that's my feeling/guessing...
-
@coronium You can get it back by enabling
vivaldi://flags/#temporary-unexpire-flags-m90
first. -
@npro said in Hardware-accelerated video encode?:
vivaldi://flags/#temporary-unexpire-flags-m90
Uh! Thanks I didn't know for that flag...
Now it is as it was to be... tnx again...
However I guess soon that option will be removed from chromium -
@gwen-dragon @coronium Well hardware video acceleration is imo still a mixed-bag/not-really-reliable thing in Linux, unless it's specifically tested that it truly works. Even if the flag is disabled one can use the switch
--enable-features=VaapiVideoDecoder
, thenvivaldi://gpu
would show it's hardware accelerated. -
@npro Thnx, I checked in About page the command line filed:
/usr/bin/vivaldi-stable --flag-switches-begin --enable-gpu-rasterization --enable-quic --enable-zero-copy --ignore-gpu-blocklist --enable-features=ParallelDownloading,UnexpireFlagsM90,VaapiVideoDecoder --flag-switches-end --origin-trial-disabled-features=SecurePaymentConfirmation --disable-smooth-scrolling --save-page-as-mhtml
I guess it is enabled from start. The other question is how good does it work on linux...
-
@coronium said in Hardware-accelerated video encode?:
The other question is how good does it work on linux...
This you have to find out by yourself
-
@coronium said in Hardware-accelerated video encode?:
@ugly Was it the same with installed intel-media-driver (Intel Media Driver for VAAPI) or intel-vaapi-driver (Intel Driver for Video Acceleration (VA) API for Linux)?
I'm not sure. I didn't test both. It's a secondary computer that I set up a while ago as HTPC. I think it's using the intel-media-driver, but I can't be sure.
I'm not sure if it's an Intel issue (it's a Kaby Lake 7100u processor), or if hardwave video decoding support on Linux isn't great, but video performance in general is poor. Even using mpv I get a lot of jitter on playback.
I even tried using Firefox with hardware video decode and while intel_gpu_top did show video activity as if it was using hardware decode, my CPU usage was still like 80%, which is worse than Vivaldi without hardware video decode.
-
@ugly said in Hardware-accelerated video encode?:
Kaby Lake 7100u
Yes, it's hard to say. I managed somehow to have a decent CPU usage (~20%) while playing videos on SMPlayer (mpv backended) or YouTube clips on low-end laptop with Intel Pentium Silver N5000 CPU.
I've installed drivers:
xf86-video-intel
,intel-vaapi-driver
(orintel-media-driver
which works better on my desktop with i7-6700K CPU).
Secondly, I've added configuration file:/etc/X11/xorg.conf.d/20-intel.conf
with content:Section "Device" Identifier "Intel Graphics" Driver "intel" Option "AccelMethod" "SNA" # SNA/UXA/BLT Option "DRI" "3" # Option "TearFree" "on" EndSection
Moreover I was testing even "modesetting" driver:
Section "Device" Identifier "Intel Graphics" Driver "modesetting" Option "AccelMethod" "glamor" Option "PageFlip" "on" EndSection
However the former "intel" driver gave me better performance.
I do not know if it helps.
-
@coronium If I play video through mpv, the CPU does stay around 20%. It's just the jitter that is an issue.
When troubleshooting the issue, I have seen that the 'intel' driver performs better than the 'modesetting' driver. When I switched over to the 'intel' driver, no hardware acceleration worked, so maybe I need to re-install some packages after switching.
Maybe I'll try some of the driver options you have in the 'modesetting' configuration file first.
Thanks for the advice.
-
@ugly Good luck!
-
@gwen-dragon My intention is not to broaden the topic, just to say, maybe will be useful to some, for a while i had a problem with AnyDesk/SNA/DRI3 (KDE) and rendering backend: OpenGL. Accidentally, I found out that rendering backend: XRender solves the problem.
For a few week I was trying many combinations: UXA/BLT, DRI2, DR3, etc.. kernel options... ("modesetting" works well, but it's slow)... etc. and at the end only XRender was working well... and of course it depends on intel system.. (have many intel laptops/desktops and different CPUs)..P.S. .. and what about that slow mouse wheel scrolling in Linux.. can it be solved internally and not with some extension (like "Linux Scroll Speed Fix")?
-
@npro Thank you very much for that tip. I even noticed it when scrolling; unbearable. I miss the Presto days.
-
I am just wondering how could I know for sure that Vivaldi is using hardware video acceleration? Thanks!
-
@coronium Check vivaldi://gpu/.
-
@luetage Thanks, I know that, but I guess, it's at the end not a valid information. I assume that sometimes (on different PC specifications) shows wrongly. (maybe I am wrong, it's only my itch...)
and more, do we (linux users) need to add --use-gl=desktop --enable-features=VaapiVideoDecoder --disable-features=UseOzonePlatform command switches to use HW acc. properly?
I appologize in advance for my lack of knowledgeCheers!
-
@coronium Iām currently starting with
vivaldi-snapshot --enable-features=VaapiVideoDecoder --use-gl=desktop
and I enable the gpu rasterization flag additionally. And yeah, knowing for sure is more advanced. One easy thing you can do of course is checking cpu usage when running videos with and without flags. -
@coronium said in Hardware-accelerated video encode?:
I am just wondering how could I know for sure that Vivaldi is using hardware video acceleration?
Basically this way https://wiki.archlinux.org/title/Chromium#Tips_and_tricks, or checking it out by yourself by looking at your sensors/system monitor, like @luetage said
But I'm not even sure that Vivaldi is compiled with the certain flag enabled to support it, because from previous experimentations (of mine) with it, as far as I remember (Arch's) Chromium utilized it but Vivaldi not (nvidia on X11, no idea about Wayland) ./edit: Just checked my notes and V should utilize it as well. I'm not using it as I have enough CPU power and only a 1.7Mpixel monitor -
@npro Thnx npro. I was fan of Opera (earlier time) and Vivaldi, but I am slowly moving toward to Firefox. By me opinion the Vivaldi doesn't work as expected on Linux.
I was struggling for a while to make it work smoothly. A huge obstacle for me is a "stuttering" and slow mouse-wheel scrolling. Firefox does it better. All functionality of Vivaldi can be added to Firefox by add-ons (for example: automaticDark, Add custom search engine, Offline QR Code Generator, Simple Context Search, Translate Web Pages, uBlock Origin, Undo Close Tab, Translate Web Pages, etc..).I really appreciate a huge effort and hard work of Vivaldi team, however I think the problem is in a chromium project (at least for Linux devices).
Firefox runs everything smoothly, for example adding to prefs.js (or in about:config preferences),
user_pref("app.normandy.enabled", false); user_pref("app.shield.optoutstudies.enabled", false); user_pref("browser.aboutConfig.showWarning", false); user_pref("browser.compactmode.show", true); user_pref("browser.link.open_newwindow.restriction", 0); user_pref("browser.newtabpage.activity-stream.showSearch", false); user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); user_pref("browser.newtabpage.activity-stream.topSitesRows", 6); user_pref("browser.search.context.loadInBackground", true); user_pref("browser.startup.homepage", "about:home"); user_pref("browser.tabs.closeWindowWithLastTab", false); user_pref("browser.toolbars.bookmarks.visibility", "always"); user_pref("browser.uidensity", 1); user_pref("browser.urlbar.placeholderName", "DuckDuckGo"); user_pref("browser.urlbar.suggest.history", false); user_pref("browser.urlbar.suggest.openpage", false); user_pref("browser.urlbar.suggest.searches", false); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("dom.webgpu.enabled", true); user_pref("general.smoothScroll", false); user_pref("gfx.layerscope.enabled", true); user_pref("gfx.use-ahardwarebuffer-content", true); user_pref("gfx.webrender.all", true); user_pref("gfx.webrender.compositor", true); user_pref("gfx.webrender.compositor.force-enabled", true); user_pref("gfx.webrender.enabled", true); user_pref("gfx.webrender.fallback.software", false); user_pref("gfx.webrender.precache-shaders", true); user_pref("gfx.x11-egl.force-enabled", true); user_pref("layers.acceleration.force-enabled", true); user_pref("layers.force-active", true); user_pref("layers.gpu-process.enabled", true); user_pref("layers.gpu-process.force-enabled", true); user_pref("layout.css.devPixelsPerPx", "1.125"); user_pref("media.ffmpeg.vaapi.enabled", true); user_pref("media.ffvpx.enabled", false); user_pref("media.gpu-process-decoder", true); user_pref("media.hardware-video-decoding.force-enabled", true); user_pref("media.navigator.mediadatadecoder_vpx_enabled", true); user_pref("media.rdd-process.enabled", false); user_pref("media.rdd-vpx.enabled", false); user_pref("mousewheel.min_line_scroll_amount", 30); user_pref("privacy.donottrackheader.enabled", true); user_pref("privacy.webrtc.legacyGlobalIndicator", false); user_pref("ui.context_menus.after_mouseup", true); user_pref("webgl.auto-flush.gl", true); user_pref("webgl.enable-ahardwarebuffer", true); user_pref("webgl.force-enabled", true); user_pref("webgl.force-layers-readback", true); user_pref("webgl.msaa-force", true); user_pref("webgl.out-of-process", true); user_pref("webgl.out-of-process.force", true); user_pref("widget.non-native-theme.gtk.scrollbar.allow-buttons", true); user_pref("widget.non-native-theme.scrollbar.size", 12); user_pref("services.sync.prefs.dangerously_allow_arbitrary", true);
as well as h264ify add-on.
Moreover, I can recreate "speed dial" (so called pinned sites) by modifying the userContent.css file in chrome profile folder, for example as:
@-moz-document url(chrome://browser/content/browser.xul), url(about:newtab), url(about:home) { main { width: 80% !important; text-align: center !important; } body { background-image: url("/usr/share/wallpapers/openSUSEdefault/contents/images/1280x1024.jpg") !important; background-size:cover !important; background-repeat: no-repeat !important; background-attachment: fixed !important; --newtab-background-primary-text-color: white !important; /*--newtab-background-color: #2A2A2E !important;*/ --newtab-border-primary-color: #4E4E4C !important; --newtab-border-secondary-color: #282824 !important; --newtab-card-background-color: #232627 !important; --newtab-contextmenu-background-color: #232627 !important; --newtab-element-active-color: rgba(215, 215, 219, 0.6) !important; --newtab-element-hover-color: #12120F !important; --newtab-icon-primary-color: rgba(243, 243, 242, 0.8) !important; --newtab-inner-box-shadow-color: rgba(255, 255, 255, 0.1) !important; --newtab-modal-color: #232627 !important; --newtab-overlay-color: rgba(18, 18, 15, 0.8) !important; --newtab-search-border-color: rgba(249, 249, 250, 0.02) !important; --newtab-search-dropdown-color: #232627 !important; --newtab-search-dropdown-header-color: #232627 !important; --newtab-search-icon-color: rgba(243, 243, 242, 0.4) !important; --newtab-section-active-contextmenu-color: #F3F3F2 !important; --newtab-section-header-text-color: #8C8C8C !important; --newtab-section-navigation-text-color: #8C8C8C !important; --newtab-snippets-background-color: #232627 !important; --newtab-text-conditional-color: #B5B5B0 !important; --newtab-text-primary-color: #F3F3F2 !important; --newtab-text-secondary-color: #8C8C8C !important; --newtab-textbox-background-color: #202023 !important; --newtab-textbox-border: rgba(243, 243, 242, 0.2) !important; --newtab-textbox-focus-boxshadow: 0 0 0 1px #0060DF, 0 0 0 4px rgba(10, 132, 255, 0.3) !important; --newtab-topsites-background-color: rgba(255, 255, 255, 0.4) !important; --newtab-topsites-outer-card-hover: rgba(255, 255, 255, 0.2) !important; --newtab-topsites-label-color: #F3F3F2 !important; --trailhead-cards-background-color: #12120F !important; --trailhead-header-text-color: #D4DEA9 !important; } }
At the end, the Firefox works better on Linux machines and I have more power to adjust it by my needs.
Thanks again for an effort for a help, I appreciate it very much.
Greetings, C.