flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 19 forks source link

Add v4l2sink plugin support #69

Closed sirn closed 4 years ago

sirn commented 4 years ago

This pull request adds support for obs-v4l2sink plugin which can be installed with the similar manner as NDI/BlackMagic support and solves #65.

I decided to use HEAD of obs-v4l2sink instead of v0.1 as HEAD contains several build fixes and it doesn't seems like there's going to be a new release anytime soon.

I've tested this with several apps, e.g. Google Meet, Flatpak Zoom and it has been working fine.


Until this is merged, the steps to use goes among the following line:

  1. Install flatpak-builder
  2. Clone the repo and switch to appropriate branch v4lsink-support (sic):
    $ git clone --branch=v4lsink-support https://github.com/sirn/com.obsproject.Studio
    $ git clone --branch=com.obsproject.Studio.V4L2Sink https://github.com/sirn/flathub com.obsproject.Studio.V4L2Sink
  3. Install a custom OBS Studio (for extension support):
    
    $ cd com.obsproject.Studio
    $ flatpak-builder --force-clean build-dir com.obsproject.Studio.json --user --install
    $ cd ..
  4. Install V4L2Sink plugin
    $ cd com.obsproject.Studio.V4L2Sink
    $ flatpak-builder --force-clean build-dir com.obsproject.Studio.V4L2Sink.json --user --install
    $ cd ..

To use the V4L2Sink plugin:

  1. Install v4l2loopback DKMS
  2. Load the kernel module:
    # modprobe v4l2loopback
  3. Launch OBS and go to Tools -> V4l2sink, and select the loopback video input
flathubbot commented 4 years ago

Started test build 19918

flathubbot commented 4 years ago

Build 19918 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/19109/com.obsproject.Studio.flatpakref
Pshemas commented 4 years ago

how do you install this branch v4l2loopback support? I've tried install using instructions in the 1st comment, but when I do: flatpak-builder --force-clean com.obsproject.Studio.json --user --install

I get : MANIFEST must be specified

sirn commented 4 years ago

@Pshemas sorry I miss one argument; fixed now. It should be

$ flatpak-builder --force-clean build-dir com.obsproject.Studio.json --user --install
$ flatpak-builder --force-clean build-dir com.obsproject.Studio.V4L2Sink.json --user --install
TingPing commented 4 years ago

Unlike blackmagic and NDI, this is entirely open source so we can do better!

  1. Submit a PR here that only adds the extension point to OBS
  2. Create a metainfo file for the extension. Like: https://github.com/flathub/io.github.Hexchat.Plugin.OTR/blob/master/io.github.Hexchat.Plugin.OTR.metainfo.xml
  3. Submit it to Flathub: https://github.com/flathub/flathub/wiki/App-Submission
sirn commented 4 years ago

@TingPing That's much better. I'll update this PR to only provides extension point and work on submitting the extension to Flathub. Thank you!

flathubbot commented 4 years ago

Started test build 20799

sirn commented 4 years ago

@TingPing Not sure if I should rename com.obsproject.Studio.V4L2Sink to com.obsproject.Studio.Plugin.V4L2Sink (since NDI/BlackMagicLibs doesn't have one), but I've removed V4L2Sink plugin & only contain the entrypoint here in this PR. Going to submit V4L2Sink to Flathub soon.

flathubbot commented 4 years ago

Build 20799 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/19951/com.obsproject.Studio.flatpakref
flavorjones commented 4 years ago

Just wanted to say "thanks" to you both for doing this work!