Question / Help Browser plugin

Manite

Member
Thank you very much for posting that JohanAR, that thread solved my issue. I now have the plugin working. It's nice to have a browser plugin working finally.
 

Manite

Member
It's working well but I have noticed that it bugs out a little on startup. I have 2 browser sources set up. One for chat and one for current song title and on startup they are both flashing showing bits of each other. If I go into one of them and change the fps up or down and back, then hit ok it's all good. Only does that when I first start OBS though. Not a big deal, just thought I'd mention it though.
 

Manite

Member
The plugin doesn't seem to like to work with TNotifier. Whenever I setup an alert it works fine for a while but after I close obs it crashes when I restart it. I have to remove all references to the alterter from the scenes.json file to get it to start again. Nothing very revealing in the log other than the last line is "07:48:40 PM: source 'TNotifier' (qtwebkit-source) created"

I can carry on using window capture and keying out the bg but was really looking forward to having it as a browser source.

Any word on the official full browser source plugin?
 

bazukas

Developer
The plugin doesn't seem to like to work with TNotifier. Whenever I setup an alert it works fine for a while but after I close obs it crashes when I restart it. I have to remove all references to the alterter from the scenes.json file to get it to start again. Nothing very revealing in the log other than the last line is "07:48:40 PM: source 'TNotifier' (qtwebkit-source) created"

I can carry on using window capture and keying out the bg but was really looking forward to having it as a browser source.

Any word on the official full browser source plugin?
Please include your log and did you have more than one source created?
 

Manite

Member
Ok, here's the log. I had 2 other sources configured before adding the alerts. One for current song and one for the chat window. It only seems to gives the crash once the TNotifier alerts are added though. I tried adding a third one with the default obs page and had no issues on restart.

Code:
08:55:34 AM: OBS 0.10.1 (linux)
08:55:34 AM: Processor: 4 logical cores
08:55:34 AM: Processor: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
08:55:34 AM: Physical Memory: 15941MB Total
08:55:34 AM: Kernel Version: Linux 3.16.0-38-generic
08:55:34 AM: Distribution: "Ubuntu" "14.04"
08:55:34 AM: audio settings reset:
    samples per sec: 44100
    speakers:        2
    buffering (ms):  1000

08:55:34 AM: X and Y: 779 497
Backbuffers: 2
Color Format: 3
ZStencil Format: 0
Adapter: 0

08:55:34 AM: OpenGL version: 3.2.0 NVIDIA 349.16

08:55:34 AM: video settings reset:
    base resolution:   1680x1050
    output resolution: 1120x700
    fps:               60/1
    format:            NV12
08:55:34 AM: No blackmagic support
08:55:34 AM: Failed to start search for DeckLink devices
08:55:34 AM: Failed to load 'en-US' text for module: 'qtwebkit-browser.so'
08:55:34 AM: output 'simple_stream' (rtmp_output) created
08:55:34 AM: output 'simple_file_output' (flv_output) created
08:55:34 AM: encoder 'simple_h264' (obs_x264) created
08:55:34 AM: encoder 'simple_aac' (libfdk_aac) created
08:55:34 AM: service 'default_service' (rtmp_common) created
08:55:34 AM: source 'MainCast' (scene) created
08:55:34 AM: source 'Layout' (image_source) created
08:55:34 AM: source 'Starting' (scene) created
08:55:34 AM: source 'Glitched' (ffmpeg_source) created
08:55:34 AM: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ovadex/Videos/BlenderProjects/StockVideoClips/glitchedcountdown.mov':

08:55:34 AM:   Metadata:

08:55:34 AM:     major_brand     :
08:55:34 AM: mp42
08:55:34 AM:

08:55:34 AM:     minor_version   :
08:55:34 AM: 1
08:55:34 AM:

08:55:34 AM:     compatible_brands:
08:55:34 AM: mp42mp41
08:55:34 AM:

08:55:34 AM:     creation_time   :
08:55:34 AM: 2012-06-06 11:46:50
08:55:34 AM:

08:55:34 AM:   Duration:
08:55:34 AM: 00:00:06.71
08:55:34 AM: , start:
08:55:34 AM: 0.000000
08:55:34 AM: , bitrate:
08:55:34 AM: 18619 kb/s
08:55:34 AM:

08:55:34 AM:     Stream #0:0
08:55:34 AM: (und)
08:55:34 AM: : Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 18618 kb/s
08:55:34 AM: , 29.97 fps
08:55:34 AM: , 29.97 tbr
08:55:34 AM: , 30k tbn
08:55:34 AM: , 59.94 tbc
08:55:34 AM:  (default)
08:55:34 AM:

08:55:34 AM:     Metadata:

08:55:34 AM:       creation_time   :
08:55:34 AM: 2012-06-06 11:46:50
08:55:34 AM:

08:55:34 AM:       handler_name    :
08:55:34 AM: Apple Video Media Handler
08:55:34 AM:

08:55:34 AM: source 'Chroma Key' (chroma_key_filter) created
08:55:34 AM: source 'StartHeader' (image_source) created
08:55:34 AM: source 'BGMusic' (ffmpeg_source) created
08:55:34 AM: pulse-input: Server name: 'pulseaudio 4.0'
08:55:34 AM: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
08:55:34 AM: pulse-input: Started recording from 'alsa_input.pci-0000_00_1b.0.analog-stereo'
08:55:34 AM: source 'Mic' (pulse_input_capture) created
08:55:34 AM: pulse-input: Server name: 'pulseaudio 4.0'
08:55:34 AM: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
08:55:34 AM: pulse-input: Started recording from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor'
08:55:34 AM: source 'Audio' (pulse_output_capture) created
08:55:34 AM: v4l2-input: Start capture from /dev/video0
08:55:34 AM: v4l2-input: Input: 0
08:55:34 AM: max_analyze_duration 5000000 reached at 5015510 microseconds

08:55:34 AM: Input #0, mp3, from '/home/ovadex/Music/10 - Solar Flare.mp3':

08:55:34 AM:   Metadata:

08:55:34 AM:     title           :
08:55:34 AM: Solar Flare
08:55:34 AM:

08:55:34 AM:     artist          :
08:55:34 AM: Solar Heavy
08:55:34 AM:

08:55:34 AM:     album           :
08:55:34 AM: Compilation
08:55:34 AM:

08:55:34 AM:     genre           :
08:55:34 AM: Dance & DJ
08:55:34 AM:

08:55:34 AM:     track           :
08:55:34 AM: 10/11
08:55:34 AM:

08:55:34 AM:     album_artist    :
08:55:34 AM: Solar Heavy
08:55:34 AM:

08:55:34 AM:     disc            :
08:55:34 AM: 1/1
08:55:34 AM:

08:55:34 AM:   Duration:
08:55:34 AM: 00:04:44.73
08:55:34 AM: , start:
08:55:34 AM: 0.000000
08:55:34 AM: , bitrate:
08:55:34 AM: 267 kb/s
08:55:34 AM:

08:55:34 AM:     Stream #0:0
08:55:34 AM: : Audio: mp3, 44100 Hz, stereo, s16p, 260 kb/s
08:55:34 AM:

08:55:34 AM:     Stream #0:1
08:55:34 AM: : Video: mjpeg, yuvj420p(pc, bt470bg), 600x600 [SAR 1:1 DAR 1:1]
08:55:34 AM: , 90k tbr
08:55:34 AM: , 90k tbn
08:55:34 AM: , 90k tbc
08:55:34 AM:

08:55:34 AM:     Metadata:

08:55:34 AM:       title           :
08:55:34 AM:

08:55:34 AM:       comment         :
08:55:34 AM: Cover (front)
08:55:34 AM:

08:55:34 AM: v4l2-input: Resolution: 320x240
08:55:34 AM: v4l2-input: Pixelformat: 21UY
08:55:34 AM: v4l2-input: Linesize: 320 Bytes
08:55:34 AM: v4l2-input: Framerate: 15.00 fps
08:55:34 AM: source 'Cam' (v4l2_input) created
08:55:34 AM: source 'Crop' (crop_filter) created
08:55:34 AM: source 'Image Mask/Blend' (mask_filter) created
08:55:34 AM: deprecated pixel format used, make sure you did set range correctly

08:55:34 AM: source 'TopTip' (text_ft2_source) created
08:55:34 AM: source 'NewTip' (text_ft2_source) created
08:55:34 AM: source 'NowPlaying' (qtwebkit-source) created
08:55:34 AM: source 'Image Mask/Blend' (mask_filter) created
08:55:34 AM: xcompcap: XCompositeRedirectWindow failed: BadWindow (invalid Window parameter)
08:55:34 AM: source 'Game' (xcomposite_input) created
08:55:34 AM: source 'FaceTime' (scene) created
08:55:35 AM: source 'Chat' (qtwebkit-source) created
08:55:35 AM: source 'AFK' (scene) created
08:55:35 AM: source 'AFKBG' (ffmpeg_source) created
08:55:35 AM: Input #0, gif, from '/home/ovadex/Pictures/channel graphics/fire.gif':

08:55:35 AM:   Duration:
08:55:35 AM: N/A
08:55:35 AM: , bitrate:
08:55:35 AM: N/A
08:55:35 AM:

08:55:35 AM:     Stream #0:0
08:55:35 AM: : Video: gif, bgra, 500x273
08:55:35 AM: , 10 fps
08:55:35 AM: , 10 tbr
08:55:35 AM: , 100 tbn
08:55:35 AM: , 100 tbc
08:55:35 AM:

08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/fire.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/fire.gif
08:55:35 AM: source 'Break' (image_source) created
08:55:35 AM: source 'Ending' (scene) created
08:55:35 AM: source 'testbg' (image_source) created
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/fire.gif
08:55:35 AM: source 'Thanks' (text_ft2_source) created
08:55:35 AM: source 'GameLoading' (ffmpeg_source) created
08:55:35 AM: xcompcap: XCompositeRedirectWindow failed: BadWindow (invalid Window parameter)
08:55:35 AM: source 'TNotifier' (xcomposite_input) created
08:55:35 AM: Input #0, gif, from '/home/ovadex/Pictures/channel graphics/loadingtest.gif':

08:55:35 AM:   Duration:
08:55:35 AM: N/A
08:55:35 AM: , bitrate:
08:55:35 AM: N/A
08:55:35 AM:

08:55:35 AM:     Stream #0:0
08:55:35 AM: : Video: gif, bgra, 800x600
08:55:35 AM: , 20 fps
08:55:35 AM: , 20 tbr
08:55:35 AM: , 100 tbn
08:55:35 AM: , 100 tbc
08:55:35 AM:

08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: looping media /home/ovadex/Pictures/channel graphics/loadingtest.gif
08:55:35 AM: source 'Crop' (crop_filter) created
08:55:35 AM: source 'Chroma Key' (chroma_key_filter) created
08:55:35 AM: source 'TestTNotifier' (qtwebkit-source) created
Also, here is a vid of the flicker glitch I mentioned previously.
https://drive.google.com/file/d/0B-fgnPwfu_d0MmVqZHVycmhkelE/view?usp=sharing
 

Manite

Member
I didn't realize there was an update. Just applied it and am happy to report the flicker is gone and no longer crashes on startup after adding tnotifier widgets.
 
Just a heads up this compiles and installs perfectly on arch. I had to dig on the forums to find it though, It probably needs its own thread in the plugins section. Great job bazukas!
 

1Miguel1

New Member
The only problem with the qtwebkit-browser is that it does not detect changes to an html file. So you have to restart the source if you for example want to update a scoreboard using streamcontrol. (Yes I managed to compile streamcontrol for GNU+Linux)

EDIT: This problem appears on Qupzilla as well, which is also based on webkit. So it is probably a problem with webkit.
 
Last edited:

bazukas

Developer
The only problem with the qtwebkit-browser is that it does not detect changes to an html file. So you have to restart the source if you for example want to update a scoreboard using streamcontrol. (Yes I managed to compile streamcontrol for GNU+Linux)

EDIT: This problem appears on Qupzilla as well, which is also based on webkit. So it is probably a problem with webkit.
I pushed an update that should detect file changes and reload. Let me know if there are any problems.
 

1Miguel1

New Member
Still doesn't work with file system.
Some info: I don't think the html file changes its content, (it remains the same in the file system). It grabs data from an XML file and uses it. This works when I first load the file, but not when the XML file is changed.

However, I solved the problem by installing apache http server and loading the browserfiles through http! Now I can use the browser plugin as I want! Thanks for your effort bazukas!

EDIT: I came up with my solution after reading online that webkit may not load certain things if using the file scheme (file://) because of security rules.

EDIT2: It works the same way (using http) with the older version of the plugin.
 
Last edited:

bazukas

Developer
Still doesn't work with file system.
Some info: I don't think the html file changes its content, (it remains the same in the file system). It grabs data from an XML file and uses it. This works when I first load the file, but not when the XML file is changed.

However, I solved the problem by installing apache http server and loading the browserfiles through http! Now I can use the browser plugin as I want! Thanks for your effort bazukas!

EDIT: I came up with my solution after reading online that webkit may not load certain things if using the file scheme (file://) because of security rules.

EDIT2: It works the same way (using http) with the older version of the plugin.
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?
 

bobofett

New Member
I'm sorry if this is the wrong place for this, but this now seems like the unofficial webkit thread.

First all thanks for the awesome plug-in bazukas. I was able to compile it and get it running just fine on OBS version .10 (the newest version in the ubuntu repositories). The problem I'm having is with a manually compiled version of .11. I wanted to try .11 because they've now added a text scrolling filter, which I wanted to implement. OBS compiled and runs just fine, scrolling filter working great, but no love with qtwebkit-browser plugin. I did a git clone to get the newest build, managed to get it compiled and installed to the default location ~/.config/obs-studio/plugins/qtwebkit-browser but I don't see the webkit option in .11. I'm wondering if, because this was manually compiled things are in different directories? If there were changes to .11 that may have broken the way webkit talks to obs? OBS .11 is not even looking in the above mentioned directory for plugins? Or something else.

If you happen to have any insight on this it would be much appreciated. I'd love to give more information like errors etc...but there are none except for the fact that it's just not one of the sources listed in .11. Let me know if there is any kind of information or help I can provide and I'll do my best to help out.

Thanks in advance for any help you can provide, and thanks in general for your effort on this project.
 

bazukas

Developer
I'm sorry if this is the wrong place for this, but this now seems like the unofficial webkit thread.

First all thanks for the awesome plug-in bazukas. I was able to compile it and get it running just fine on OBS version .10 (the newest version in the ubuntu repositories). The problem I'm having is with a manually compiled version of .11. I wanted to try .11 because they've now added a text scrolling filter, which I wanted to implement. OBS compiled and runs just fine, scrolling filter working great, but no love with qtwebkit-browser plugin. I did a git clone to get the newest build, managed to get it compiled and installed to the default location ~/.config/obs-studio/plugins/qtwebkit-browser but I don't see the webkit option in .11. I'm wondering if, because this was manually compiled things are in different directories? If there were changes to .11 that may have broken the way webkit talks to obs? OBS .11 is not even looking in the above mentioned directory for plugins? Or something else.

If you happen to have any insight on this it would be much appreciated. I'd love to give more information like errors etc...but there are none except for the fact that it's just not one of the sources listed in .11. Let me know if there is any kind of information or help I can provide and I'll do my best to help out.

Thanks in advance for any help you can provide, and thanks in general for your effort on this project.
My guess is that you compiled OBS without USE_XDG_... flag, try moving plugin to ~/.obs-studio/plugins directory and see if it works.
 

bobofett

New Member
My guess is that you compiled OBS without USE_XDG_... flag, try moving plugin to ~/.obs-studio/plugins directory and see if it works.
Wow thanks for the very quick reply. And no I didn't use any flags other than the ones provided at this link https://github.com/jp9000/obs-studio/wiki/Install-Instructions. I followed the directions under the "Manually compiling on Debian-based distros" section of that document. Specifically this part:

Code:
git clone https://github.com/jp9000/obs-studio.git
cd obs-studio
mkdir build && cd build
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo checkinstall --pkgname=obs-studio --fstrans=no --backup=no \
       --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes
I just created ~/.obs-studio/plugins and then copied the qtwebkit-browser dir there, then restarted OBS and it's still not appearing as a Source.

Any other ideas?

FYI the specific version of OBS is 0.11.1-49-gb22bc81 if that is in any way helpful.
 

bobofett

New Member
Yes I know, like I said in the first post I had it working just fine in .10. When I moved to .11, I also got a fresh git clone of the webkit as well and compiled it fresh.

Edit: In fact after you said that I just went and git cloned it to a totally different dir, moved the first one it created under ~/.config, compiled it fresh (make then make install) no errors or anything. Move the new qtwebkit-browser from the default location to ~/.obs-studio/plugins and still no luck, not showing up as a source, like it's just not finding the plugin.

On a side note there is a /usr/lib/obs-plugins with all the .so default plugin libraries. I'm not sure if that was the case or not with .10 and/or if the qtwebkit-browser.so in the bin dir of the plugin should be in /usr/lib/obs-plugins as well, or what. I'm assuming that's just for the default plugins and obs at least had the ability to also read those .so from some other plugin dir, but it's not seeming to recognize either ~/.config... or ~/.obs-studio...
 
Last edited:

bobofett

New Member
Update [Solved?]

Well in my side note from my previous post I mentioned that there was a /usr/lib/obs-plugins dir, so I figured what the hell let me try putting the plugin .so in there for webkit. So I copied qtwebkit-browser.so and renderer from ..../qtwebkit-browser/bin to /usr/lib/obs-plugins and started OBS and what do you know it worked! I have no idea if this is the proper solution, but it's doing the trick for me. Thanks for the help, and let me know if you need any further input from me to help noodle what exactly happened here.
 
Top