lets say I need vps or docker container solution maybe I can put on a server and where the OBS can use this as browser overlay its some how isolated from the OBS production
I'm not sure I'm following 100% either, but maybe this will help.
I have separate virtual machines (KVMs) that feed OBS Studio content. What I do is create a Debian KVM with a very minimal desktop that then typically launches a web browser on boot. The browser can be in kiosk mode and goes to a specific URL. The KVM then starts ffmpeg server and listens for connections.
The ffmpeg running on the KVM that gets started on boot, looks like this:
Code:
#!/bin/bash
# Set to ethernet IP of the KVM
NETIP="192.168.100.101"
NETPORT="8888"
while true
do \
DISPLAY=:0.0 \
ffmpeg \
-loglevel quiet \
-f x11grab \
-draw_mouse 0 \
-framerate 30 \
-video_size 1920x1080 \
-i :0.0+0,0 \
-c:v libx264 \
-preset ultrafast -crf 28 -refs 4 -qmin 4 \
-pix_fmt yuv420p -tune zerolatency -ac 2 \
-profile:v main \
-bufsize 969k \
-f mpegts \
"srt://$NETIP:$NETPORT?mode=listener"
done
If you want to capture audio as well, it would be more like this:
Code:
#!/bin/bash
# Set to ethernet IP of the KVM
NETIP="192.168.100.101"
NETPORT="8888"
while true
do \
DISPLAY=:0.0 \
ffmpeg \
-f x11grab \
-draw_mouse 0 \
-framerate 30 \
-video_size 1920x1080 \
-i :0.0+0,0 \
-f pulse \
-ac 2 \
-i default \
-c:a aac -c:v libx264 \
-preset ultrafast -crf 28 -refs 4 -qmin 4 \
-pix_fmt yuv420p -tune zerolatency -ac 2 \
-profile:v main \
-bufsize 969k \
-f mpegts \
"srt://$NETIP:$NETPORT?mode=listener"
done
Then on the OBS Studio side, you would add a "Media Source" or "VLC Video Source" with an URL of the form:
srt://192.168.100.101:8888
This should work for other streams than SRT, but I prefer SRT.
The nice aspect of doing it this way is you don't have to use the OBS Studio browser plugin (which uses an *ancient* browser, likely with many security holes). I don't know of a way the obs-browser plugin can do multiple feeds. Using the above method, you can do as many browsers as you want, just create new KVMs. It allows you to use any browser you want, or even any desktop application. And if the browser should crash, it won't bring down the main OBS Studio stream.
I use this, by way of example, to track aircraft transmitting ADS-B and plot that on a map with dump1090-mutability. The map then gets exported via the SRT feed to OBS Studio. I also used it a lot to export desktops, back in the day, when I was optically tracking satellites.
Happy hacking,
-Jeff