Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium uses only FFmpegVideoDecoder #89

Closed
Oober opened this issue Jun 22, 2020 · 8 comments
Closed

Chromium uses only FFmpegVideoDecoder #89

Oober opened this issue Jun 22, 2020 · 8 comments

Comments

@Oober
Copy link

Oober commented Jun 22, 2020

I have successfully used Chromium for viewing hardware-accelerated videos for a long time. However, something weird have been happened.

From media-internals:


00:00:05.064 | kVideoDecoderName | "MojoVideoDecoder"
00:00:05.064 | kIsPlatformVideoDecoder | true
00:00:05.065 | info | "Selected MojoVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [320,240], visible rect: [0,0,320,240], natural size: [320,240], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
00:00:05.065 | pipeline_state | "kPlaying"
00:00:05.066 | audio_buffering_state | {"state":"BUFFERING_HAVE_ENOUGH"}
00:00:05.076 | warning | "video fallback to new decoder after initial decode error."
00:00:05.076 | info | "Failed to initialize VpxVideoDecoder"
00:00:05.076 | info | "Failed to initialize Dav1dVideoDecoder"
00:00:05.077 | kIsVideoDecryptingDemuxerStream | false
00:00:05.077 | kVideoDecoderName | "FFmpegVideoDecoder"
00:00:05.077 | kIsPlatformVideoDecoder | false
00:00:05.077 | info | "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [320,240], visible rect: [0,0,320,240], natural size: [320,240], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"


So, it tries to use MojoVideoDecoder but fallbacks into FFmpegVideoDecoder, I am using Nvidia Proprietary Driver and vdpau-va-driver is installed. What happened? Any workarounds?

@Oober
Copy link
Author

Oober commented Jun 24, 2020

Switched to chromium-beta, which works out-of-the-box.

@saiarcot895
Copy link
Owner

If you start Chromium from the command line, what do you see?

@saiarcot895
Copy link
Owner

Also, what version of Chromium is this? What version of Ubuntu are you on?

@Oober
Copy link
Author

Oober commented Jul 6, 2020

This was prior to recent version from chromium-dev ppa. Not tested with the recent version. Mint 19.3.

@gciotta
Copy link

gciotta commented Aug 22, 2020

This is happening to me too. Chromium seems to start with MojoVideoDecoder, and then switches to FFmpegVideoDecoder, emitting the warning video fallback to new decoder after initial decode error. There seem to be signs of a segfault in the commandline output (see below). I am testing with Youtube videos (eg. https://www.youtube.com/watch?v=tVBKto6Cfqo), and have the h264ify extension installed.

I'm using Chromium 86.0.4221.3-0ubuntu1~ppa1~20.04.1 on Kubuntu 20.04.1, freshly installed today on a Thinkpad with an intel i915 video chipset.
vaapi acceleration is correctly configured in the system. mpv -v --hwdec=vaapi works as expected, using hardware decoding through vaapi.

Relevant chrome://media-internals/ output:

00:00:03.852 | info | "Selected MojoVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
00:00:03.852 | pipeline_state | "kPlaying"
00:00:03.853 | audio_buffering_state | {"state":"BUFFERING_HAVE_ENOUGH"}
00:00:03.870 | pipeline_state | "kSeeking"
00:00:03.870 | audio_buffering_state | {"state":"BUFFERING_HAVE_NOTHING"}
00:00:03.875 | pipeline_state | "kPlaying"
00:00:03.876 | audio_buffering_state | {"state":"BUFFERING_HAVE_ENOUGH"}
00:00:03.949 | warning | "video fallback to new decoder after initial decode error."
00:00:03.950 | info | "Failed to initialize DecryptingVideoDecoder"
00:00:03.950 | info | "Failed to initialize VpxVideoDecoder"
00:00:03.950 | info | "Failed to initialize Dav1dVideoDecoder"
00:00:03.951 | kIsVideoDecryptingDemuxerStream | false
00:00:03.951 | kVideoDecoderName | "FFmpegVideoDecoder"
00:00:03.951 | kIsPlatformVideoDecoder | false
00:00:03.951 | info | "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"

vainfo output:

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD

The commandline output seems to show a segmentation fault right when the video decoding starts. The InitializeSandbox() calls are printed right after launching the browser (they are not triggered by the video decoding).

$ chromium-browser 
[3010:3010:0822/144751.511776:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Received signal 11 SEGV_MAPERR 000000000010
#0 0x55801e59f939 (/usr/lib/chromium-browser/chromium-browser+0x41d2938)
#1 0x55801e518703 (/usr/lib/chromium-browser/chromium-browser+0x414b702)
#2 0x55801e59f4e0 (/usr/lib/chromium-browser/chromium-browser+0x41d24df)
#3 0x7fd7bbe063c0 (/usr/lib/x86_64-linux-gnu/libpthread-2.31.so+0x153bf)
#4 0x55801c009b6c (/usr/lib/chromium-browser/chromium-browser+0x1c3cb6b)
#5 0x55801bfecceb (/usr/lib/chromium-browser/chromium-browser+0x1c1fcea)
#6 0x55801bff3b3f (/usr/lib/chromium-browser/chromium-browser+0x1c26b3e)
#7 0x55801bfed3d7 (/usr/lib/chromium-browser/chromium-browser+0x1c203d6)
#8 0x55801bff1559 (/usr/lib/chromium-browser/chromium-browser+0x1c24558)
#9 0x55801bff39fb (/usr/lib/chromium-browser/chromium-browser+0x1c269fa)
#10 0x55801e56c82b (/usr/lib/chromium-browser/chromium-browser+0x419f82a)
#11 0x55801e57d44d (/usr/lib/chromium-browser/chromium-browser+0x41b044c)
#12 0x55801e57d148 (/usr/lib/chromium-browser/chromium-browser+0x41b0147)
#13 0x55801e52c28a (/usr/lib/chromium-browser/chromium-browser+0x415f289)
#14 0x55801e57da5d (/usr/lib/chromium-browser/chromium-browser+0x41b0a5c)
#15 0x55801e550b8e (/usr/lib/chromium-browser/chromium-browser+0x4183b8d)
#16 0x558021b05cc0 (/usr/lib/chromium-browser/chromium-browser+0x7738cbf)
#17 0x55801e034d38 (/usr/lib/chromium-browser/chromium-browser+0x3c67d37)
#18 0x55801e03606c (/usr/lib/chromium-browser/chromium-browser+0x3c6906b)
#19 0x55801e08d0af (/usr/lib/chromium-browser/chromium-browser+0x3cc00ae)
#20 0x55801e034221 (/usr/lib/chromium-browser/chromium-browser+0x3c67220)
#21 0x55801b35b8ce ChromeMain
#22 0x7fd7ba3630b3 __libc_start_main
#23 0x55801b35b72e _start
  r8: 0000000000000000  r9: 0000558027f2a4c0 r10: 00007ffebf57e101 r11: 0000558028532840
 r12: 0000000003a0001c r13: 000055802866bfc8 r14: 0000044000000780 r15: 0000000000000000
  di: 0000000000000000  si: 0000000000000000  bp: 00007ffebf57e080  bx: 0000000000000000
  dx: 0000000003a0001c  ax: b7aac2ebfbfdd500  cx: 0000044000000780  sp: 00007ffebf57df00
  ip: 000055801c009b6c efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000010
[end of stack trace]
Calling _exit(1). Core file will not be generated.
[3209:3209:0822/144755.202188:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

@gciotta
Copy link

gciotta commented Aug 22, 2020

Installing the intel-media-va-driver-non-free vaapi driver makes it work for me. The segfault disappears and MojoVideoDecoder is picked as video decoder. This package replaces intel-media-va-driver which comes installed by default (on Kubuntu, at least).

Details on the non-free package contents: https://github.com/intel/media-driver#components-and-features

@Oober
Copy link
Author

Oober commented Oct 17, 2020

This behavior occurs again in recent build from beta ppa (Version 87.0.4280.20 (Developer Build) Built on Ubuntu 20.04, running on LinuxMint 20 (64-bit)

Nvidia proprietary drivers, vdpau-va-driver installed.

It says there is a "VDA error 4" seen from media-internals. Same behavior; after trying to initialize MojoVideoDecoder, it failbacks into FFMpegDecoder.

@Oober
Copy link
Author

Oober commented Oct 18, 2020

See #91 (comment)

Might be a duplicate.

@Oober Oober closed this as completed Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants