question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rendering Bug (video) with Pepper Plugins that causes Nw.Js to completey freeze since 0.46.0+

See original GitHub issue

NWJS 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:open
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
sirisiancommented, Feb 4, 2021

@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).

0reactions
anesuccommented, Oct 15, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nw.js freeze after a long time in background - Stack Overflow
I have a little problem with nw.js. I've "googlised" for many days (weeks) but I can't find any solution. So, I use nw.js...
Read more >
Video freezes after unspecified amount of time when looping ...
The video(s) freeze and stop responding to javascript calls. ... I am guessing the problem is in the renderer process, with regards to...
Read more >
commits-list 2018-April Archive by Date - GNOME Mail Services
Xavier de Blas; [mutter] renderer-native: Fall back to non-modifier GBM surfaces ... [gimp] Bug 794949 - Plugin crash when opening png, jpeg or...
Read more >
Untitled
First video jockey mtv, Pf20 airless paint sprayer, Get path drawable android, Conectivade social download, #Snpj strabane.
Read more >
How to Update NW.js to Dramatically ... - RPG Maker Forums
Performance that is not only dependent on the NWJS alone. (Since you also have an updated pixi and Javascript cores in MZ.) Example:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found