You are not logged in.

#26 2019-02-10 17:05:05

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: chromium: hardware video acceleration with VA-API

OdinEidolon wrote:

`vlc` seems to require `libva-intel-driver`, so I'll just keep them both installed.

PS: VP9 vides are not HW decoded in any case, on my XPS15 with SKL (i5-6300HQ).
PPS: I use the ImprovedTube extension to force h264.

VP9 isn't supported in hw SKL iGPU's: https://github.com/intel/media-driver/b … a-features

I use a SKL chip, but it is possible to get vlc using vaapi: https://wiki.videolan.org/VLC_GPU_Decoding/#VA-API

You'll see terminal output like:

$ vlc some_file.mkv
VLC media player 3.0.6 Vetinari (revision 3.0.6-0-g5803e85f73)
[000056411bece570] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000056411c005a60] main audio output error: too low audio sample frequency (0)
[00007f56e8ce89f0] main decoder error: failed to create audio output
[000056411c005a60] vlcpulse audio output error: digital pass-through stream connection failure: Not supported
[000056411c005a60] main audio output error: module not functional
[00007f56e8ce89f0] main decoder error: failed to create audio output
[00007f56e8c11fc0] avcodec decoder: Using Intel iHD driver - 1.0.0 for hardware decoding
QObject::~QObject: Timers cannot be stopped from another thread

Offline

#27 2019-02-10 17:31:16

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: chromium: hardware video acceleration with VA-API

I'm getting following message spammed when running in a Plasma Wayland session using intel modesetting (i.e. no xf86-video-intel) with both the intel-media-driver and the libva-intel-driver:

[24836:24836:0210/113018.305810:ERROR:gl_surface_presentation_helper.cc(237)] GetVSyncParametersIfAvailable() failed!

Here's outputs of vainfo for both:

$ LIBVA_DRIVER_NAME=iHD vainfo
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel iHD driver - 1.0.0
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
$ LIBVA_DRIVER_NAME=i965 vainfo
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointStats
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointStats
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointStats
      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
      VAProfileHEVCMain               :	VAEntrypointEncSlice

And here's my card:

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06) (prog-if 00 [VGA controller])
	DeviceName:  Onboard IGD
	Subsystem: Dell HD Graphics 530 [1028:06e5]
	Flags: bus master, fast devsel, latency 0, IRQ 129
	Memory at db000000 (64-bit, non-prefetchable) [size=16M]
	Memory at 90000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [40] Vendor Specific Information: Len=0c <?>
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [100] Process Address Space ID (PASID)
	Capabilities: [200] Address Translation Service (ATS)
	Capabilities: [300] Page Request Interface (PRI)
	Kernel driver in use: i915
	Kernel modules: i915

And lastly, here's my chromium-flags.conf

$ cat .config/chromium-flags.conf
#VAAPI is enabled by default with the current patch, so there's no need for --enable-accelerated-* flags 
#--enable-accelerated-video
#--enable-accelerated-mjpeg-decode

#Enabling CheckerImaging is no longer needed, since it is now used if an image has async=true.
#--enable-features="CheckerImaging"

#To force GPU acceleration, append the following flags to persistent configuration:
--enable-gpu-rasterization
--ignore-gpu-blacklist
--enable-native-gpu-memory-buffers
--enable-zero-copy

#Additionally --disable-gpu-driver-bug-workarounds has been tested and confirmed to remove video freezes (especially when watching in fullscreen).
--disable-gpu-driver-workarounds

#Same problem with hardware acceleration enabled logs was flooded with gigabytes of: [5558:5558:1025/015619.746665:ERROR:gl_surface_presentation_helper.cc(237)] GetVSyncParametersIfAvailable() failed! So added the following flag: --use-gl=egl
#https://bugs.chromium.org/p/chromium/issues/detail?id=879929
#--use-gl=egl

Any ideas?

--edit:corrected mistyped location of chromium-flags.conf

Last edited by CarbonChauvinist (2019-02-10 22:51:13)


"the wind-blown way, wanna win? don't play"

Offline

#28 2019-02-10 17:31:45

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: chromium: hardware video acceleration with VA-API

miomio wrote:
OdinEidolon wrote:

`vlc` seems to require `libva-intel-driver`, so I'll just keep them both installed.

PS: VP9 vides are not HW decoded in any case, on my XPS15 with SKL (i5-6300HQ).
PPS: I use the ImprovedTube extension to force h264.

VP9 isn't supported in hw SKL iGPU's: https://github.com/intel/media-driver/b … a-features

I use a SKL chip, but it is possible to get vlc using vaapi: https://wiki.videolan.org/VLC_GPU_Decoding/#VA-API

You'll see terminal output like:

$ vlc some_file.mkv
VLC media player 3.0.6 Vetinari (revision 3.0.6-0-g5803e85f73)
[000056411bece570] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000056411c005a60] main audio output error: too low audio sample frequency (0)
[00007f56e8ce89f0] main decoder error: failed to create audio output
[000056411c005a60] vlcpulse audio output error: digital pass-through stream connection failure: Not supported
[000056411c005a60] main audio output error: module not functional
[00007f56e8ce89f0] main decoder error: failed to create audio output
[00007f56e8c11fc0] avcodec decoder: Using Intel iHD driver - 1.0.0 for hardware decoding
QObject::~QObject: Timers cannot be stopped from another thread

Yeah for me vlc, mpv and smplayer all work with e.g. x264.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#29 2019-02-10 21:04:06

maximbaz
Package Maintainer (PM)
Registered: 2017-12-28
Posts: 54

Re: chromium: hardware video acceleration with VA-API

FYI, intel-media-driver has a bug with fast forwarding videos in H264 format, VP9 works fine.

Offline

#30 2019-02-10 22:39:12

once
Member
From: Taiwan
Registered: 2006-09-12
Posts: 268

Re: chromium: hardware video acceleration with VA-API

.config/chromium/chromium-flags.conf or .config/chromium-flags.conf, which?

Offline

#31 2019-02-10 22:41:48

maximbaz
Package Maintainer (PM)
Registered: 2017-12-28
Posts: 54

Re: chromium: hardware video acceleration with VA-API

Offline

#32 2019-02-11 00:55:03

once
Member
From: Taiwan
Registered: 2006-09-12
Posts: 268

Re: chromium: hardware video acceleration with VA-API

chrome://gpu
* Native GpuMemoryBuffers: Hardware accelerated

but,

*GpuMemoryBuffers Status
R_8    Software only
R_16    Software only
RG_88    Software only
BGR_565    Software only
RGBA_4444    Software only
RGBX_8888    Software only
RGBA_8888    Software only
BGRX_8888    Software only
BGRX_1010102    Software only
RGBX_1010102    Software only
BGRA_8888    Software only
RGBA_F16    Software only
YVU_420    Software only
YUV_420_BIPLANAR    Software only
UYVY_422    Software only

Offline

#33 2019-02-11 01:45:24

maximbaz
Package Maintainer (PM)
Registered: 2017-12-28
Posts: 54

Re: chromium: hardware video acceleration with VA-API

Someone knowledgeable might explain the details, but I can assure you I have the same, and yet HW acceleration works, the CPU usage is definitely smaller, intel_gpu_top is showing correct output, and video playback is nice and smooth smile

Offline

#34 2019-02-11 18:18:23

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: chromium: hardware video acceleration with VA-API

once wrote:

chrome://gpu
* Native GpuMemoryBuffers: Hardware accelerated

but,

*GpuMemoryBuffers Status
R_8    Software only
R_16    Software only
RG_88    Software only
BGR_565    Software only
RGBA_4444    Software only
RGBX_8888    Software only
RGBA_8888    Software only
BGRX_8888    Software only
BGRX_1010102    Software only
RGBX_1010102    Software only
BGRA_8888    Software only
RGBA_F16    Software only
YVU_420    Software only
YUV_420_BIPLANAR    Software only
UYVY_422    Software only

Have you tried the any of the following flags:

https://peter.sh/experiments/chromium-c … deo-frames
https://peter.sh/experiments/chromium-c … ry-buffers

?

I have this being reported too, except I'm using Brave Browser and I think the Brave team have removed some of the flags that Chrome/Chromium accepts, including these.

Offline

#35 2019-02-17 19:09:27

RainmakerRaw
Member
Registered: 2015-03-30
Posts: 11

Re: chromium: hardware video acceleration with VA-API

I've found iHD (intel-media-driver) to be slightly 'better' than the old i965 driver. My system:

Intel Core i7 8700k 6c12t (5GHz all core @ 1.32v),
Intel UHD graphics 630,
32GB DDR4 3400MHz CL16 (4x 8GB TeamGroup '8Pack Edition' Samsung B-die), 
128GB Samsung Evo 960 nVME SSD,
arch-desktop 4.20.10-2-ck-skylake #1 SMP PREEMPT Sat Feb 16 15:29:42 EST 2019 x86_64 GNU/Linux
Cinnamon Desktop Environment 4.0.9
Chromium 72.0.3626.109 Arch Linux
intel-media-driver 18.4.1-1
intel-media-sdk (AUR) 1:2018.4.0-1

My vainfo:

> vainfo                                                                          ~
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel iHD driver - 1.0.0
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

Chromium's chrome://gpu report:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Unavailable
Rasterization: Software only. Hardware acceleration disabled
Skia Deferred Display List: Disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Hardware accelerated
Viz Service Display Compositor: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Problems Detected
Protected video decoding with swap chain is for Windows and Intel only
Disabled Features: protected_video_decode
Skia renderer is not used by default.
Disabled Features: skia_renderer
Skia deferred display list is not used by default.
Disabled Features: skia_deferred_display_list
Version Information
Data exported	2019-02-17T19:02:52.777Z
Chrome version	Chrome/72.0.3626.109
Operating system	Linux 4.20.10-2-ck-skylake
Software rendering list URL	https://chromium.googlesource.com/chromium/src/+/fae8db7ab9280fa6704a59980263c804f809ebd5/gpu/config/software_rendering_list.json
Driver bug list URL	https://chromium.googlesource.com/chromium/src/+/fae8db7ab9280fa6704a59980263c804f809ebd5/gpu/config/gpu_driver_bug_list.json
ANGLE commit id	unknown hash
2D graphics backend	Skia/72 7a1e00421d97a1f4f171dd2a8f817f9b07c9cdfd-
Command Line	/usr/lib/chromium/chromium --disable-gpu-driver-bug-workarounds --enable-accelerated-mjpeg-decode --enable-accelerated-video --enable-native-gpu-memory-buffers --flag-switches-begin --force-gpu-rasterization --enable-oop-rasterization --enable-zero-copy --enable-lcd-text --enable-smooth-scrolling --enable-features=NativeNotifications,ParallelDownloading,PdfIsolation,VizDisplayCompositor,WebRTC-H264WithOpenH264FFmpeg --disable-features=HappinessTrackingSurveysForDesktop --flag-switches-end
Driver Information
Initialization time	16
In-process GPU	false
Passthrough Command Decoder	false
Sandboxed	false
GPU0	VENDOR = 0x8086 [Intel Open Source Technology Center], DEVICE= 0x3e92 [Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) ] *ACTIVE*
Optimus	false
AMD switchable	false
Driver vendor	Mesa
Driver version	18.3.3
Driver date	
GPU CUDA compute capability major version	0
Pixel shader version	4.50
Vertex shader version	4.50
Max. MSAA samples	16
Machine model name	
Machine model version	
GL_VENDOR	Intel Open Source Technology Center
GL_RENDERER	Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)
GL_VERSION	4.5 (Core Profile) Mesa 18.3.3
GL_EXTENSIONS	GL_3DFX_texture_compression_FXT1 GL_AMD_conservative_depth GL_AMD_depth_clamp_separate GL_AMD_draw_buffers_blend GL_AMD_gpu_shader_int64 GL_AMD_multi_draw_indirect GL_AMD_query_buffer_object GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export GL_AMD_shader_trinary_minmax GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_APPLE_object_purgeable GL_ARB_ES2_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_2_compatibility GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_compressed_texture_pixel_storage GL_ARB_compute_shader GL_ARB_conditional_render_inverted GL_ARB_conservative_depth GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_indirect GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_shader GL_ARB_fragment_shader_interlock GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader_int64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_occlusion_query2 GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_post_depth_coverage GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_ballot GL_ARB_shader_bit_encoding GL_ARB_shader_clock GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_stencil_export GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shader_texture_lod GL_ARB_shader_viewport_layer_array GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map_array GL_ARB_texture_filter_anisotropic GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ATI_blend_equation_separate GL_ATI_texture_float GL_EXT_abgr GL_EXT_blend_equation_separate GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_polygon_offset_clamp GL_EXT_provoking_vertex GL_EXT_shader_framebuffer_fetch GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_shader_integer_mix GL_EXT_shader_samples_identical GL_EXT_texture_array GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_IBM_multimode_draw_arrays GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_INTEL_shader_atomic_float_minmax GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_debug GL_KHR_no_error GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_sliced_3d GL_MESA_pack_invert GL_MESA_shader_integer_functions GL_MESA_texture_signed_rgba GL_NV_conditional_render GL_NV_depth_clamp GL_NV_fragment_shader_interlock GL_NV_packed_depth_stencil GL_NV_texture_barrier GL_OES_EGL_image GL_S3_s3tc
Disabled Extensions	
Disabled WebGL Extensions	
Window system binding vendor	SGI
Window system binding version	1.4
Window system binding extensions	GLX_ARB_create_context GLX_ARB_create_context_no_error GLX_ARB_create_context_profile GLX_ARB_create_context_robustness GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB GLX_ARB_multisample GLX_EXT_create_context_es_profile GLX_EXT_create_context_es2_profile GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB GLX_EXT_import_context GLX_EXT_libglvnd GLX_EXT_no_config_context GLX_EXT_texture_from_pixmap GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_copy_sub_buffer GLX_OML_swap_method GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group GLX_INTEL_swap_event
Window manager	Mutter (Muffin)
XDG_CURRENT_DESKTOP	X-Cinnamon
GDMSESSION	cinnamon
Compositing manager	Yes
Direct rendering	Yes
Reset notification strategy	0x8252
GPU process crash count	0
System visual ID	32
RGBA visual ID	350
Compositor Information
Tile Update Mode	Zero-copy
Partial Raster	Enabled
GpuMemoryBuffers Status
R_8	Software only
R_16	Software only
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	Software only
BGRX_8888	Software only
BGRX_1010102	Software only
RGBX_1010102	Software only
BGRA_8888	Software only
RGBA_F16	Software only
YVU_420	Software only
YUV_420_BIPLANAR	Software only
UYVY_422	Software only
Display(s) Information
Info	Display[8565044839291973] bounds=[0,0 1920x1080], workarea=[0,0 1920x1040], scale=1, external.
Color space information	{primaries:INVALID, transfer:INVALID, matrix:INVALID, range:INVALID}
Bits per color component	8
Bits per pixel	24
Video Acceleration Information
Decode h264 baseline	up to 4096x4096 pixels
Decode h264 main	up to 4096x4096 pixels
Decode h264 high	up to 4096x4096 pixels
Decode vp8	up to 4096x4096 pixels
Decode vp9 profile0	up to 4096x4096 pixels
Encode h264 baseline	up to 4096x4096 pixels and/or 30.000 fps
Encode h264 main	up to 4096x4096 pixels and/or 30.000 fps
Encode h264 high	up to 4096x4096 pixels and/or 30.000 fps
Encode vp8	up to 1920x1920 pixels and/or 30.000 fps
Log Messages
[9744:9744:0217/182347.022311:ERROR:sandbox_linux.cc(364)] : InitializeSandbox() called with multiple threads in process gpu-process.
[9744:9744:0217/183821.262913:ERROR:vaapi_wrapper.cc(1149)] : Failed syncing surface VA error: internal decoding error

YouTube videos using either VP9 or H264 show (intel_gpu_top from intel-gpu-tools) shows that the video decode part of the graphics card is active, and so is the 'video-improve' (whatever that is). With the i965 driver, the video-improve section is always at 0%. I'm assuming this is a new feature/capability of the media-driver vs the old libva-driver.

Either way, CPU usage is still much higher on Linux than on Windows or macOS (no matter whether using i965 or iHD). Using the same Chromium build on Windows 10, watching a 1080p YouTube video in VP9 or H264, gives CPU usage of around 2% to 3%. Under Linux, the same YouTube video with the same settings uses 12% to 15% CPU. That's a huge difference; especially when you consider that's >6x more resources of a 12 thread 5GHz CPU doing the same task.  neutral Is this simply what we can expect due to driver abilities? Or is this a Chromium (and/or vaapi patch) issue? Could something else be tweaked?

Edit: A word.

Last edited by RainmakerRaw (2019-02-17 19:12:13)

Offline

#36 2019-02-17 19:10:44

RainmakerRaw
Member
Registered: 2015-03-30
Posts: 11

Re: chromium: hardware video acceleration with VA-API

miomio wrote:
once wrote:

chrome://gpu
* Native GpuMemoryBuffers: Hardware accelerated

but,

*GpuMemoryBuffers Status
R_8    Software only
R_16    Software only
RG_88    Software only
BGR_565    Software only
RGBA_4444    Software only
RGBX_8888    Software only
RGBA_8888    Software only
BGRX_8888    Software only
BGRX_1010102    Software only
RGBX_1010102    Software only
BGRA_8888    Software only
RGBA_F16    Software only
YVU_420    Software only
YUV_420_BIPLANAR    Software only
UYVY_422    Software only

Have you tried the any of the following flags:

https://peter.sh/experiments/chromium-c … deo-frames
https://peter.sh/experiments/chromium-c … ry-buffers

?

I have this being reported too, except I'm using Brave Browser and I think the Brave team have removed some of the flags that Chrome/Chromium accepts, including these.

What GPU are you using, 'once'? If it's integrated Intel graphics then software memory buffers is normal and expected (see the Intel GitHub repo for intel-media-driver).

Offline

#37 2019-02-19 13:20:47

kmahyyg
Member
Registered: 2019-02-19
Posts: 1

Re: chromium: hardware video acceleration with VA-API

Hey guys,

If you are moving from `aur/chromium-vaapi-bin` with Intel KabyLake+ CPU, and use `aur/intel-media-stack-bin` as your VAAPI driver, please note that you may need to uninstall `aur/intel-media-stack-bin` first as it offers VA-API 1.3 and this chromium build needs at least VA-API 1.4

You should use `community/intel-media-driver 18.4.1-1` instead, and trying to the following contents into `/etc/profile.d/intel-media-driver.sh`:

```
export LIBVA_DRIVERS_PATH=/usr/lib/dri
export LIBVA_DRIVER_NAME=iHD
```

So that after set the correct flag of chromium, you could enjoy your VAAPI-enabled chromium now.

Offline

#38 2019-03-01 17:33:47

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

They should have done that years ago, but better late than never.

Offline

#39 2019-03-03 10:17:50

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

I want to show something quite funny. Take a look here: https://bugzilla.mozilla.org/show_bug.cgi?id=1210729

Reported 4 years ago and Mozilla devs saying it could not be done. They also restricted the bug report to devs only. Never assigned.

Now that Chromium has accepted vaapi patches to expose hardware decoding on Linux, the bug is assigned to a Mozilla developer and maybe in the future also Firefox could have hardware decoding on Linux.

Last edited by digitalone (2019-03-03 10:18:52)

Offline

#40 2019-03-03 17:22:20

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: chromium: hardware video acceleration with VA-API

The Mozilla bugzilla is a development tool, meant for Mozilla developers to do actual work. It is not an advocacy platform. Everything that is not directly related to developing a new feature or fixing a bug is spam. And these video decoding bugs have been spammed a lot, that's why the restrictions on them.

Another point, in order to have hardware decoded video be part of a webpage, a browser first needs hardware accelerated webpage rendering. Firefox simply does not have that on Linux, not in a working state at least. Mozilla has been developing a new renderer for some now, called Webrender. Unlike their current renderer (which only works well in D3D mode, so on Windows), Webrender one is designed to also work on Linux. It needs to be finished first before Mozilla can begin tackling hardware video decoding.

Keep the two points above in mind when thinking of hardware decoding in Firefox. They are very important points and there's absolutely nothing "funny" about them.

Offline

#41 2019-03-06 15:18:14

yorrd
Member
Registered: 2013-07-21
Posts: 71

Re: chromium: hardware video acceleration with VA-API

I can't open chromium at the moment, it stops with the error

[3485:3485:0306/161557.240434:ERROR:vaapi_wrapper.cc(324)] vaInitialize failed: unknown libva error

I do have nvidia-utils and libva-intel-driver installed (graphics card is a gtx 970, tried the intel driver because I'm desperate).

Any pointers?

Offline

#42 2019-03-06 15:27:53

seth
Member
Registered: 2012-09-03
Posts: 59,362

Re: chromium: hardware video acceleration with VA-API

You need https://aur.archlinux.org/packages/libv … -chromium/ and you might have to recompile that for changes in the underlying libs.
The intel driver is pointless if you don't have an intel chip. Drop that.

Online

#43 2019-03-06 15:37:29

yorrd
Member
Registered: 2013-07-21
Posts: 71

Re: chromium: hardware video acceleration with VA-API

@seth, thanks. I removed the intel package and recompiled libva-vdpau-driver-chromium. The error is gone, chromium still refuses to start. Only log output are the usual gtk warnings.

If it means anything: google-chrome-stable shows the same behavior

Offline

#44 2019-03-06 15:41:40

seth
Member
Registered: 2012-09-03
Posts: 59,362

Re: chromium: hardware video acceleration with VA-API

Except that we don't have the slightest clue that this is due to VAAPI.
Check glxinfo, the process list (eg. for running chromium zombies) and the behavior on a fresh account (or at least move away ~/.config/chromium) and prbably start a new thread.

Online

#45 2019-03-06 18:16:46

yorrd
Member
Registered: 2013-07-21
Posts: 71

Re: chromium: hardware video acceleration with VA-API

Yeah, I just assumed so because there was a VAAPI issue before and chromium used to work before I updated to version 72 yesterday.

Thanks. it works with a new profile, will migrate my old data (or just rely on synch). Thanks a bunch, reinstalling libva-vdpau-driver-chromium ended up fixing the real issue!

Offline

#46 2019-03-08 09:47:16

samurai
Member
From: Turkey
Registered: 2010-04-03
Posts: 28

Re: chromium: hardware video acceleration with VA-API

Just reporting. Intel HD 520, intel-media-driver. Very unstable for me.

Though I don't care really. Firefox is just perfect. Even if it works on Chromium beautifully, I don't think I'll switch to Chromium.

Offline

#47 2019-03-08 10:11:54

marc1n
Member
Registered: 2015-09-24
Posts: 3

Re: chromium: hardware video acceleration with VA-API

On Raven Ridge (Ryzen 2500U with Vega 8)  every time i try to play youtube videos my system crashes. Had to diasable all hardware acceleration for now. Kernel 5.0, xf86-video-amdgpu 18 and 19.
Mpv with va-api works perfectly well.

Offline

#48 2019-03-08 13:05:17

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

AMD Radeon R2 Mullins, Sea Island Family, everything works like a charm with radeon drivers, amdgpu very unstable on my system.

Offline

#49 2019-03-11 22:54:52

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

I noticed that hardware decoding is not working when playing DRM content (Netflix stuff), even though Hardware Protected Video Decode is shown as Hardware accelerated in chrome://gpu. Someone knows why?

Last edited by digitalone (2019-03-11 22:55:09)

Offline

#50 2019-03-11 23:14:56

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: chromium: hardware video acceleration with VA-API

Hey digitalone,

This might be useful to you https://github.com/asciidisco/plugin.vi … -405550560

Netflix's license policy for WideVine restricts decoding to software only (see this comment). ... For Netflix there's no way.

Cheers,
Regards

Offline

Board footer

Powered by FluxBB