Coder Social home page Coder Social logo

fzwoch / obs-teleport Goto Github PK

View Code? Open in Web Editor NEW
435.0 15.0 16.0 924 KB

An OBS Studio plugin for an open NDI-like replacement. Pretty simple, straight forward. No NDI compatibility in any form.

License: GNU General Public License v2.0

Go 98.57% C 1.43%
obs obs-studio plugin teleport ndi

obs-teleport's Introduction

OBS Teleport

An OBS Studio plugin for an open NDI-like replacement. Pretty simple, straight forward. No NDI compatibility in any form.

Just as an alternative option for stream setups with multiple machines wanting to transmit some OBS Studio scenes to the main streaming machine in LAN.

Notes

Obviously a network connection must be made between sender and receiver. So they must be on the same network for peer discovery. In case no discovery is working, or no video/audio is being transmitted, make sure to disable network firewalls.

Alternatively you can force the sender to listen on a specific port and set the firewall to allow this port to accept connections.

Having at least 1 Gbps of a stable network connection is kind of required / highly recommendend. You can try to make a lower quality stream work with less bandwidth, but this is then up to you to experiment with.

As of now only the Audio/Video filter mechanic is implemented on the filter feature (Async sources). Adding it as an effect filter (Sync sources) is currently not supported. Revert to the output mode in this case.

Installation

Please refer to the OBS Studio documentation: plugins-guide, on how and where to install plugins. There are too many platforms and installation options available as the scope of this project could explain and maintain.

Most platforms do have an installer though that may help you with the installation.

Binaries can be grabbed from the Releases section.

Setup Sender

Go to Tools → Teleport.

Check Teleport Enabled.

Setup Sender as Audio/Video Filter

Click <Source> Right click → Filters.

Click + → Teleport.

Setup Receiver

In your Scene do Sources → Add → Teleport.

Select a detected stream from the Teleport drop down.

obs-teleport's People

Contributors

fzwoch avatar t-h2o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obs-teleport's Issues

Black frames when switching scenes

I tried Teleport as a substitute for OBS NDI and while it otherwise works fine, at least the latest version (0.5.0) seems to produce a black frame into the source output when switching between scenes with Teleport sources. This happens even if all the sources are visible in multiview and thus being sent and received while switching. Anything I'm missing?

Add capped channel for asynchronous processing

Currently there is no channel for the asynchronous processing. Meaning the processing queue may grow indefinitely in case performance problems or network congestion.

Should not matter in the regular case but would still be nice to have and get reports on these occasions.

M1 arm64 deadlock

Looks like interacting with the the frontend API is deadlocking/crashing OBS.

Can be reproduced with the following plugin:

package main

// #include <obs-module.h>
// #include <obs-frontend-api.h>
//
// extern void frontend_event_cb(enum obs_frontend_event event, void* data);
//
import "C"
import (
	"log"
	"unsafe"
)

var obsModulePointer *C.obs_module_t

//export obs_module_set_pointer
func obs_module_set_pointer(module *C.obs_module_t) {
	obsModulePointer = module
}

//export obs_current_module
func obs_current_module() *C.obs_module_t {
	return obsModulePointer
}

//export obs_module_ver
func obs_module_ver() C.uint32_t {
	return C.LIBOBS_API_VER
}

//export frontend_event_cb
func frontend_event_cb(event C.enum_obs_frontend_event, data unsafe.Pointer) {
	log.Println("event:", event)
}

//export obs_module_load
func obs_module_load() C.bool {
	C.obs_frontend_add_event_callback(C.obs_frontend_event_cb(unsafe.Pointer(C.frontend_event_cb)), nil)

	return true
}

func main() {}

Could be a Go runtime issue when using cgo. But I have no idea..

Shuts down encoder PC

Doesn't leave a crash, just kills the application on the encoder PC after 30-60 sec of running.

Automatic connect / reconnect for source

Currently there is only one try to connect to an existing stream. If the stream goes away and returns nothing happens. Would be great if the same stream gets connected again. May require #4 before tackling this one.

Fix leaking C.CStrings

All over the place we need to gracefully handle the C.CString() values. They are leaking and are some annoyance between Go and C's memory model.

Long term synchronization

Add an option to source properties to timestamp incoming date to current clock. May be helpful to avoid increasing latency over time due to clock drift between machines.

Cleanup log.Println()

We have a couple of log.Println() all over the place to get a feeling about socket operations. Remove them once we are kind of confident things are okay.

Performance issue.

So I used NDI before but unfortunately, the Screen Capture module footage was lagging/choppy for me, the audio was fine though. I tried with Screen Capture HX and the gameplay was smooth but I ran into the issue with the audio being delayed.

I learned about Teleport and was hopeful. I set it up on both machines and the audio was surprisingly on point with practically zero notice in delay. However, I noticed a sudden delay in gameplay footage between swapping from different IP selections within the menu. One was noticeably better than the other. Well, I found the correct one without delay, but the moment I hopped into a game, I had terrible FPS... I mean it was from 100+ to about 30 FPS. I did some investigation and the moment I disabled "Teleport" on the gaming rig "The Sender" my frames shot right up.

Any clue on what could be causing this? Literally worked perfectly for my needs but that is the setback.

Gaming Rig Specifications:
i9-10850k
RTX 3090
32 GB DDR4 RAM

Streaming Rig Specifications:
Ryzen 5 3600
RTX 3060Ti
16 GB DDR4 RAM

Both operating on Windows 11 Pro.

Transmission using the Teleport filter on a video capture device fails every 2nd time

OBS 27.2.4 64 Bit on Windows 10 21H2 with Teleport 0.4.1
I don't have any software firewalls running, Windows firewall is disabled on both PCs.

In my test setup I have one sender OBS on the gaming PC and two receiver OBS instances on the streaming PC. The sender is transmitting a full Teleport stream as configured from Tools -> Teleport (called "Base") and another separate stream only for the cam capture device (called "Face Cam") by using the Audio/Video Teleport filter on this device. The two receivers receive both the "Base" and "Face Cam" streams as separate sources each. I leave the cam setting set to "Partial" for the sake of these tests so that I don't additionally run into issue 1.

The "Base" feed always works for both receiver instances every single time. But the "Face Cam" feed doesn't transmit anything to both receivers. Then I restart the sender and I also get the "Face Cam" feed on both receivers. Restart again, no "Face Cam" feed, restart again, feed is back, you get it, I tried 10 times to be really sure and it's consistent.

If I do the test with only receiver 1 I get the same behavior. And the part why I am sure that it's coming from the sender: if I only test with receiver 1 and e.g. it's working this time, then if I additionally start receiver 2 it will also get the feed. If I only test with receiver 1 and it's not working this time, then if I additionally start receiver 2 it will also not get the feed.

It's weird, maybe some clean-up is not performed by the filter at the end, then the next startup fails but some kind of error handler at least does the clean-up, so that the next start then succeeds again? All I can say is that it's not related to the network port. I set a fixed port for the filter and in both cases where the feed is transmitted and where it's not send I can see with netstat that OBS is indeed listening on that port (and stops listening as soon as OBS is shutdown).

Also it only happens when the filter is used on a video capture device. When I use the filter on a VLC media source that plays a video loop everything works fine every single time.

One more thing: I just noted that after a fresh reboot the cam feed actually worked twice in a row before I started to run into the alternating pattern. So when trying to reproduce this make sure to restart OBS multiple times until it occurs.

not able to receive from my macbook to windows

So i'm trying to receive my macbook teleport on my windows machine, I have allowed incoming traffic on port 85 on my windows machine in the firewall rules.

i also tried a different port but have no success yet.

Macbook
CleanShot 2022-08-31 at 18 28 48

Windows
CleanShot 2022-08-31 at 18 29 46

port 85 from macbook
CleanShot 2022-08-31 at 18 31 25

No streams available — NixOS / macOS

Please tell me what additional information is needed to properly debug this issue.

I have installed Teleport both on NixOS (A) and on macOS (B) systems and can make them work with each other.

On (A) nothing happens when I press "Refresh List" in the list of streams, however everything else seams to "function": the Teleport filter is there, the Teleport source is available, I can turn Teleport on and set an identifier, and moreover, on (B) I can see this machine available, but there is no video/audio feed.

They both are connected to the same network and can see each other by other means, e.g., ssh.

[Feature Request] lossless mode with alpha, QOI format

It looks almost too simple to be true. I think it's single threaded but that might not even be a problem if it's fast enough.
"removal of the size header. This allows for a streaming encoder without having to jump back to set the size in the file header."
This could allow for very low latency transfer as well.
Depending on content lossless will quickly run out of bandwidth on 1G Ethernet but there is plenty of use cases that need alpha and compresses pretty well like text and graphics. Also 10G Ethernet exist.

It already have implementations on github for pretty much every programming language linked.
https://phoboslab.org/log/2021/11/qoi-fast-lossless-image-compression
https://phoboslab.org/log/2021/12/qoi-specification
https://qoiformat.org/
https://github.com/phoboslab/qoi

Desync when alt-tabbing on sender side.

If I ALT-TAB on the sender side while in-game. the receiver will be super behind the current gameplay. Any fix for this?

Both my machines are connected via a 1 Gigabit Cat 6 cable.

Overall FPS performance drop.

I am unsure if I have Teleport setup incorrectly, but I notice a major performance drop making most of my games unplayable. Not sure how to fix it either. I go from 70-100 FPS while playing without teleport then to 30-40 FPS when teleport enables. There's got to be a way to fix this. My machine is pretty decent as well.

Specifications:
Intel i9-10850K
32 GB DDR4 RAM
GPU: RTX 3090 Ti

Color range "Full" on Video capture device doesn't initialize correctly (only a green feed is sent)

OBS 27.2.4 64 Bit on Windows 10 21H2 with Teleport 0.4.1

image

If Color Range is set to Full on a video capture device when initiating the Teleport transmission (i.e. starting the 2nd OBS instance involved in the transmission) the receiving source only shows a green color:
image

All of the other settings on the video capture device (e.g. Color Space, Buffering...) don't affect this issue in any way, only Color Range is relevant here.

It can be temporarily fixed by switching the setting to Partial (this immediately makes the cam feed being transmitted instead of just green) and when switching back to Full even this is working (and the color range visually changes).

So it doesn't seem that Color Range set to Full isn't supported in general, it's only some initialization that fails when it is set to Full.

Another interesting thing: applying the workaround of switching to Partial and then back to Full is solving the problem proactively even before any Teleport transmission is active. So if only the sender OBS is started first, then Color Range is switched back and forth and afterwards the receiver OBS is started it will immediately work fine.

[Feature Request] Ability to stream to multiple receivers

It seems right now that if two receivers attempt to pull one Teleport stream, neither receiver can pull the video. As soon as I stop pulling from one of the receivers, the other receiver starts working.

Teleport would probably be perfect for us if we could have multiple receivers. That is one thing unique to NDI right now that keeps us on it (as opposed to SRT or RIST which are single-destination), but NDI is rather prone to A/V desync when under CPU load.

[Feature Request] Option to disable stream while not visible

Currently the stream is active until disabled even when not visible.
It would be great if there was an option box (per source) to have it connect and disconnect when not visible since there is a lot of traffic at higher quality settings.

Secondary receiver may not have optimal sync

We do interleave the received data just fine to be as close as audio video sync as possible.

However, a second receiver will get data not from the beginning, e.g. it is most likely to receive more audio data than video data at first. Interleaving is fine here, but since we deliver audio from an earlier point in time than video (first packet of each) OBS may sync this incorrect.

We should discard the data until we start with data close enough for each media type.

[Feature Request] Protocol Documentation

Based on a quick look through of the code, it looks like the protocol is on the simpler side, and if so, I think it would be wonderful to have documentation on the protocol in order to potentially create some unique possibilities that were much harder with NDI.

Property selection for source

Current source properties to select a Teleport stream is broken. We need an idea how to clearly identify a stream. Port is set automatically, so that is not an identification trait. Maybe hostname / ip?

Great OBS solution - how to build it on Raspberry PI ?

I have succesful installed the binary on windows10 and Ubuntu 20.10,20.04 and it works well.

It would be usefull to build it on my Raspberry Pi4 with Bullseye Debian to see how it would perform.
I just do know so much about go - what is needed to build binary on rpi4.

Anyway really usefull alternative to NDI - Great job.

video feed has started to freeze on the receiving end

So I installed teleport 2 days ago for the first time and was able to send my webcam and mic feed from my laptop (fedora 35) over wifi to my desktop (fedora 36) on which I was capturing my game and stream the whole thing with out any issue. It was great.

Then, next day, the only thing that was changed on any of these system was that I ran a 'dnf update' on my laptop ( the sending system ) during which the following packages have been updated:
dnf_update_list.txt

Since then what happens is that once I start both obs applications ( doesn't matter in which order ), on the receiving system, I start seeing the feed just fine at first but it almost immediately start lagging and then goes to full freeze. The whole thing happens in about 2-3 seconds. The video gets update by one frame, a recent frame, once every minute or so. The audio feed thou is fine. I didn't see anything noticeable in the obs log files and the reports that gets dump once I close the obs on either side says that none of the frames have been dropped. I attached the log from the sending system ( laptop ):
2022-06-20 21-44-38.txt

I also can see about 2.4 MB/s on the network ( system monitor ) continuously even when, on the receiving system, feeds looks frozen. my web cam output is 640x480@30 fps. Again audio keeps coming through fine.

I have restarted both system multiple time, closed all the other applications, removed the video capture src from the sending system and created a new one, but nothing changed. I'll be happy to provide more data if you tell me how to collect them. Also if you know any of the packages in the list is a dependency for obs or teleport I can try to revert it back and see if that fixes the issue.

I also have amd graphic drivers on both system, 4650g apu on laptop, and vega 56 on desktop.

OBS Studio crashing on mac

Good day. I attempted to install teleport on my mac (OS High Sierra) but now my obs studio continues to crash when I try to open it

Is there something I missed during the installation process? Thank you

[Feature Request] Allow teleport to listen over vpn connections

I admit, I'm not sure if this is a real issue or if I am doing something wrong. I apologize if I am just doing something wrong. I would like to set up a tunnel to allow teleport to be accessed on a PC in another area, on another network, over the internet. I am not sure if I am doing something wrong, or if teleport has a restriction to local network only and is just not listening on the tunnel network.

The use case for me is that I would like to have my buddy have access to my screen/game/webcam from my computer, on his OBS to his stream. Our specific use case is for podcasting and to allow his viewers to see my gameplay in his stream along side his gameplay. Think split screen gaming.

Short lag on the sender side when sending using a filter causes constant A/V desync

Scenario to reproduce:

  • Start with a vanilla OBS 27.2.4 instance and install the latest Teleport plugin to it.
  • Run the OBS instance and do some base configuration fitting your setup, e.g. disable mic and set audio devices correctly.
  • Add an Image Source with "Unload image when not showing" enabled and add a large image to it, e.g. one from here.
  • Add a Media Source with this video loop and the "Loop" setting enabled. Mute this source and just to be sure move it out of the canvas so that it's playing but not visible.
  • Add a Teleport filter to the Media Source with the A/V test video loop and enable this.
  • Add a Teleport source tuned into the Teleport feed that was just configured.
  • The video loop should now be playing through the Teleport source perfectly in sync.
  • Now click the eye icon next to the Image Source multiple times in rapid succession to have the constant loading and unloading cause lag, watch the OBS Stats window to observe this if you want to be sure. Then stop and wait until no more frames are dropped.
  • Result: The video loop displayed through the Teleport source now has A/V desync
  • Now hide the Teleport source and then show it again, this will make the feed become in sync again

Some additional notes:

  • The same occurs if a similar scenario is repeated with separate sender and receiver instances on different computers.
  • The same applies to audio only Teleport streams.
  • What causes the lag doesn't matter, in another scenario it was triggered by a Game Capture source that is lagged for a second when tabbing into and out of a game.
  • Doing a similar test with two separate OBS instances and using the base stream through Tools -> Teleport (instead of a filter) to send out the stream does not show this behavior. After the lag ends the A/V sync completely recovers every time.

Quality setting and resource usage

Teleporting a 4k game source at 90% quality works fantastic.

Increasing the quality between 90% and 100% increases both network usage AND resource usage, eventually causing rendering lag in OBS. It seems counter-intuitive from a raw vs encoding tradeoff standpoint. Is this just how things work?

[Feature Request] Stand alone version of Teleport

I wonder if Teleport can be made into its own thing that can stream whatever feed is fed into it via stdin. This could be awesome to stream, for example, a Steam Deck to an OBS instance, without requiring OBS itself on the Deck. Teleport could act as a simple daemon which is fed the screen feed, for example by Ffmpeg.

Do you think it'd be a good feature to have?

Dedicated cli app for sending usb webcam/capture card without OBS overhead.

This could be useful for simple sending of video without needing to have OBS running on the source hardware.
There is an issue of Windows, Linux and Mac using different frameworks for their usb devices so it might require separate versions for each which isn't that nice.

Linux video lib: https://github.com/blackjack/webcam
Windows API Example: https://github.com/SaturnsVoid/Windows-API-Capture-Webcam
Weird cross platform lib that uses electron: https://github.com/vee2xx/camtron

Outside of the last cross platform one I don't know of any libs that would work on mac

filter unavailable for Syphon

Filter unavailable in Syphon client scene in macOS version. This is needed for use with Serato or game streaming. If this is not an available feature please update readme accordingly. Thanks.

Compile for macOS arm64?

Hi, just was hoping you could offer a precompiled binary for arm64 macOS in the future. Will probably try to compile it myself but support would be great.

(provided macOS binary does not appear to work with arm64 OBS, and nor does linux aarch64)

needs to have open Firewall on Sender-side

In case discovery is working, but no video or audio is transmitted make sure to disable the network firewall on the sender.

Well its a way to let things work, but to push this plugin in a more professional direction it would be great to have some info or howto how to keep things running with firewalls active (on both sending and receiving PC). Whats used for discovery? mDNS? Are there ports that have to be opened for the receiver to grab a stream from sender? (i think this might the way its working) How to change this standards-ports in case of collision? If there are more than one, how to predict which will be choosen (to only open exactly this one).

Don´t get me wrong, i am aware this is only for LAN-use, but not all LANs we´re in are complety trust-worthy, esp. if your setup is mobile. Also there might be compromitted PCs on LAN, trying to use some leaking services on PCs, if they´re not accessable in first place, it would improve security.

OBS V28 support

I have removed the plugin and tried to re install the plugin from its macos folder with bash install.command and also tried with sudo sudo bash install.command but i guess the plugin has to be updated to its new version.

I heard many of the plugins won't work until they are updated with this new release

teleport causing OBS to hang on exit (macOS)

Hi again,

I've noticed that on macOS, Teleport is frequently causing my OBS to hang and consume resources on exit, regardless of whether any Teleport sources are added to any scenes. I took a spindump, which you can find here:

https://gist.github.com/yamyamyamyamyam/ab8a125b9f9e57b46da32e598c3b611f

My reproduction steps (does not occur every time, but pretty often):

  1. Open OBS
  2. Open settings
  3. Close settings
  4. Close OBS

Let me know if there's anything else I can do to help debug this. Thanks!

[Feature Request] Add an option for max latency (for consistency on delay)

I've got a bad router. It sometimes run low latency, sometimes it feels like 2+ seconds. It could have an option to just say "lock at 5 seconds" so it buffers up to that and keeps latency perfectly sync. Of course it should drop frames/packets if things just fail (so it wouldn't desync), but like a stream on Twitch or YouTube, this buffer keeps things going perfectly at a cost of some seconds.

Btw THANK YOU A LOT for this plugin, it is AWESOME! ;P

Framerate doesn't match when streaming

I am using a dual-PC streaming setup with OBS to stream to Twitch using Teleport:

Both of the PCs have Output (Scaled) Resolution set to 1280x720 and the FPS value at 60.

Yet somehow my stream ends up as 720p50 rather than 720p60?

Scene Selection - Game Capture under source?

Hello all,

Teleport is outstanding for transmitting saved media content. WOW, I've tested it now and great job Fzwoch!!

I do have one question, how does one transfer over something such as a DESKTOP or a GAME CAPTURE source from a GAMING PC to a STREAM PC? Am I missing this? I apologize if this is incredibly easy to do. I've tried repeating the instructions a few times.

I do not have filter options in teleport in order to do this - It does work for locally saved media content though.

Thank you for your help in advance, I hope you make it real big with this!

stream performance degradation when change quality

when maintain in 90, works very well, but when I put in 100, the stream FPS loss a lot of performance, I back to 90, but it's continue poor.
I closed both OBS (receiver and sender) and open again, and the performance poor again. I had to restart the Both PCs to return to old performance! I'm only recording in the receiver PC

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.