obs-backgroundremoval
obs-backgroundremoval copied to clipboard
Obs Background Removal for Ubuntu
i like they added background removal for linux (FOR ARCHLINUX)! i am using ubuntu plz add support for ubuntu make it .deb file plz Thanks
would like this as well
I added the package to pacstall https://github.com/pacstall/pacstall It will work only with the obs-studio version from Ubuntu repos (no ppa, no flatpak, no snap)
I added the package to pacstall https://github.com/pacstall/pacstall It will work only with the obs-studio version from Ubuntu repos (no ppa, no flatpak, no snap)
Hi @Zahrun , I tried to use the pacstall and I got this next:
And it's caused by libobs0
package is missing, which is needed by libobs-dev
so I installed separately but for some reason it removes the obs-studio
package so OBS itself is removed, but it's not a big deal because I could installed again without problems:
But, the big concern that I have is on the version's SHA number which pacstall says that doesn't match:
Do you have any idea how to solve that ?
Thanks in advance
Hi @mperezy , In the first screenshot I think the issue was that you already had onnxruntime installed on your system so the re-installation failed. Installing libobs0 should not remove obs-studio. Are you sure you don’t have the obs ppa on your system ? Hashes don’t match because the v0.3.0-beta file was not found
Can you please tell me which distribution and version of it you are running and what version of obs you have ?
Hi @Zahrun.
Yes, you're right. I pasted the wrong screenshot lol. I tried the first time to build the background plugin with the steps described in the readme, that's why the onnxruntime
was already exists, I delete it and then I tried with pacstall I got this next:
Then I had to install libobs0
manually but as I mentioned it removes obs-studio so I wasn't able to open OBS. And I installed OBS many months ago using the steps from the wepage:
The distribution that I'm using:
My pacscript does not work with the ppa version of OBS.
Run this:
sudo apt remove obs-studio --auto-remove
to remove the ppa version
Then remove the ppa:
sudo add-apt-repository ppa:obsproject/obs-studio -r
Then install the obs-studio from Ubuntu repo:
sudo apt update && sudo apt install obs-studio
That is one step. Now the file not found issue is weird, it’s like the file download failed. Try again after the steps I mentionned?
Also I would advise to actually install the -git version: pacstall -I obs-backgroundremoval-git
because it is more up to date and has more features. That might also actually not have the hash issue
Yes, using obs-backgroundremoval-git
on your pacscript seems it worked:
But now I'm not able to open OBS following the steps you shared first in your last comment LOL. I'm only see the loading animation in the mouse cursor and nothing happens:
What a mess hahaha. What do you recommend to do now ? I think burn my PC could the problem hahahaha :v
@Zahrun
I tired to run obs-studio
from terminal and I'm getting this:
I could solve the problem LOL :v. Given that I had the previous OBS configuration in ~/.config/obs-studio
I had to remove that folder and now it's working like a charm and the obs-backgroundremoval is working very good. Thanks for your assistance on this, @Zahrun !!
Ah I was thinking it might be some configuration from the newer obs-studio that had remained, yes.
I earlier didn’t tell you to do the sudo apt purge obs-studio --auto-remove
because I didn’t know if you had some configuration you wanted to keep ^^
Glad you could get it to work :)
Yes!, thanks so much for your help !
Now, I'm facing another issue :v. I didn't remove the previous obs-studio
configuration folder, I renamed it. So I was able to restore my profiles and scenes, I can see them in OBS as expected, but I can't restore the StreamFX
(for blur background) plugin that I had installed, v4l2sink
hopefully was restored and worked fine. Have you used it ? (StreamFX) If so, how did you installed it in this OBS version ?
This is the official repo and steps to install it, given that I already had the plugin, I only copied and pasted the entire folder inside the current OBS configuration but I'm getting that error that I posted above :/
Yup it seems StreamFX requires obs-studio version 27 as a minimum since version StreamFX 0.10.1 So you can use StreamFX version 0.10.0 with your current setup. Or actually, Ubuntu 21.10 will be out tomorrow and deliver obs-studio version 27 so upgrading to ubuntu 21.10 might have obs work with StreamFX 0.10.1 Or I could try to make the pacscript work with the ppa version but I think it’s complicated
PS: thanks I didn’t know about that blur effect and I was looking for one ^^
God dammit !! Hahahahaha you're I didn't notice the current OBS version that I'm running hahahaha, yes! Using StreamFX 0.10.0
solved the problem hahahaha, how can I didn't notice that LOL.
Thanks so so much for your help !, now I'm able to use the blur effect with this background removal plugin! I'm gonna document this to not forget what we discussed here.
Again, thanks so much pal ! I'll try Ubuntu 21.10 and see how it works.
Really appreciate your assistance here, nice work with your pacscript, made my life very easy.
Cheers !
I’m glad it could help someone. Actually I am on Kubuntu 21.04 (obs 26) and will upgrade to 21.10 (obs 27) whenever it’s out, so I can also post here to tell you if it works. I love the pacstall project it’s like the archlinux an AUR for Ubuntu!
Yes, I'm starting to love pacstall as well haha Nice, if you have news using these plugins with the latest versions I would love it to how those run.
Did you manage to get the blur effect with this background removal plugin to work to get the image from the camera with only the background from the same camera blurred ?
You mean this, @Zahrun ?
LOL !! As you can see in the sources I had to create two gopro sources (yes I'm using a Gopro LOL) the first one to remove the background, and the second one blurring all the video capture, and it's working like NVIDIA Broadcast from Windows, well, not so good but it's much better than blurred background from Zoom hahaha.
Mission accomplished !! 😎✌🏻
For the blurred black border it's only an image with that black border and applied the blur effect from StreamFX
with Dual Filtering type, Area subtype and size 4.
I'm a kinda blurred blacked border lover 🤣
Ah you are lucky you can add two sources from the same camera. It does not work with my cheap webcam. I could use a Source Mirror from StreamFX but I can’t apply the background removal on it. Some people had the same issue https://github.com/royshil/obs-backgroundremoval/issues/26 I’ll see if that can be fixed somehow.
Jeez !. For some reason, the repo that I'm using to be able to stream my Gopro in Ubuntu makes it visible for many programs that use webcams, so I think that's why I can create more than one source of my GoPro in OBS. Maybe you need to use v4l2loopback to stream your webcam, but it is probably you'll get some latency in your webcam source. Maybe if you check that repo can find a possible solution. I don't have a webcam to make some tests, but I think v4l2loopback could solve your problem 🤔
Yup that works! For anyone having the same issue as me, here is how to do:
- Start webcamoid
- Go to camera source, select source and resolution
- Go to preferences and enable virtual camera output
- In OBS, add V4L2 selecting the webcamoid virtual output
- You can add two: one with obs-backgroundremoval and the other with StreamFX blur
All good
EDIT: If you also want to use the OBS virtual camera output:
- Stop obs
- Unload v4l2loopback module
sudo rmmod v4l2loopback
- Load it again with two devices
sudo modprobe v4l2loopback devices=2
- Start webcamoid
- Go to camera source, select source and resolution
- Go to preferences and enable virtual camera output
- Make sure the device selected is the second one because OBS will use the first one
- Uncheck virtual camera box and recheck virtual camera box to apply the change of device
- In OBS, add V4L2 selecting the webcamoid virtual output
- You can add two: one with obs-backgroundremoval and the other with StreamFX blur
- Start Obs virtual camera, it should take the other v4l2loopback device
Good luck ^^
Looks really good !
I'm glad you could solve your webcam issue with v4l2loopback
on webcamoid
.
Also, as a JIC: Don't forget to add a Chroma Key
effect filter to completely remove the background
Hey! Quick post to confirm the upgrade from 21.04 to 21.10 went well. For some reason when I tried obs at first the obs-backgroundremoval seemed super laggy. So reinstalled the background removal with pacsstall and it works well now. So Ubuntu 21.10 + OBS 27 from repos + obs-backgroundremoval-git + StreamFX 0.10.1 works fine. If your setup is working fine with StreamFX 0.10.0 you can also choose to keep it as well.
Yes, absolutely right ! I upgraded to Ubuntu 21.10 and now having OBS 27.0.1 it's working very well with obs-backgroundremoval
and StreamFX
(latest version) plugins.
Nice ! 🎉
@Zahrun Another option is the NDI plugin. You can add an NDI output filter to your cam source and create several NDI sources from it that you can use to apply the blur effect and the background removal filters.
@mhcerri, thank you for sharing the solution, it works great, and it is simpler to use! I added obs-ndi-deb as a package in pacstall ;)
I followed all step, but I have this error when trying to compile:
In the pacscript, I use the following:
cmake -j$(nproc) -DobsIncludePath=/usr/include/obs .. && cmake --build . -j$(nproc)
sudo cmake --install .
Maybe try this
Otherwise, just use pacstall -I obs-backgroundremoval-git
@Zahrun
What linux distribution and version of it are you using?
Can you try the pacstall installation method ? pacstall -I obs-backgroundremoval-git