npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jp.keijiro.klak.spout

v2.0.3

Published

Cross-process texture sharing plugin (Spout protocol)

Downloads

8,418

Readme

KlakSpout

gif gif

KlakSpout is a Unity plugin that allows Unity to send/receive video streams using the Spout system.

System requirements

  • Unity 2020.3 or later
  • Windows system with DirectX 11/12 support

Currently, KlakSpout only supports Direct3D 11 and 12. You can't use other graphics APIs like OpenGL or Vulkan.

How to install

This package uses the scoped registry feature to resolve package dependencies. Please add the following sections to the manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"jp.keijiro.klak.spout": "2.0.3"

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "jp.keijiro.klak.spout": "2.0.3",
...

Spout Sender component

Sender

You can send a video stream using the Spout Sender component. There are three capture methods available:

  • Game View: Captures the content of the Game View.
  • Camera: Captures a specified camera.
  • Texture: Captures a 2D texture or a Render Texture.

Note that the Camera capture method is only available on URP and HDRP -- You can't use it on the built-in render pipeline.

The KeepAlpha property controls if it keeps or clears the content of the alpha channel. Note that you have to enable alpha output when using HDRP. Also note that you have to use the Texture capture method to enable alpha output on URP.

Spout Receiver component

Receiver

You can receive a video stream using the Spout Receiver component. It stores received frames to the Target Texture. It also overrides a material property specified in the Target Renderer.

You also can refer to the received texture via the SpoutReceiver.receivedTexture property.

Scripting interface

You can enumerate available Spout senders using the SpoutManager class. Please check the SourceSelector example for further usage.

You can dynamically create a Spout sender/receiver, but you must give the SpoutResources asset (which holds references to the package assets) after instantiation. Please see the benchmark examples for detailed steps.

Frequently asked questions

What's the difference between NDI and Spout?

  • NDI: Video-over-IP codec/protocol
  • Spout: Interprocess GPU memory sharing on DirectX

NDI requires CPU/memory/network load, but it's greatly versatile.

Spout doesn't produce any CPU load, but its range of application is limited.

If you're trying to share videos between applications running on a single Windows PC, Spout would be a better solution.