Kagami / boram

:film_strip: Cross-platform graphical WebM converter
https://github.com/Kagami/boram/releases
433 stars 30 forks source link

No video preview after release 0.4.0 #38

Closed piktaszuikis closed 5 years ago

piktaszuikis commented 5 years ago

After dragging a video on the boram instead of video preview I get an error: "Failed to load plugin". Encoding still works fine. It works fine with 0.3.7. I wish I could give more details, but there is no output on the stdout/stderr. Suggestions how to debug the problem are welcome too.

Platform: Arch Linux mpv version: 0.29.0

Kagami commented 5 years ago

Electron (and therefore included Chromium) version was updated, also libav* shared libraries dependency was introduced again. Some of this might be the reason.

Just tried boram 0.5.0 with Manjaro Live CD and it works fine for me.

Try 7z release if you use AUR package, just in case.

Show output of ELECTRON_ENABLE_LOGGING=1 BORAM_TERMINAL=1 BORAM_VERBOSE=1 ./boram --v=1

piktaszuikis commented 5 years ago

That is strange... I've just tried to run it (v0.5.0) in Manjaro Live CD on VM and I still get "Couldn't load plugin":

When running in verbose mode I get this output: https://pastebin.com/7YuEHT1z These lines look suspicious:

HTMLPlugInElement.cpp(579)] EMBED class="c0033" Plugin URL: <null>
HTMLPlugInElement.cpp(580)] Loaded URL: <null>
ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_plugin from binding interface: memory_instrumentation::mojom::Coordinator exposed by: content_browser
ppapi_plugin_process_host.cc(518)] PpapiPluginProcessHost::OnChannelError()
ppapi_plugin_process_host.cc(477)] ppapi plugin process crashed.

However I don't have anything to compare them to. Wouldn't you mind to provide output of working instance?

Kagami commented 5 years ago

Manjaro Live CD on VM and I still get "Couldn't load plugin"

Have you enabled 3D Acceleration in VM settings?

Wouldn't you mind to provide output of working instance?

[7969:0831/000259.546733:VERBOSE1:zygote_main_linux.cc(626)] ZygoteMain: initializing 0 fork delegates
[7969:0831/000259.547037:INFO:cpu_info.cc(50)] Available number of cores: 8
[7967:0831/000259.669799:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7967:0831/000259.675341:VERBOSE1:pulse_stubs.cc(683)] dlopen(libpulse.so.0) failed, dlerror() says:
libpulse.so.0: cannot open shared object file: No such file or directory
[7967:0831/000259.675363:VERBOSE1:audio_manager_pulse.cc(245)] Failed on loading the Pulse library and symbols
[7967:0831/000259.675374:WARNING:audio_manager.cc(293)] Multiple instances of AudioManager detected
[7967:0831/000259.675381:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager detected
[7967:0831/000259.726622:VERBOSE1:bluez_dbus_manager.cc(172)] Bluetooth not supported.
[7967:0831/000259.759055:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Aviator' log
[7967:0831/000259.759081:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Icarus' log
[7967:0831/000259.759088:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Pilot' log
[7967:0831/000259.759093:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Rocketeer' log
[7967:0831/000259.759098:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Skydiver' log
[7967:0831/000259.759104:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Cloudflare 'Nimbus2018' Log
[7967:0831/000259.759109:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Cloudflare 'Nimbus2019' Log
[7967:0831/000259.759114:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Cloudflare 'Nimbus2020' Log
[7967:0831/000259.759119:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Cloudflare 'Nimbus2021' Log
[7967:0831/000259.759124:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server
[7967:0831/000259.759129:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server 2
[7967:0831/000259.759134:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec log
[7967:0831/000259.759139:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Vega' log
[7967:0831/000259.759144:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Sirius' log
[7967:0831/000259.759149:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi Gen2 CT log
[7967:0831/000259.759154:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: CNNIC CT log
[7967:0831/000259.759159:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Sabre' CT log
[7967:0831/000259.759164:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Mammoth' CT log
[7967:0831/000259.759169:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: StartCom log
[7967:0831/000259.759174:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: WoSign log
[7967:0831/000259.759179:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Izenpe log
[7967:0831/000259.759184:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi log
[7967:0831/000259.759189:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Certly.IO log
[7991:0831/000259.785148:VERBOSE1:gles2_cmd_decoder.cc(3375)] GL_EXT_packed_depth_stencil supported.
[7991:0831/000259.793551:VERBOSE1:gles2_cmd_decoder.cc(3375)] GL_EXT_packed_depth_stencil supported.
[7991:0831/000259.801681:VERBOSE1:gles2_cmd_decoder.cc(3375)] GL_EXT_packed_depth_stencil supported.
[7967:0831/000300.083108:VERBOSE1:mime_sniffing_resource_handler.cc(449)] To buffer: file:///home/kagami/t/boram-v0.5.0-linux-x64/resources/app/fontawesome-webfont.woff2
[7996:0831/000304.961579:VERBOSE1:HTMLPlugInElement.cpp(579)] EMBED class="c0033" Plugin URL: <null>
[7996:0831/000304.961738:VERBOSE1:HTMLPlugInElement.cpp(580)] Loaded URL: <null>
[7967:0831/000304.964613:ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_plugin from binding interface: memory_instrumentation::mojom::Coordinator exposed by: content_browser
[7991:0831/000304.972940:VERBOSE1:gles2_cmd_decoder.cc(3375)] GL_EXT_packed_depth_stencil supported.
[cplayer] mpv 0.29.0-23-gd4bbfb8453-dirty Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects

Basically your log differs only starting with

[4510:0830/205135.537746:VERBOSE1:ppapi_plugin_process_host.cc(518)] PpapiPluginProcessHost::OnChannelError()

Show output with --v=100, there might be some more details.

GPU logging may be useful, but it requires debug build, so need to prepare test build of boram for that.

It should be easier to test with mpv.js first. Try to run example player of mpv.js, it uses exactly same mechanism of embedding mpv into Electron.

Kagami commented 5 years ago

Have you enabled 3D Acceleration in VM settings?

It's VirtualBox setting though, I've just realized you could use another hypervisor. mpv plugin for Electron requires properly working OpenGL.

Does WebGL work in latest Chrome/Chromium on your machine btw?

piktaszuikis commented 5 years ago

Must be something with mpvjs binaries. I've tried to run example player of mpv.js and it produced the same "Couldn't load plugin" error, but after I compiled my own mpvjs.node it started working.

I guess I will have to compile boram too... Wish me luck :)

Kagami commented 5 years ago

but after I compiled my own mpvjs.node it started working

Ah, I have an idea! Show ldd mpvjs.node before and after plugin compilation.

I guess I will have to compile boram too

You can compile only boram.node and replace libboram.so in release build with it.

piktaszuikis commented 5 years ago

Ah, I have an idea! Show ldd mpvjs.node before and after plugin compilation.

Looks like versions match for all libs, only refs are different (I've attached binaries in 7z too): yours.mpvjs.node.7z mine.mpvjs.node.7z

You can compile only boram.node and replace libboram.so in release build with it.

I see. However when I'm compiling with node-gyp rebuild, it fails to link against libavformat.so.57, most likely because mine is version 58. Are versions hardcoded to some config?

Kagami commented 5 years ago

Hm, that's strange, binaries look pretty much the same...

when I'm compiling with node-gyp rebuild, it fails to link against libavformat.so.57

Remove "target_name": "ffmpeg57" section from binding.gyp. It's needed on systems with ffmpeg 3.x.

piktaszuikis commented 5 years ago

Once again, rebuild helped.

I guess I'll have to update PKGBUILD in AUR repo... Is there another way of forcing target ffmpeg58 other than removing it from binding.gyp?

Kagami commented 5 years ago

Seems like node-gyp doesn't allow to whitelist/blacklist by target_name. I can add condition based on environment variable later.

piktaszuikis commented 5 years ago

That would be helpful.

piktaszuikis commented 5 years ago

AUR got updated, everything works now. If new version will have an environment variable, it will be even better. Thanks for all help.

Kagami commented 5 years ago

Thanks!

Kagami commented 5 years ago

Added prev_ffmpeg gyp option (not enabled by default).