-
Notifications
You must be signed in to change notification settings - Fork 68
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
macOS: libmpv cannot get a VO. #261
Comments
The python wrapper has no part in VO initialization except for passing whatever VO options you give it through to libmpv, so either you have to change your VO options, or the problem is with libmpv. When comparing mpv and libmpv, did you make sure that both are the same mpv version? mpv tells you when you call it with the |
Tried everything I could think of;
Both 0.35.1 I relocated and used IINA's dylibs, but got the same error. [edited to remove many surplus words] |
TL;DR In So IINA uses vo="libmpv", but when I tried that, it got "No render context set": IINA has At the end of mpv.py there is |
libmpv by default just creates its own window, where it draws the video. AFAIK most people use it like this, because it's also how the command-line player behaves. If you want to integrate libmpv into an application that already has a window, you can instead create your own window and openGL context, and hand it to libmpv. That's what that render context stuff is for. To just display video in a new window, you don't need it. |
I'll try creating an openGL context for it, and report back. In the meantime, a bit more background: I'm writing an app on Linux/x11, where using your libmpv wrapper works fine, whether in a window or not; I don't have to give it a vo context either way. On macOS the opposite is true: your libmpv wrapper does not work, whether in a window or not; but as yet I haven't given it a vo context (will try it asap). I put it in a window because it's mentioned in #36 (from 2017) (#36 (comment)). |
I just realized you were talking about If your code works on Linux but not on MacOS, I am fairly sure that that's an issue either inside libmpv or inside your installation of libmpv, so it may be worth your time asking at the upstream mpv project for advice. |
Hi @j77h |
@olivierfriard |
There's a new active thread about this at mpv-player/mpv#12518 |
Hello, |
Well, that mpv issue was closed, they think they've fixed it. But that happened a few days after the last mpv release. mpv compiling requires meson, My 'customers' are non-techie mac users, who Been too busy with other things, |
It seems to boil down to this:
either the libmpv dylib or the python wrapper
cannot establish a VO on macOS, although mpv-player can.
The fact that mpv-player can do it suggests that
a solution to libmpv's problem can't be far away.
Both with and without a Qt window, libmpv hangs at
"vo/gpu/opengl Initializing GPU context 'cocoa'",
but mpv-player seems to use osx/cocoacb and vo/libmpv.
Setting 'gpu' or 'libmpv' or 'cocoacb' as the vo does not help.
The uploaded zip contains full debug logs.
j77h_macos_no_vo.zip
Although my 'mac' is a VBox VM on Linux, I've ruled out
that being in a VM is the cause, by showing that
mpv-player works in the same VM, and
libmpv works in Windows in a VM.
Both the macOS VM and the Windows VM use the VBoxSVGA device.
Creating a GUI window first does not seem to help now.
My PySide6_libmpv_test.py on Linux clearly opens a window first
then inserts the player into it, but on macOS the window never appears.
(My PySide6 tests without libmpv work fine on macOS.)
Vydia's code does not work with current Python or libmpv.
Robozman's code is too complex for me -- don't need it and don't understand it. :)
Note: I don't use Mac and don't know it well; all I have is the VM, just for testing my code.
Also, I'm not a great coder, I know only a bit of Python...
The text was updated successfully, but these errors were encountered: