Hi,
Not sure if this is the right place to ask this ... please direct me elsewhere if not.
it looks like hardware decoding of h264 under linux/wayland should be operational? Is this the correct assumption?
I tried this on ubuntu 22.04 and 24.04. 22.04 has a runtime vaapi that is older than the buildtime one - so that failed (IsLibVACompatible). 24.04 has a new enough version so I continued testing from there
I have tried the chromium snap as well as my own debug build and release build. I have tried 133 and 135.
I have tried with the following :
tmp=$(mktemp -d)
bindir=$HOME/distrib/chrome/135.0.7021.0/Debug
$bindir/chrome \
--no-sandbox \
--ozone-platform=wayland \
--use-gl=angle --use-angle=gl \
--user-data-dir=${tmp} \
--enable-features=VaapiVideoDecodeLinuxGL \
--enable-logging=stderr --v=0 --vmodule='*media*=1,*vaapi*=3' \
--remote-allow-origins='*' --remote-debugging-port=9222 \
--kiosk file:///home/labs/videos/gradtest_v1_h264_main_20MBit.mp4
I have tried many other arguments, enabling/disabling features etc.
intel_gpu_top confirms the lack of HW decoding, and top backs this up with high chrome CPU usage.
Vaapi Info as reported by chrome (I added the BUILDTIME log message for debugging purposes) :
VAAPI RUNTIME version: 1.20 Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
VAAPI BUILDTIME version: 1.17
I am quite new to debugging chromium although I have built it (and CEF) quite a few times. I am struggling to get any more out of the logs that will help me understand why this isnt working. If I enable too much logging it's a flood of info and I don't know how to filter it down as I don't know where the location of the log message might be - and therefore its vmodule search pattern. The most relevant logs I have from the above command is :
[334305:334305:0226/105707.450513:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"event":"kLoad","url":"file:///home/labs/videos/gradtest_v1_h264_main_20MBit.mp4"}
[334305:334305:0226/105707.453421:VERBOSE1:web_media_player_impl.cc(1253)] SetLatencyHint(nan)
[334163:334163:0226/105707.759954:WARNING:idle_linux.cc(110)] None of the known D-Bus ScreenSaver services could be used.
[334163:334163:0226/105707.852907:ERROR:wayland_surface.cc(499)] Not implemented reached in std::optional<bool> ui::WaylandSurface::SetExplicitSync()
[334163:334163:0226/105707.852957:ERROR:wayland_surface.cc(439)] Not implemented reached in bool ui::WaylandSurface::SetExplicitSyncLegacy()
[334305:334305:0226/105707.998835:VERBOSE1:web_media_player_impl.cc(2869)] MultiBufferDataSourceInitialized
[334305:334305:0226/105707.999207:VERBOSE1:web_media_player_impl.cc(2851)] DataSourceInitialized
[334163:334163:0226/105708.001289:VERBOSE1:frameless_media_interface_proxy.cc(40)] Add
[334305:334339:0226/105708.033516:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"event":"kPipelineStateChange","pipeline_state":"kStarting"}
[334305:334339:0226/105708.038179:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"FFmpegDemuxer: created video stream, config codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [3840,2160], visible rect: [0,0,3840,2160], natural size: [3840,2160], has extra data: true, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"}
[334305:334339:0226/105708.038686:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"FFmpegDemuxer: created audio stream, config codec: aac, profile: unknown, bytes_per_channel: 4, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Float 32-bit planar, bytes_per_frame: 8, seek_preroll: 0us, codec_delay: 0, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: NONE, target_output_sample_format: Unknown sample format, has aac extra data: true"}
[334305:334339:0226/105708.038915:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"duration":30.0,"event":"kDurationChanged"}
[334163:334182:0226/105708.040624:VERBOSE1:media_stream_manager.cc(1501)] RFAOSF::RequestDeviceAuthorization({device_id=}) [process_id=5, frame_id=1]
[334305:334305:0226/105708.045985:VERBOSE1:web_media_player_impl.cc(2079)] OnMetadata
[334305:334305:0226/105708.049789:VERBOSE1:web_media_player_impl.cc(3103)] SetReadyState(1)
[334305:334305:0226/105708.050539:VERBOSE1:web_media_player_impl.cc(1054)] Pause
[334305:334305:0226/105708.050750:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"event":"kPause"}
[334163:334182:0226/105708.467451:VERBOSE1:media_stream_manager.cc(1501)] RFAOSF::AuthorizationCompleted({status=OK}, {params=format: PCM_LOW_LATENCY, channel_layout: 3, channels: 2, sample_rate: 44100, frames_per_buffer: 512, effects: NONE, mic_positions: }, {device_id=default}) [process_id=5, frame_id=1]
[334163:334182:0226/105708.467511:VERBOSE1:media_stream_manager.cc(1501)] RFAOSF::AuthorizationCompleted => (authorization time=426 ms) [process_id=5, frame_id=1]
[334305:334339:0226/105708.469073:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 4, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Float 32-bit planar, bytes_per_frame: 8, seek_preroll: 0us, codec_delay: 0, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: true"}
[334305:334339:0226/105708.470003:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Cannot select VaapiVideoDecoder for video decoding"}
[334305:334339:0226/105708.470303:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Cannot select DecryptingVideoDecoder for video decoding"}
[334305:334305:0226/105708.470527:VERBOSE1:media_interface_factory.cc(70)] CreateVideoDecoder
[334305:334339:0226/105708.470622:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Cannot select VpxVideoDecoder for video decoding"}
[334305:334305:0226/105708.470634:VERBOSE1:media_interface_factory.cc(225)] GetMediaInterfaceFactory
[334305:334339:0226/105708.470855:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Cannot select Dav1dVideoDecoder for video decoding"}
[334163:334163:0226/105708.471421:VERBOSE1:media_interface_proxy.cc(235)] MediaInterfaceProxy
[334163:334182:0226/105708.474170:VERBOSE1:media_stream_manager.cc(1501)] AMB::MakeAudioOutputStream({device_id=}, {params=[format: PCM_LOW_LATENCY, channel_layout: 3, channels: 2, sample_rate: 44100, frames_per_buffer: 1024, effects: MULTIZONE, mic_positions: ]})
[334163:334182:0226/105708.474306:VERBOSE1:media_stream_manager.cc(1501)] PAOS::PulseAudioOutputStream({device_id=default}, {params=[format: PCM_LOW_LATENCY, channel_layout: 3, channels: 2, sample_rate: 44100, frames_per_buffer: 1024, effects: MULTIZONE, mic_positions: ]}) [this=0x3384000a6e80]
[334163:334182:0226/105708.474592:VERBOSE1:media_stream_manager.cc(1501)] AMB::MakeAudioOutputStream => (number of streams=1)
[334163:334182:0226/105708.474684:VERBOSE1:media_stream_manager.cc(1501)] PAOS::Open() [this=0x3384000a6e80]
[334305:334339:0226/105708.475865:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"info":"Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [3840,2160], visible rect: [0,0,3840,2160], natural size: [3840,2160], has extra data: true, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"}
[334305:334339:0226/105708.476302:VERBOSE1:batching_media_log.cc(37)] MediaEvent: {"event":"kPipelineStateChange","pipeline_state":"kPlaying"}
Anyone have any ideas? I do not know where to go from here to find out why the VaapiDecoder is not being selected
Thanks v much,
Robin