Question / Help Browser plugin

#81
**NOTE before reading: my directory structure is /usr/lib and /usr/bin in Arch however in some distros such as ubuntu it may be /usr/local/bin or usr/local/lib

Updated original post, I can get it compiled, and loaded by obs, but when I run obs, the interface never shows up, it just stays running in console with no errors. Here's an explanation to what I did and why i did it:

1. According to CEF documentation, there is a way to set cefsettings resources and locales path, which works, so I made cmake copy the files to the obs-browser/data folder before compiling, so that they end up installed in /usr/share/obs/obs-plugins/obs-browser/, and changed the code accordingly

2 icudtl,dat, natives_blob.bin and snapshot_blob.bin ignore the resources path, and must reside in the main executable directory, so they required linking.

Because cef-bootstrap is run by obs, I had to move /usr/lib/obs-plugins/cef-bootstrap to the /usr/bin folder to prevent having to double-link the same files in two directories, since cef-bootstrap searches obs's executable directory for files/resources instead of its own.

Then I opened /usr/bin and linked all the files in the /usr/share/obs/obs-plugins/obs-browser/ with ln -s /usr/share/obs/obs-plugins/obs-browser/file-or-directory-name

3. cef searches for libcef.so in /usr/lib, so I had to create a link to it in my /usr/lib with ln -s /usr/share/obs/obs-plugins/obs-browser/libcef.so

TLDR/shortcuts if you dont want to link everything:
copy CEF/cefclient/Release files to /usr/bin
copy CEF/cefclient/Release/libcef.so to /usr/lib
move /usr/lib/obs-plugins/cef-browser to /usr/bin

Then remove unnecessary files:
remove "files" folder from /usr/bin
remove "cefclient" from /usr/bin
remove "chrome-sandbox" from /usr/bin

Notes: If you can properly get cefsettings to set the correct resources and locales path, you can skip having to link or copy everything except libcef.so, icudtl.dat, natives_blob.bin and snapshot_blob.bin
 
Last edited:
#82
Few weeks ago i am compiled this plugin on Ubuntu mate, after this i am install Linux Mint and erase my disk. Now i am trying to compile plugin on Linux Mint (i am installed ALL binaries from this thread, except Qt5, qt5-webkit and lot more) and now i have error:

g++ -c -std=c++11 -Wall -g -fPIC -I/usr/include/obs -I./src -I/usr/include/qt5/QtWebKitWidgets -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtSensors -I/usr/include/qt5/QtLocation -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtPrintSupport -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWebKit -I/usr/include/qt5/QtPositioning -I/usr/include/qt5/QtQml src/qtwebkit-main.cpp -o build/qtwebkit-main.o
src/qtwebkit-main.cpp:21:24: fatal error: obs-module.h: No such file or directory
#include <obs-module.h>
^
compilation terminated.
make: *** [build/qtwebkit-main.o] Error 1

Please can you help me guys, or give me compiled version. Thanks advice.
 
#84
Now I finally got the QtWebBrowser plugin to show something else than a red rectangle - when I enter a local file, everything works fine. When I enter 127.0.0.1 (localhost), it shows me the web page hosted on my computer. When I enter any other IP or domain, it shows nothing, and there is not even a request for that IP / domain visible in Wireshark. Why might that be?
 
#85
This is what I'm getting when I try to 'make' the plugin:

Code:
g++ -c -std=c++11 -Wall -g -fPIC -I/usr/include/obs -I./src -I/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebKit -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5 src/qtwebkit-main.cpp -o build/qtwebkit-main.o
make: g++: Command not found
Makefile:55: recipe for target 'build/qtwebkit-main.o' failed
make: *** [build/qtwebkit-main.o] Error 127
I'm running Linux Mint 18 and latest revision of OBS for Linux

EDIT: Solved my own problem. I didn't have g++ installed, which will not allow you to build the file initially. So to fix that use the code

Code:
sudo apt get-install g++
enter your password if you have one and install it, then you will be able to proceed to build and install the file no problems.
 
Last edited:
#86
OK, I'm not as well versed in Linux as many others here... I come from a Win/Mac background and there's a few things I have yet to master with this OS.

Could someone please post a step by step tutorial with all the commands as to how to compile the source for the browser plugin code and install it in OBS for Linux? I am going to need this browser plugin so I can use it with YT live streaming. I cannot simply switch to Windows and run OBS there as I only have WinVista on a dual boot machine and the current OBS does not support that platform. I'm running Linux Mint 18 Cinnamon

Whatever help you could provide would be greatly appreciated.

Cheers,
Eros
 

dodgepong

Administrator
Forum Admin
#90
Oh my mistake, I thought i was in a different thread. I thought I was in the main browser source thread that comes with OBS Studio for Mac/Windows. Nevermind.
 
#91
The plugin installed fine, but for whatever reason, the one thing I wanted to show on it - nightdev's kapchat - won't load. The default twitch chat will load but of course I'd rather not use that. Other pages do load, like if i put https://www.nightdev.com/kapchat/ as the url it does load but the iframe with an actual chat in it does not. Same if I make an iframe in a local file with the chat stuff in it.
Couldn't try 3ventics chat yet since that requires login and well I know of no other hosted ill chats.
I will probably try to hack together CSS to darken the default twitch chat and hide the chatbox etc at some point if this won't work but I'd really rather have kapchat.
fwiw it seems dillo and midori do have issues loading kapchat, too. May be related.
 
#92
just an update on this - twitchalerts eventlist works, but normal alerts with sounds are causing obs to crash (arch linux, using git compiles for both the plugin and obs via AUR (arch user repositories) obs-studio-git and obs-qtwebkit-git which pull directly from the git repos.
 
#94
Hey guys, I started working on a new linux browser plugin, which is based on cef this time.
Source code and building instructions are available here: https://github.com/bazukas/obs-linuxbrowser
Just wanted to commend you for this. Awesome work, the plugin works great!

System info (for future reference):
Code:
$ cat /proc/version
Linux version 4.10.0-38-generic (buildd@lgw01-amd64-059) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:    xenial

$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 4
Model name:            AMD Phenom(tm) II X4 965 Processor
Stepping:              3
CPU MHz:               3411.271
BogoMIPS:              6822.54
Virtualization:        AMD-V
L1d cache:             64K
L1i cache:             64K
L2 cache:              512K
L3 cache:              6144K

$ free
              total        used        free      shared  buff/cache   available
Mem:       16391484     7076080     6125768      140492     3189636     8782960
Swap:      16737276           0    16737276
 
Top