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

QOpenGLWidget is displayed in its own window since libmpv.so.2.3.0 #14045

Closed
kanehekili opened this issue May 2, 2024 · 16 comments
Closed

QOpenGLWidget is displayed in its own window since libmpv.so.2.3.0 #14045

kanehekili opened this issue May 2, 2024 · 16 comments
Labels

Comments

@kanehekili
Copy link

kanehekili commented May 2, 2024

Important Information

  • mpv version: 1:0.38.0-2
  • Arch Linux LTS Kernel
  • pacman
  • 1:0.38.0-2, 1:0.37.0-2 works flawlessly
  • XFCE with compiz, tested with xfwm4 as well
  • GPU: Intel with i915 driver (laptop integrated graphics)

Reproduction steps

Create a python5 or python 6 script with an embedded OpenGL widget. An example of a subclassed window can be seen here or download the Arch Linux version of my application from AUR
Update: A Gist using OpenGLWindow (see comment below - you need to have a png file)

Expected behavior

The created widget is shown in its frame and window as in lib version 1:0.37.0-2

Actual behavior

With lib version libmpv.so.2.3.0 the widget is detached and displays itself in its own window. The same happened some time ago with the non-opengl implementation when using wayland. So the opengl variant is the only way to provide a consistent behaviour across X11 and wayland.
With the aforementioned version python crashes if using a non OPENGL widget, but works if reverted back to lib version 1:0.37.0-2

Log file

added some logs below-with vo=libmpv and without that flag

@Akemi
Copy link
Member

Akemi commented May 2, 2024

if you are using the render API set vo=libmpv.

@kanehekili
Copy link
Author

kanehekili commented May 2, 2024

It gives me an error - "Invalid error for mpv parameter -4" on a "plain" QT Window and some non verbal error if using the openGL option. Since these errors do not occur when the "previous" library is loaded I assume that there is a glich. I' m using jaseg's python-mpv from github for bindings.

So "vo=libmpv" renders MPV completely unusable

@sfan5
Copy link
Member

sfan5 commented May 3, 2024

Setting the loglevel to debug, nothing is displayed

Set the log-file option to create one.

@kanehekili
Copy link
Author

Working on a small example to test - will include the option.

@sfan5
Copy link
Member

sfan5 commented May 3, 2024

FWIW we have a small example here and it works fine after we fixed it to include vo=libmpv: https://github.com/mpv-player/mpv-examples/tree/master/libmpv/qt_opengl

@kanehekili
Copy link
Author

kanehekili commented May 3, 2024

Just tried it to no avail.
Here is a test. To verify it, you'll need a picture relative to the code called "icons/film-clapper.png".
In line 34 I included "vo":"libmpv" which results in showing nothing. Remove that, and you'll have at least a view of the icon - in a separate window.
I'll add the log file below

@kanehekili
Copy link
Author

kanehekili commented May 3, 2024

this is the logfile: (didn't know you couldn't add it afterward
py6OpenGLMPV.log
in the description. This is the log without the "vo":"libmpv" entry. Below the log with that switch

@kanehekili
Copy link
Author

Attached the logfile with "vo":"libmpv". Neither video nor single picture is displayed..

py6OpenGLMPV2.log

@sfan5
Copy link
Member

sfan5 commented May 4, 2024

Your log (which is also incomplete) shows libmpv being used initially but switches to gpu halfway. I suspect a problem in your glue code.

@kanehekili
Copy link
Author

Sorry about the log, but using the "log_level=debug" option seems to be the only way of getting mpv logs.
Please instruct how to improve this.
Concerning the "glue code": It works with MPV 0.37.0-2 and the associated libmpv_2.2.0.so library. I've created a gist for the purpose...

@kanehekili
Copy link
Author

kanehekili commented May 5, 2024

Adding two files - one with "vo=libmpv" (where no windows or graphics is displayed) and one without. The later displays a separate window with content, the former doesn't display anything.
gl_vo-libmpv.txt
gl-without-vo.txt
log-level has been set to trace

@kanehekili
Copy link
Author

Last not least a log of the same gist, using mpv 0.37 with its libmpv.so 2.2.0:
gl037Good.txt
This works with or without the "vo=libmpv" switch

@sfan5
Copy link
Member

sfan5 commented May 5, 2024

Adding two files - one with "vo=libmpv" (where no windows or graphics is displayed)

[ 0.148][e][vo] Video output lipmpv not found!

@kanehekili
Copy link
Author

kanehekili commented May 5, 2024

? It seems to be no problem with the previous version. I don't mind if things change - but as downstream developer I do not have any information how to fix your changes. Besides: I've never used the "vo" switch before. And I'd like to point out, that - from my perspective - it doesn't work with either "vo" set or not with the lastest mpv lib.

@Dudemanguy
Copy link
Member

He's saying you misspelled libmpv as lipmpv.

@kanehekili
Copy link
Author

Thanks for the help. It was indeed the "vo" flag in combination with the "glue code". I'm closing this issue, since it looks that in former versions the "vo=libmpv" was the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants