Question / Help Browser plugin

**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:

Watola

New Member
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.
 

Leseratte10

New Member
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?
 

Whitegamerinc

New Member
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:

Eros Peterson

New Member
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
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.
 

DigitalTA

New Member
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.
 
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.
 

robolivable

New Member
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
 

dodgepong

Administrator
Forum Admin
Are you building from master? Assuming you RPi is running Linux, the official obs-browser plugin for Linux was finally merged in recently. Have you given that a try?
 

nmaas87

New Member
Yes, I did but it did not work:

First I tried to get the latest cef with arm support (cef_binary_80.0.7+gd9fd476+chromium-80.0.3987.132_linuxarm_minimal).

Code:
sudo apt-get --allow-releaseinfo-change update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
sudo apt-get -y install build-essential checkinstall cmake git libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac-dev_0.1.4-2+b1_armhf.deb


  git clone --recursive https://github.com/obsproject/obs-studio.git
  cd obs-studio
  mkdir build && cd build

sudo cmake -DUNIX_STRUCTURE=1  -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_80.0.7+gd9fd476+chromium-80.0.3987.132_linuxarm_minimal/" -DCMAKE_INSTALL_PREFIX=/usr ..

-- CEF Not found -- obs-browser plugin disabled.
But that was not recognized.
So I had to use the CEF version given in the install instructions (https://github.com/obsproject/obs-studio/wiki/Install-Instructions#linux-portable-mode-all-distros) - but there is no ARM version for this


Code:
  git clone --recursive https://github.com/obsproject/obs-studio.git
  cd obs-studio
  mkdir build && cd build

sudo cmake -DUNIX_STRUCTURE=1  -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_3770_linux64" -DCMAKE_INSTALL_PREFIX=/usr ..

-- Looking for Chromium Embedded Framework in /home/pi/newOBS/cef_binary_3770_linux64

sudo make -j4

[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-video.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-wrapper.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-enum-devices.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-output.c.o
In file included from /home/pi/newOBS/obs-studio/libobs/util/profiler.h:4,
                 from /home/pi/newOBS/obs-studio/libobs/obs.h:22,
                 from /home/pi/newOBS/obs-studio/libobs/obs-scene.h:20,
                 from /home/pi/newOBS/obs-studio/libobs/obs-scene.c:21:
In function ‘darray_push_back’,
    inlined from ‘build_current_order_info.isra.13’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2811:3,
    inlined from ‘sceneitems_match2’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2843:2,
    inlined from ‘obs_scene_reorder_items2’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2890:6:
/home/pi/newOBS/obs-studio/libobs/util/darray.h:193:2: warning: ‘memcpy’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
  memcpy(darray_end(element_size, dst), item, element_size);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘darray_push_back’,
    inlined from ‘build_current_order_info.isra.13’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2821:5,
    inlined from ‘sceneitems_match2’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2843:2,
    inlined from ‘obs_scene_reorder_items2’ at /home/pi/newOBS/obs-studio/libobs/obs-scene.c:2890:6:
/home/pi/newOBS/obs-studio/libobs/util/darray.h:193:2: warning: ‘memcpy’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
  memcpy(darray_end(element_size, dst), item, element_size);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 23%] Linking C shared library libobs.so
[ 23%] Built target libobs
make: *** [Makefile:152: all] Error 2


[ 46%] Built target obs-outputs
[ 49%] Built target obs-ffmpeg
[ 55%] Built target obs-filters
/usr/bin/ld: /home/pi/newOBS/cef_binary_3770_linux64/build/libcef_dll_wrapper/libcef_dll_wrapper.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
[ 58%] Built target obs-transitions
make[2]: *** [plugins/obs-browser/CMakeFiles/obs-browser-page.dir/build.make:131: plugins/obs-browser/obs-browser-page] Error 1
make[1]: *** [CMakeFiles/Makefile2:1177: plugins/obs-browser/CMakeFiles/obs-browser-page.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 60%] Built target text-freetype2
[ 61%] Built target rtmp-services
multiple makes brought me to this end-point which sad that file format not recognized, because its probably made for linux64 and not linux-arm. So as long as there is cef included, I don't know how to get it working...
 

almaceleste

New Member
Hi there,
sorry for reviving that old topic - but as I need to get a browser plugin for OBS running on the Raspberry Pi 4, I was refered to the obs-qtwebkit. I tried to compile it, but it ended in an error as described here: https://obsproject.com/forum/threads/obs-raspberry-pi-build-instructions.115739/post-438064
Maybe someone has an idea on how to get it working :/?
Thanks a lot for your help and have a great day :)!
you could try compiled release of the bazukas obs-linuxbrowser.
just download and extract and copy it to ~/.config/obs-studio/plugins/.
it works for me fine in obs-studio from the version 23.x and to the current (25.0.0) on Ubuntu Studio 19.10.
 
Top