Comments (12)
Ah so this is very recent it turns out. On the 64-bit builds: https://sourceforge.net/projects/mpv-player-windows/files/64bit/
The 2020-08-30 one is the last one that works with the electron example player.
from mpv.js.
This is due to the deprecation of all the functions in mpv/render_gl.h
. This plugin should start using the mpv/render.h
api
from mpv.js.
Had same issue, but the link posted by @sirisian is for windows executable, I needed libmpv dll from here https://sourceforge.net/projects/mpv-player-windows/files/libmpv/ , took one from 2020-08-30 as @sirisian suggested and it worked.
Would be great if latest dll was supported.
from mpv.js.
@vgarleanu That worked. For reference all I did was change render_gl.h to render.h in index.cc and copy and paste the two structs below from render_gl.h to the top of the index.cc file ad-hoc.
/**
* For initializing the mpv OpenGL state via MPV_RENDER_PARAM_OPENGL_INIT_PARAMS.
*/
typedef struct mpv_opengl_init_params {
/**
* This retrieves OpenGL function pointers, and will use them in subsequent
* operation.
* Usually, you can simply call the GL context APIs from this callback (e.g.
* glXGetProcAddressARB or wglGetProcAddress), but some APIs do not always
* return pointers for all standard functions (even if present); in this
* case you have to compensate by looking up these functions yourself when
* libmpv wants to resolve them through this callback.
* libmpv will not normally attempt to resolve GL functions on its own, nor
* does it link to GL libraries directly.
*/
void *(*get_proc_address)(void *ctx, const char *name);
/**
* Value passed as ctx parameter to get_proc_address().
*/
void *get_proc_address_ctx;
/**
* This should not be used. It is deprecated and will be removed or ignored
* when the opengl_cb API is removed.
*/
const char *extra_exts;
} mpv_opengl_init_params;
/**
* For MPV_RENDER_PARAM_OPENGL_FBO.
*/
typedef struct mpv_opengl_fbo {
/**
* Framebuffer object name. This must be either a valid FBO generated by
* glGenFramebuffers() that is complete and color-renderable, or 0. If the
* value is 0, this refers to the OpenGL default framebuffer.
*/
int fbo;
/**
* Valid dimensions. This must refer to the size of the framebuffer. This
* must always be set.
*/
int w, h;
/**
* Underlying texture internal format (e.g. GL_RGBA8), or 0 if unknown. If
* this is the default framebuffer, this can be an equivalent.
*/
int internal_format;
} mpv_opengl_fbo;
I also had to go into the binding.gyp file and change the "C:/mpv-dev/x86_64" to "C:/mpv-dev" in the following section:
}, "target_arch=='x64'", {
"library_dirs": [
"C:/nacl_sdk/pepper_49/lib/win_x86_64_host/Release",
"C:/mpv-dev",
],
}],
I think that's because I got the mpv-dev from here: https://sourceforge.net/projects/mpv-player-windows/files/libmpv/
@Kagami should be able to use the above information to fix this.
In any case this build does not work on the new versions of nw.js like 0.49.0 or the latest build. It works fine on 0.39.2 for example. I'm still investigating why, but I assume nw.js changed something or Chromium did to break compatibility with pepper plugins. I'll follow up with their developers. For reference I see:
from mpv.js.
Sorry, I have no time to work on this right now.
from mpv.js.
I fixed my nw.js issue. See here: nwjs/nw.js#7670 It all works again now.
from mpv.js.
@vgarleanu That worked. For reference all I did was change render_gl.h to render.h in index.cc and copy and paste the two structs below from render_gl.h to the top of the index.cc file ad-hoc.
/** * For initializing the mpv OpenGL state via MPV_RENDER_PARAM_OPENGL_INIT_PARAMS. */ typedef struct mpv_opengl_init_params { /** * This retrieves OpenGL function pointers, and will use them in subsequent * operation. * Usually, you can simply call the GL context APIs from this callback (e.g. * glXGetProcAddressARB or wglGetProcAddress), but some APIs do not always * return pointers for all standard functions (even if present); in this * case you have to compensate by looking up these functions yourself when * libmpv wants to resolve them through this callback. * libmpv will not normally attempt to resolve GL functions on its own, nor * does it link to GL libraries directly. */ void *(*get_proc_address)(void *ctx, const char *name); /** * Value passed as ctx parameter to get_proc_address(). */ void *get_proc_address_ctx; /** * This should not be used. It is deprecated and will be removed or ignored * when the opengl_cb API is removed. */ const char *extra_exts; } mpv_opengl_init_params; /** * For MPV_RENDER_PARAM_OPENGL_FBO. */ typedef struct mpv_opengl_fbo { /** * Framebuffer object name. This must be either a valid FBO generated by * glGenFramebuffers() that is complete and color-renderable, or 0. If the * value is 0, this refers to the OpenGL default framebuffer. */ int fbo; /** * Valid dimensions. This must refer to the size of the framebuffer. This * must always be set. */ int w, h; /** * Underlying texture internal format (e.g. GL_RGBA8), or 0 if unknown. If * this is the default framebuffer, this can be an equivalent. */ int internal_format; } mpv_opengl_fbo;I also had to go into the binding.gyp file and change the "C:/mpv-dev/x86_64" to "C:/mpv-dev" in the following section:
}, "target_arch=='x64'", { "library_dirs": [ "C:/nacl_sdk/pepper_49/lib/win_x86_64_host/Release", "C:/mpv-dev", ], }],I think that's because I got the mpv-dev from here: https://sourceforge.net/projects/mpv-player-windows/files/libmpv/
@Kagami should be able to use the above information to fix this.
In any case this build does not work on the new versions of nw.js like 0.49.0 or the latest build. It works fine on 0.39.2 for example. I'm still investigating why, but I assume nw.js changed something or Chromium did to break compatibility with pepper plugins. I'll follow up with their developers. For reference I see:
Thank you. MPV.JS was no longer working on macOS. When he followed what he said, he started working.
from mpv.js.
I just recompiled the binary with latest libmpv
and it all worked, no changes to index.cc
were required. I realized that project uses prebuild
that downloads pre-built binaries first and only if they are not available it builds from source. After figuring out where all sources need to be and adjusting some paths in bindings.gyp
I just ran node-gyp rebuild
against latest libmpv header files, latest dll and pepper sdk 49 and it started to work again.
Tricky part was to make sure all the paths are pointing to the right place. I've also found that appending location of dll to electrons env Path
removed the need to copy it to System32
folder each time.
process.env.Path = `${libmpvDir};${process.env.Path}`;
Now all my dependent sources are in one place.
from mpv.js.
I just recompiled the binary with latest
libmpv
and it all worked, no changes toindex.cc
were required. I realized that project usesprebuild
that downloads pre-built binaries first and only if they are not available it builds from source. After figuring out where all sources need to be and adjusting some paths inbindings.gyp
I just rannode-gyp rebuild
against latest libmpv header files, latest dll and pepper sdk 49 and it started to work again.Tricky part was to make sure all the paths are pointing to the right place. I've also found that appending location of dll to electrons env
Path
removed the need to copy it toSystem32
folder each time.process.env.Path = `${libmpvDir};${process.env.Path}`;Now all my dependent sources are in one place.
Is there anyway that you can share the compiled binaries? I attempted your way and the @sirisian 's way but it's still could not load plugin.
from mpv.js.
@Kagami Do you plan on fixing this problem with a new release?
I don't want to fell pushy, I'm asking so that everyone can know what to expect.
from mpv.js.
@Kagami I think this project is pretty much unmaintained, you should probably just fork and fix it yourself.
from mpv.js.
Hi!
Same bug on mac 10.15.7
any solution?
from mpv.js.
Related Issues (20)
- Can‘t load plugin on windows with electron 4.2.9 HOT 1
- Using nwjs HOT 1
- MPV not request method GET and "couldn't load plugin" - Ubuntu HOT 2
- Pepper is deprecated HOT 3
- MacOS failed to initialize mpv GL context. HOT 1
- High CPU Usage & Audio Video Desync for Certain Devices
- undefined symbol: avcodec_parameters_to_context
- ubuntu 18.04 couldn't load plugin HOT 1
- [Linux] Plugin builds and loads in electron but the video is not playing HOT 1
- How to use libmpv.so HOT 1
- How should I achieve video recording ?
- NaCl SDK was deprecated by new chrome version, has any plan tranfer from naci to WebAssembly? HOT 5
- addEventListener("message“,(e)=>{}),
- WebGL Implementation
- opengl_cb API removed from newest MPV HOT 1
- Project dead? HOT 4
- how to play .avs video HOT 1
- "failed to initialize mpv GL context" since chromium 89 (electron 13.0.0 or nw 0.52.0) HOT 4
- Can't find dlls/libraries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv.js.