Rendering Bug (video) with Pepper Plugins that causes Nw.Js to completey freeze since 0.46.0+
See original GitHub issueNWJS Version : 0.48.0 Operating System : Ubuntu
Expected behavior
I have been using mpv.js to enable video playback outside the limitations of web codecs. It worked fine up until recently when I decided to update to the latest version of Nw.Js. The expected behaviour being that the video playback should work as it did before haha.
Actual behavior
The video playback initially lags and then freezes a few moments later. I have to force close Nw.js at that point. So I manually tested every single version from the latest 0.48.0 until I figured out the issue starts from 0.46.0. I’m hoping this will help figure out what changed from that point on wards to potentially cause this. I initially reported this issue on the official mpv.js plugin GitHub here, you can read there for a more detailed explanation. I was under the assumption it might be the plugin that needs to be updated. However, I have managed to test it on the latest version on Electron and it works fine. It hasn’t been updated since I last downloaded it, so this is definitely caused by some change in Nw.Js. I do understand this is getting a little bit off base, but this happens to be the only way to enable decent video playback in Nw.Js. At this point a massive project is stuck on this version of Nw.Js and for a lot of reasons you can understand how worrying that is haha.
How to reproduce
As mentioned a more detailed explanation in in the link above. Here is an extract from there:
Here is a Linux version zip.
To run use npm run nw
(or just ./nw
)
- To see the code: it’s in index.html
- Pre-built mpv.js in mpv.js directory. You can replace that with whatever for testing
- The nw.js files in here are from Nw.js 0.46.0. The same applies all the way up to the latest version. I tasted practically every one of them until this point. To test 0.45.5 for example, just download it from the official website here select the sdk build and just replace all files in the zip with the ones from there. Make sure to replace the libffmpeg.so in the Nw.Js directory (lib) using
gcc -Wl,--no-as-needed -shared -lavformat -o /path/to/libffmpeg.so
(this is to prevent conflicts as mentioned in the mpv.js GitHub).
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top GitHub Comments
@anesuc As a follow-up to this I was able to build the latest mpv.js to work with mpv. I documented the minimal changes here: https://github.com/Kagami/mpv.js/issues/76#issuecomment-773546338
I haven’t tested on Ubuntu yet, so your problem might still persist. Might test on the latest versions. (Everything is fine with mpv.js and Windows for me on the latest mpv and nw.js 0.51.0 with that custom built mpv.js node file).
I think the issue here overall is that mpvjs in general allows you to play all kinds of media types, subtle types (etc) and incredible levels of control that would require a lot more work to implement manually. It’s equivalent to having a VLC-like module, with the idea that a user can literally throw anything at it and it should work without having (us the developers) work on every possible scenario. If one is just working on video playback this would be fine to do, but in a situation where that functionality is a small part of much bigger projects, it becomes a bigger task than we would want it to be.