Bug 237277 - www/qt5-webengine: HTML5 video rendering/play color problem
Summary: www/qt5-webengine: HTML5 video rendering/play color problem
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
: 237330 (view as bug list)
Depends on: 240095 240096 240097 240098
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-14 09:23 UTC by Nuno Teixeira
Modified: 2020-07-19 13:39 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
falkon (38.70 KB, image/png)
2019-04-14 09:23 UTC, Nuno Teixeira
no flags Details
otter with webengine (45.49 KB, image/png)
2019-04-14 09:23 UTC, Nuno Teixeira
no flags Details
otter with webkit (346.31 KB, image/png)
2019-04-14 09:24 UTC, Nuno Teixeira
no flags Details
glxinfo log (12.86 KB, text/plain)
2019-04-14 09:27 UTC, Nuno Teixeira
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Teixeira freebsd_committer freebsd_triage 2019-04-14 09:23:15 UTC
Created attachment 203660 [details]
falkon

Hello,

Since last qt-webengine port update I cannot see html5 videos with correct color.

https://www.quirksmode.org/html5/tests/video.html , video is played in blue color.

www.youtube.com videos are played in green/black colors.

I tested with falkon and otter-browser with webkit and webengine backends, only webkit backend works normally.

I'm using freebsd 12.0 with latest ports.

I have take some screenshots.

Thanks,

Nuno Teixeira
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2019-04-14 09:23:59 UTC
Created attachment 203661 [details]
otter with webengine
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2019-04-14 09:24:34 UTC
Created attachment 203662 [details]
otter with webkit
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2019-04-14 09:27:34 UTC
Created attachment 203663 [details]
glxinfo log
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2019-04-17 13:46:09 UTC
*** Bug 237330 has been marked as a duplicate of this bug. ***
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-04-24 19:19:23 UTC
I think the problem is that we need to get back WebRTC.
See https://wiki.qt.io/QtWebEngine/VideoAcceleration .
Comment 6 Alexander Sherikov 2019-06-30 10:53:33 UTC
qutebrowser has the same issue. For those who are looking for a quick fix: forcing software rendering helps, e.g, "c.qt.force_software_rendering='chromium'".
Comment 7 Dwayne MacKinnon 2019-06-30 20:46:32 UTC
I'm using nvidia-driver on FreeBSD 12.0-RELEASE-p2. The only browser I have that uses qt-webengine (according to pkg info -d) is konqueror. The video at quirksmode looks fine to me. 

Just including another result in the hope that it can help narrow things down.
Comment 8 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-08-15 09:21:28 UTC
I think this is not a real bug, but a misconfiguration with hardware acceleration, as comment #6 and comment #7 also suggest.

If you have a recent enough hardware, you should try to get hardware acceleration working properly. This page, although for arch linux, can help: https://wiki.archlinux.org/index.php/Hardware_video_acceleration

If, on the contrary, you have an old graphic card, such as myself, you can disable hardware acceleration by starting your browser with --disable-gpu. I can confirm that this fixes the problem with falkon 3.1.0 and qt5-webengine 5.12.2_3 on FreeBSD 12.0-RELEASE r350836 amd64.
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2019-08-19 21:15:08 UTC
(In reply to Lorenzo Salvadore from comment #8)

Hello Lorenzo,

My hardware is from 2010.

I've tested youtube videos with very good framerate and quality with "--disable-gpu" option.

This option works.

I was thinking if this option should be included in pkg-message in all browsers that use webengine as backend, I was waiting for this information for months.

I've just tested Falkon, I will try to test other browsers with the same issue.

Thanks :)

Yours,

Nuno
Comment 10 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-08-25 11:01:12 UTC
I proposed a patch to pkg-message for falkon, qutebrowser, otter-browser and konqueror in bug #240095, bug #240096, bug #240097 and bug #240098 to explain the --disable-gpu option.

Once a decision has been made about those PRs I think we can close this one.
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-08-25 16:21:56 UTC
A commit references this bug:

Author: tcberner
Date: Sun Aug 25 16:21:44 UTC 2019
New revision: 509802
URL: https://svnweb.freebsd.org/changeset/ports/509802

Log:
  www/konqueror: add hint and resolution to color problems in video playback

  - when hardware accelartion is not available users can experience switched colors
  - to work around the issue it is possible to pass --disable-gpu to the command line

  PR:		240098
  PR:		237277
  Submitted by:	Lorenzo Salvadore
  Reported by:	Nuno Teixeira

Changes:
  head/x11-fm/konqueror/pkg-message
Comment 12 commit-hook freebsd_committer freebsd_triage 2019-08-25 16:28:59 UTC
A commit references this bug:

Author: tcberner
Date: Sun Aug 25 16:27:57 UTC 2019
New revision: 509803
URL: https://svnweb.freebsd.org/changeset/ports/509803

Log:
  www/otter-browser: add hint and resolution to color problems in video playback

  - when hardware accelartion is not available users can experience switched colors
  - to work around the issue it is possible to pass --disable-gpu to the command line

  PR:		240097
  PR:		237277
  Submitted by:	Lorenzo Salvadore
  Reported by:	Nuno Teixeira

Changes:
  head/www/otter-browser/pkg-message
Comment 13 commit-hook freebsd_committer freebsd_triage 2019-08-25 16:36:02 UTC
A commit references this bug:

Author: tcberner
Date: Sun Aug 25 16:35:14 UTC 2019
New revision: 509804
URL: https://svnweb.freebsd.org/changeset/ports/509804

Log:
  www/falkon: add hint and resolution to color problems in video playback

  - when hardware accelartion is not available users can experience switched colors
  - to work around the issue it is possible to pass --disable-gpu to the command line

  PR:		240095
  PR:		237277
  Submitted by:	Lorenzo Salvadore
  Reported by:	Nuno Teixeira

Changes:
  head/www/falkon/pkg-message
Comment 14 Tobias C. Berner freebsd_committer freebsd_triage 2019-08-25 16:36:36 UTC
Thanks for the investigation an the reports to both of you.

I cannot reproduce/test the fix as I don't have the "appropriate" hardware here, so I simply went with it :) and committed the suggested work-around hint to the pkg-message.
Comment 15 commit-hook freebsd_committer freebsd_triage 2020-07-19 13:39:09 UTC
A commit references this bug:

Author: adridg
Date: Sun Jul 19 13:38:27 UTC 2020
New revision: 542576
URL: https://svnweb.freebsd.org/changeset/ports/542576

Log:
  Remove mention of a command-line-flag that doesn't work.

  There is a discussion of these flags in qutebrowser's bugtracker
  (not otter!),
  	https://github.com/qutebrowser/qutebrowser/issues/2671
  but the mechanism of "--qt-flag" is specific to qutebrowser:
  it isn't a general Qt thing. I can't find anywhere in otter-browser's
  source history where it has a --disable-gpu flag: that **is** a Qt
  thing, as documented at
  	https://doc.qt.io/qt-5/qtwebengine-debugging.html
  However the application has to be able to pass that on to Qt
  (which otter apparently doesn't anymore, and neither does falkon).

  Overall the recommendation is to use environment variables to
  manage Chromium-inside-WebEngine, as documented by Qt,
  e.g.
  	QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu" otter-browser

  PR:		237277 240097

Changes:
  head/www/otter-browser/pkg-message