Question / Help Browser plugin

1Miguel1

New Member
If the contents of html file itself don't change, I don't think we'll be able to resolve this problem. Is your solution supposed to work with other browser plugins at all?

My solution is supposed to work with other browser plugins. The only difference is that I'm using http instead of the usual file protocol. In chrome theres an option to allow file access from local files without http (https://stackoverflow.com/questions...mlhttprequest-to-load-a-url-from-a-local-file), maybe theres a similar option in (qt)webkit?

EDIT: but the stupid thing here is that the html file does read the contents of the xml at startup, but it simply does not change when the xml changes.

EDIT2: The problem is fixed in the latest version. Thank you Bazukas!
 
Last edited:
Hi @bazukas !
Unfortunately, I got the same problem as bobofett since OBS MP 0.11: the compilation/installation went well but after starting OBS MP, the plugin doesn't appear as a possible Source...strange !
@Jim : did something change about the way OBS MP handles third-party plugins between 0.10 and 0.11.2 ?
 
Last edited:

bobofett

New Member
Hi @bazukas !
Unfortunately, I got the same problem as bobofett since OBS MP 0.11: the compilation/installation went well but after starting OBS MP, the plugin doesn't appear as a possible Source...strange !
@Jim : did something change about the way OBS MP handles third-party plugins between 0.10 and 0.11.2 ?


Did you try the thing I mentioned? If you look in /usr/lib/obs-plugins you should see all of the default plugins that come with OBS (image-source.so, linux-capture.so, etc...), you need to copy qtwebkit-browser.so and renderer in there, well at least this worked for me. When you compiled qtwebkit, it should have created ~/.config/obs-studio/plugins/qtwebkit-browser, under that dir you will find a bin dir, in bin you will find the two files I mentioned above (qtwebkit-browser.so and renderer), when I copied both to /usr/lib/obs-plugins I got the browser source to show up and work. If you are on a debian based distro you should be able to type:

Code:
sudo cp ~/.config/obs-studio/plugins/qtwebkit-browser/bin/* /usr/lib/obs-plugins/

Enter your password and hit <Enter>. Start OBS and see if QTWebkitBrowser is now a source you can choose.

Good luck.
 

bazukas

Developer
Hi @bazukas !
Unfortunately, I got the same problem as bobofett since OBS MP 0.11: the compilation/installation went well but after starting OBS MP, the plugin doesn't appear as a possible Source...strange !
@Jim : did something change about the way OBS MP handles third-party plugins between 0.10 and 0.11.2 ?

Hey. Most likely the problem is that obs is looking for plugins in another folder. Since 0.11.1 (I think) obs is looking for plugins in ~/.config/obs-studio/plugins unless it's compiled without XDG support.

So you should try copying the plugin folder (with bin and data directories inside) into either ~/.obs-studio/plugins or ~/.config/obs-studio/plugins.

And please don't install the plugin in the /usr/lib/obs-plugins. Let me know if you have any problems.
 
Last edited:

bobofett

New Member
Hey. Most likely the problem is that obs is looking for plugins in another folder. Since 0.11.1 (I think) obs is looking for plugins in ~/.config/obs-studio/plugins unless it's compiled without XDG support.

So you should try copying the plugin folder (with bin and data directories inside) into either ~/.obs-studio/plugins or ~/.config/obs-studio/plugins.

And please don't install the plugin in the /usr/lib/obs-plugins. Let me know if you have any problems.


Sorry if I stepped on any toes there with that suggestion. But, that was what worked for me, and you never responded to the contrary, so I figured it was at least a feasible work around for the time being. I tried copying the plugin folder (yes with the bin and data inside) to both the dirs mentioned above...it did not work. I tried once with it in one location (the default ~/.config...), once with it in the suggested location (~/.obs-studio..), and once with it in both locations, and under none of those conditions did it show up as a source in OBS. I'm assuming you think I copied it wrong because you have mentioned the "with the bin and data inside" multiple times, but I assure you I got it right, I've been using linux for well over 20 years, I have an ok idea of what I'm doing I would think. But to reassure you:

Code:
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $ ls
bin  data
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $

As you can see it is indeed in the location you specified with both bin and data there, and as you can see there is stuff in those dirs as well:

Code:
bobofett@picard
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $ cd bin
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/bin $ ls
qtwebkit-browser.so  renderer
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/bin $ cd ../data/
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/data $ ls
locale
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/data $

This DID NOT work, as I have said. I don't know what the correct solution is, but what I tried worked regardless of how "correct" it may or may not be. Either way it seems to be a moot point as Twitch Alerts (the primary reason I wanted to use this), plays all the alert sounds, and shows the alert images just fine through the plugin, but when it comes to donation messages being read via text-to-speech, the plugin is not seeming to do it for whatever reason. So I have to resort to screen capping the web pop up TA provides.
 

bazukas

Developer
Sorry if I stepped on any toes there with that suggestion. But, that was what worked for me, and you never responded to the contrary, so I figured it was at least a feasible work around for the time being. I tried copying the plugin folder (yes with the bin and data inside) to both the dirs mentioned above...it did not work. I tried once with it in one location (the default ~/.config...), once with it in the suggested location (~/.obs-studio..), and once with it in both locations, and under none of those conditions did it show up as a source in OBS. I'm assuming you think I copied it wrong because you have mentioned the "with the bin and data inside" multiple times, but I assure you I got it right, I've been using linux for well over 20 years, I have an ok idea of what I'm doing I would think. But to reassure you:

Code:
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $ ls
bin  data
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $

As you can see it is indeed in the location you specified with both bin and data there, and as you can see there is stuff in those dirs as well:

Code:
bobofett@picard
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser $ cd bin
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/bin $ ls
qtwebkit-browser.so  renderer
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/bin $ cd ../data/
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/data $ ls
locale
bobofett@picard ~/.obs-studio/plugins/qtwebkit-browser/data $

This DID NOT work, as I have said. I don't know what the correct solution is, but what I tried worked regardless of how "correct" it may or may not be. Either way it seems to be a moot point as Twitch Alerts (the primary reason I wanted to use this), plays all the alert sounds, and shows the alert images just fine through the plugin, but when it comes to donation messages being read via text-to-speech, the plugin is not seeming to do it for whatever reason. So I have to resort to screen capping the web pop up TA provides.

Ok, I'm really sorry I made the wrong assumptions. Especially @Radzaquiel, since he is the person who changed the installation dir initially (I'm a dummy). I confirmed the problem myself and it seems like the directory structure for plugins has changed. So you can fix the problem by creating "64bit" folder in "bin" directory and moving binaries into there.

I'm gonna fix the installation script later today. Which kinda sucks, since a lot of people still gonna use older version of obs.
 
Ok, I'm really sorry I made the wrong assumptions. Especially @Radzaquiel, since he is the person who changed the installation dir initially (I'm a dummy). I confirmed the problem myself and it seems like the directory structure for plugins has changed. So you can fix the problem by creating "64bit" folder in "bin" directory and moving binaries into there.

I'm gonna fix the installation script later today. Which kinda sucks, since a lot of people still gonna use older version of obs.

Don't blame yourself @bazukas , you're not a dummy ! =D

Well this kind of change had to be expected, given OBS MP is still in a "beta" state...
 

bobofett

New Member
Ok, I'm really sorry I made the wrong assumptions. Especially @Radzaquiel, since he is the person who changed the installation dir initially (I'm a dummy). I confirmed the problem myself and it seems like the directory structure for plugins has changed. So you can fix the problem by creating "64bit" folder in "bin" directory and moving binaries into there.

I'm gonna fix the installation script later today. Which kinda sucks, since a lot of people still gonna use older version of obs.

bazukas you are awesome! That totally worked. Thanks for all the hard work on this project.


On another note, and I understand this might be slightly off topic for this thread, and very well may not in anyway be related to anything in the browser plugin, but I figure I'll give it a shot as I have run in to a dead end with Twitch Alerts support.

I'm not sure if you are familiar with Twitch Alerts or not, but it's a site that displays followers, subscribers, donations as you get them on your twitch stream. You can put a custom image and sound file for each one of them. Then you can launch a web popup which is a sized window with a green background (for chroma keying), and when you get one of the various alerts the image and text shows up on that popup accompanied by the mp3 sound you specified.

They also give you the URL of the popup specifically for the use in OBS CLR browser plugin. Almost every part of it works in the qtwebkit-browser plugin, except for one thing, the donation alert. All the other alerts are just the image, some text and the sound file you specified, but the donation alert is all of those things then after your custom sound, a text to speech voice reads aloud a message the donor added. I'm not hearing that message through the qtwebkit-browser plugin. It shows the image and text, plays the sound I've assigned it, but then just does not read the text to speech message. All the other alerts work as they are supposed to (although the first time you play an alert the image and text shows up and it takes 2 or 3 seconds before I hear the sound, but then with no delay if I do it a second or third time...that is a minor thing I can live with, but I mention it because maybe it will give some insight as to why the donation message is not being read?) in qtwebkit-browser, and so does the donation alert, except for the reading of the text to speech. I know people on twitch that are on windows using the CLR plugin and are not experiencing this problem, hence why I'm even bothering to ask here.

I had a bit of a back and forth with the Twitch Alerts guys, and eventually hit the "We don't really know about linux, and not many of our users are on linux" wall with them. I did manage to find out that the text to speech is sent as mp3, if that is any help. So I guess my question is, do you think this could be related to the plugin, or maybe linux in general, something odd with pulse, or what?
 

bazukas

Developer
bazukas you are awesome! That totally worked. Thanks for all the hard work on this project.


On another note, and I understand this might be slightly off topic for this thread, and very well may not in anyway be related to anything in the browser plugin, but I figure I'll give it a shot as I have run in to a dead end with Twitch Alerts support.

I'm not sure if you are familiar with Twitch Alerts or not, but it's a site that displays followers, subscribers, donations as you get them on your twitch stream. You can put a custom image and sound file for each one of them. Then you can launch a web popup which is a sized window with a green background (for chroma keying), and when you get one of the various alerts the image and text shows up on that popup accompanied by the mp3 sound you specified.

They also give you the URL of the popup specifically for the use in OBS CLR browser plugin. Almost every part of it works in the qtwebkit-browser plugin, except for one thing, the donation alert. All the other alerts are just the image, some text and the sound file you specified, but the donation alert is all of those things then after your custom sound, a text to speech voice reads aloud a message the donor added. I'm not hearing that message through the qtwebkit-browser plugin. It shows the image and text, plays the sound I've assigned it, but then just does not read the text to speech message. All the other alerts work as they are supposed to (although the first time you play an alert the image and text shows up and it takes 2 or 3 seconds before I hear the sound, but then with no delay if I do it a second or third time...that is a minor thing I can live with, but I mention it because maybe it will give some insight as to why the donation message is not being read?) in qtwebkit-browser, and so does the donation alert, except for the reading of the text to speech. I know people on twitch that are on windows using the CLR plugin and are not experiencing this problem, hence why I'm even bothering to ask here.

I had a bit of a back and forth with the Twitch Alerts guys, and eventually hit the "We don't really know about linux, and not many of our users are on linux" wall with them. I did manage to find out that the text to speech is sent as mp3, if that is any help. So I guess my question is, do you think this could be related to the plugin, or maybe linux in general, something odd with pulse, or what?

If it gets sent as mp3, I'm sure we can find a way to make it work, considering sound notifications work.
 

bobofett

New Member
If it gets sent as mp3, I'm sure we can find a way to make it work, considering sound notifications work.

Oh, very cool deal. Jamacanbcn at Twitch Alerts support says that text to speech is sent as an MP3. I wonder if it's some kind of timing issue, like it sends both the alert mp3 and the text to speech mp3 at the same time, and just plays the first one it gets and throws the other out? Just spit balling here as I'm not sure how the plugin handles getting more than one sound file/stream thrown at it at once, and I'm not sure even how TA sends them out.

Let me know if I can provide you with any info that might help.
 

bazukas

Developer
Oh, very cool deal. Jamacanbcn at Twitch Alerts support says that text to speech is sent as an MP3. I wonder if it's some kind of timing issue, like it sends both the alert mp3 and the text to speech mp3 at the same time, and just plays the first one it gets and throws the other out? Just spit balling here as I'm not sure how the plugin handles getting more than one sound file/stream thrown at it at once, and I'm not sure even how TA sends them out.

Let me know if I can provide you with any info that might help.

I did a lot of investigating. Twitch alerts actually uses google translate api for text-to-speech sound generation and qtwebkit for some reason does not allow to get that data. My only theory is that this is somehow related to same-origin restrictions. Probably qtwebkit does not correctly implement cross origin resource sharing or there are other bugs. Don't know if I'll be able to resolve this issue, sadly.

But it seems like cef browser for linux is being worked on, which probably will not have this issue.
 

bobofett

New Member
I did a lot of investigating. Twitch alerts actually uses google translate api for text-to-speech sound generation and qtwebkit for some reason does not allow to get that data. My only theory is that this is somehow related to same-origin restrictions. Probably qtwebkit does not correctly implement cross origin resource sharing or there are other bugs. Don't know if I'll be able to resolve this issue, sadly.

But it seems like cef browser for linux is being worked on, which probably will not have this issue.

Well even though this can't be resolved with qtwebkit. I'm really quite impressed by all the effort you have put in bazukas, it's very much appreciated, Thank You.
 

Lithium2142

New Member
i would just like to know how to compile it please.
Did you ever manage to figure it out?

I found this little snippet, https://github.com/kc5nra/obs-browser/issues/1, but I have absolutely no idea where to go from there. It always seems that setting up a build is harder than coding...

Does anyone have an easy to follow guide or has managed to get obs-browser compiled on linux (I'm on Ubuntu 14+)? Honestly if its too difficult I'll take any platform- I just wish I had a guide (I've never used cmake before).
 

Leseratte10

New Member
I have compiled this linux plugin and I'm able to select it as a source in OBS, but it just shows a red "frame" (like for every other video source), with no content in it. Am I doing anything wrong?

I also can't use Window Capture in OBS because that always just gives me a red box instead of the window - maybe this doesn't work with Ubuntu?
 

Attachments

  • window_capture_linux.png
    window_capture_linux.png
    54.4 KB · Views: 118
Last edited:
I have compiled this linux plugin and I'm able to select it as a source in OBS, but it just shows a red "frame" (like for every other video source), with no content in it. Am I doing anything wrong?

I also can't use Window Capture in OBS because that always just gives me a red box instead of the window - maybe this doesn't work with Ubuntu?


You have to right click the source after you add it and set the site you want.
 
Could you give us some more details about this?
all it is is bazuka's github qtwebkit-browser source compiled for ubuntu. I checked it out/tested it.

side question: is anyone's twitchalerts eventlist widget not working in bazuka's qtwebkit browser? cant seem to get mine working. works in windows with CEF browser, but not with arch +qtwebkit browser, tried two different systems
 
I did a lot of investigating. Twitch alerts actually uses google translate api for text-to-speech sound generation and qtwebkit for some reason does not allow to get that data. My only theory is that this is somehow related to same-origin restrictions. Probably qtwebkit does not correctly implement cross origin resource sharing or there are other bugs. Don't know if I'll be able to resolve this issue, sadly.

But it seems like cef browser for linux is being worked on, which probably will not have this issue.


unfortunately they also use it for their new "event list" widget. The event list wasnt working in your qtwebkit, upon further testing i checked the event list in Arora browser on linux which is qtwebkit based, and it also suffered the same problem. So I thought maybe it may be fixed in the newer QtWebEngine.. tested in Qupzilla which is qtwebengine based.. still the same problem. :(
 
I did a lot of investigating. Twitch alerts actually uses google translate api for text-to-speech sound generation and qtwebkit for some reason does not allow to get that data. My only theory is that this is somehow related to same-origin restrictions. Probably qtwebkit does not correctly implement cross origin resource sharing or there are other bugs. Don't know if I'll be able to resolve this issue, sadly.

But it seems like cef browser for linux is being worked on, which probably will not have this issue.


I've got CEF Browser able to compile in linux, need a bit of help as I've run into a snag. It seems OBS loads, and all modules load, but OBS' interface doesn't initialize, it just runs in console.

Steps I did to get it compiled:
1. Grab CEF 3.2526.1366.g8617e7c from https://cefbuilds.com/, then extract it somewhere, navigate to the folder and
cmake ./
make
2. clone the obs github directory somewhere:
git clone http://www.github.com/jp9000/obs-studio.git

3. cd obs-studio
4. cd plugins
5. git clone http://www.github.com/gloriouseggroll/obs-browser.git
6. cd ..
7. mkdir -p build
8. cd build
9.
cmake ../ -DCEF_ROOT_DIR=/path/to/extracted/cef/folder -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install

sudo cd /usr/bin

sudo ln -s /usr/share/obs/obs-plugins/obs-browser/cef.pak
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/cef_100_percent.pak
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/cef_200_percent.pak
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/cef_extensions.pak
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/devtools_resources.pak
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/locales
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/natives_blob.bin
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/snapshot_blob.bin
sudo ln -s /usr/share/obs/obs-plugins/obs-browser/icudtl.dat

sudo mv /usr/lib/obs-plugins/cef-bootstrap /usr/bin/
sudo mv /usr/share/obs/obs-plugins/obs-browser/libcef.so /usr/lib/

that brings me to the point im at now.

OBS runs. Seems to run in console.. but no interface ever shows up
obs-browser is loaded properly along with the other plugins, with no resources or files marked as missing, no errors pop up.

current source I have for compiling is here:
http://www.github.com/gloriouseggroll/obs-browser.git
 
Last edited:
Top