Code Monkey home page Code Monkey logo

srt-stats-monitor's Introduction

Loopy SRT Stats Monitor

Loopy SRT Stats Monitor

Download

Latest release available here.
Latest beta release if any are available can be found here.

Loopy SRT Monitor is freeware. It contains no ads, telemetry, or other similar content. Carefully read the following content and downloaded text files before running. This program will not launch "out of the box" until the bare minimum of required settings are correctly configured.

This is a program to assist with IRL streaming for popular streaming websites such as Twitch and YouTube, using OBS Studio. This program is currently in use by many Twitch and YouTube streamers and has been proven to a be a valuable asset to their stream.

SRT is described as an open source video transport protocol that utilises the UDP transport protocol. It has several advantages over the abandoned RTMP protocol, including H.265/HEVC streaming.

Using a homemade solution to SRT and/or RIST stream from your location back to your home PC, this program will automatically switch to a "low bitrate" scene whenever your connection is weak, a "fallback" OBS scene whenever your connection is lost, and is restored when your connection resumes.

Basic features MultiCameraSwitch=false allow a simple two-scene scenario, either "LIVE" or "FALLBACK" scene, with an optional "LBR" scene.

Advanced features MultiCameraSwitch=true consider for a two-camera multiple-scene scenario, with an optional "LBR" scene, and can alternate between scenes depending on the combination of cameras/streams used, i.e. stream 1, stream 2, and streams 1&2 simultaneously. See 'readme.txt' for a full description regarding these and other settings.

Twitch streamer sprEEEzy has been a big advocate of high quality IRL streaming at an affordable price, and helping test various equipment. SprEEEzy's Discord has a channel for IRL streaming and techincal discussion. Both the hardware and software can be confusing at first, but as a community, helping each other, we can iron out all the bugs.

I also have a Discord and Twitch channel that I may or may not make use of one day.

live_spreeezy_twitch.mp4

sprEEEzy's Guide

This link has remained here, as it has helped many discover and configure Loopy SRT Monitor. Over time, however, some instructions may have become outdated, and will therefore possibly conflict with details on this page.

https://www.youtube.com/watch?v=ql2SizZLCPs

DOWNLOADS

Programs to download

OBS Studio - https://obsproject.com/
obs-websocket-http - https://github.com/IRLToolkit/obs-websocket-http/releases/latest (automatically downloaded if the Windows installer is used)
Node.js - https://nodejs.org/ (not required if using obs-websocket-http)
VLC 64-bit - https://www.videolan.org/vlc/
OBS Tablet Remote - http://t2t2.github.io/obs-tablet-remote/ (requires OBS WebSocket 4.9.1)

Known OBS SRT issues

Known Loopy SRT Monitor issues

  • "Always On Top" is non-functional (Linux/macOS)
  • Rare case where program might load with extremely large text, making most text unreadable (macOS)
  • While "MultiCameraSwitch" is enabled, mixing an OBS SRT "[SRT]" stream with a non-OBS SRT stream may cause low bitrate to not function as intended. It is recommended to use either two OBS SRT streams, or two non-OBS SRT streams if low bitrate function is enabled.

INSTALLATION

OBS Studio

This guide assumes you have OBS installed and have spent time streaming and an understanding of how it works.

OBS Websocket

Open OBS, enable OBS Websocket, and create a password (Tools -> Websocket Server Settings).

Node.js (not required if using obs-websocket-http)

Following installation of Node.js, run install.cmd within 'Documents\Loopy SRT Monitor' to install "obs-websocket-js" and complete the installation.

VLC 64-bit

This will be used in OBS as a VLC Video Source for the "fallback" streams. It has features not currently available with the default OBS video player.

  • See the "Modifications" section below for recommended changes.

OBS Tablet Remote

Remote access to OBS via OBS WebSocket. Can be used for starting and ending streams, but also recommended in general. Although every effort is made to ensure a smooth experience, issues such as network instability may produce unpredictable results. It is recommended to have remote access of OBS to allow manual control.

MODIFICATIONS

OBS Studio (required)

Open OBS, and within the "Media Source", configure your SRT stream. Consult the OBS SRT & RIST Wiki for more information. Ensure Restart playback when source becomes active is disabled. Recommended setting for Reconnect Delay is 1 second.

Restart playback when source becomes active=Disabled

VLC 64-bit

Open OBS, and within the "fallback" scene, add a source VLC Video Source. Select your video that viewers will see when your connection is lost. The following settings are recommended: Loop Playlist enabled, Pause when not visible, unpause when visible enabled.

Loop Playlist=Enabled

AdiIRC

AdiIRC is a free alternative to mIRC. If you have set FileStatusOutput=true for the purpose of outputting the stream status to a chat room, a sample script is supplied here. Edit vars.ini with your channel name, and place in AdiIRC's root folder. Then load the outputSRT.ini script. Alt+R can be used to quickly access scripts.

A guide to connect AdiIRC to your Twitch chatroom can be found here.

Scripts can also be used to create chat commands. The following are some scripts that can be used and/or edited as required, or you can create your own.

Command Notes Link
!b Admin, mod or user can retrieve current bitrate/s for SLS or NGINX stream/s outputBitrate.ini
!s [scene] Admin or mod (rename moderator_name_1) can manually change to any OBS Studio scene (obs-websocket-http) setScene.ini
!s [scene] Admin or mod (rename moderator_name_1) can manually change to any OBS Studio scene (obs-websocket-js 4.x) setScene_js4.ini
!s [scene] Admin or mod (rename moderator_name_1) can manually change to any OBS Studio scene (obs-websocket-js 5.x) setScene_js5.ini

ADDITIONAL STEPS

OS firewall and router settings may prevent connecting to your home PC from an external source, such as mobile internet. Check firewall settings to allow the correct programs/ports to be accessed. Set a new rule for both inbound and outbound for the selected port.

Investigate how to use your router's "Port Forwarding" setting for allowing connections to the selected port. For security reasons, this should only be enabled while in use. If port forwarding does not work for your connection, your ISP might have CG-NAT enabled for your service and/or certain ports blocked. Confirm whether or not this is the case, and if so, contact your ISP and ask that it be disabled.

If you have been assigned a dynamic IP address from your ISP, No-IP is a great solution.

OBS WebSocket 5.x vs OBS WebSocket 4.x

Loopy SRT Monitor communicates with OBS via OBS WebSocket.

OBS WebSocket 5.x is a first-party plugin available with OBS 28 and newer. Unfortunately some applications might not be compatible with OBS WebSocket 5.x.

Loopy SRT Monitor, however, is compatible with both OBS WebSocket 5.x and OBS WebSocket 4.9.1, and will automatically detect and run whichever has been configured.

If you still require compatibility with OBS WebSocket 4.9.1, simply download and install obs-websocket 4.9.1-compat.

If you also require Loopy SRT Monitor to function with OBS WebSocket 4.9.1 and/or obs-websocket-js, this allows you one of the following options:

Option #1

  • Following installation, Download and install obs-websocket 4.9.1-compat, and then, within the Documents\Loopy SRT Monitor folder, run install.cmd with option 2. This will download obs-websocket-js 4.0.3, the last version to be compatible with OBS WebSocket 4.x.

  • Loopy SRT Monitor configuration file config.ini must then be edited with the WebSocketConnection setting changed to obs-websocket-js, as obs-websocket-http is not compatible with OBS WebSocket 4.x. Note that the default port used by OBS WebSocket 4.x is 4444, and 4455 for OBS WebSocket 5.x.

Option #2

  • Following installation, download and install obs-websocket 4.9.1-compat. Available in the OBS -> Tools menu should now be two independent settings, one for 4.x compat, and one for 5.x. Server Port numbers cannot be the same.

  • To continue using obs-websocket-js, within the Documents\Loopy SRT Monitor folder, run install.cmd with option 1. If not already downloaded, this will download the latest obs-websocket-js compatible with OBS WebSocket 5.x.

  • Loopy SRT Monitor configuration file config.ini must then be edited with the WebSocketConnection setting changed to obs-websocket-js.

  • To use obs-websocket-http however, follow the instructions in the installation and/or readme.txt file and confirm config.ini contains WebSocketConnection=obs-websocket-http.


Send a tip - https://github.com/loopy750/donate

srt-stats-monitor's People

Contributors

loopy750 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

srt-stats-monitor's Issues

Prevent Auto Switch when specific scene is selected

Here's my scenario, I do food deliveries Live and when I get to a client's building/apartment I manually change the scene to a "Droping off, BRB" Scene. The problem is when I get to the elevator for example the signal drops, and it overrides my scene and changes to the low bitrate scene and eventually the signal gets better and back to the live scene showing the client apartment and I don't want to do that. I would like the Scene to stay on my custom scene until i manually change it back to live and from there on it can change by itself.

New Websocket created every second

Dear Loopy,

First, thanks so much for this great open source project!! 🙌

🧐 during streams, I noticed an odd OBS-Websocket connection being opened and closed every second. I traced it back to SRT Stats Monitor. It seems bad, despite harmless. It is also bloating the OBS log files.

Why not have SRT Monitor open a single web socket for the duration of the program's lifetime? ✨

SRT Stats Monitor's current implementation calls separate nodeJS scripts that each open and close their own websocket every single time they are run. I wonder how to make it work for a persistent socket, but it seems the entire approach would need to change.

The nodeJS scripts could be consolidated into a single script that opens the websocket once, and then communicates with the main program on a named pipe. 🤔

Hope this helps
Faithfully,
Bazz

Multiple Scene Bypass

Hello there, I know you have the option to assign a scene that will bypass the auto switching by assigning it here "SceneBypass=" and that works great, but my setup now have multiple scenes that I don't want it to change automatically like my Intro, Outro, Private, etc.. Is there a way to assign multiple scenes to be bypassed?

Rtmp mode wont change scene on Connection Lost

I enabled the rtmp server option using nginx to receive the feed from a gopro and everything seems to be working except when the signal disconnects. Instead of changing to the fallback scene it just stays on Live or low bitrate scene with the last frame of the feed. When the image comes back live it refreshes itself but doesn’t go away when signal lost. The only way to have it react is to go on the properties and exit out, then it goes to the signal lost scene but thats not an option once you are outside. What could be the issue here?

The scene does not switch back

If the source is turned off, then the scene changes to BRB (everything works fine) When the video source is restored, the scene does not switch back.

OBS closes without warning after 30 minutes if stream is considered offline

Hi there,

I am using OBS 27.2.4 and I am connecting via JS-Websocket (with 4.x compat).

I did some testing in order to make sure I can leave everything in idle mode. However, after the stream is considered offline for about 30 minutes (estimated), restarting the SRT-source causes OBS to close. There is no crash report in the files OBS creates.

I will test this further. What kind of further information do you require in order to troubleshoot this?

Thanks for the awesome tool!

Cheers

LBR scene not triggering

Hello. I'm trying the app for the first time and it's great. Very easy to configure. Now, I had a problem to activate the LBR scene. If I call the scene "Main LBR" it is not activated (even though the message "live LBR" appears in the app window). After a few hours I called the scene in OBS with the name "live LBR" and it works without problems. The scene is activated.

My OS is windows 11. My obs is 29 64bit version and Loopy version is v1.1.0.

I hope this information is useful.

LOOPY cant connect while using Touch Portal

Im using Touch Portal (which also connects by OBS websocket) so my moderators can change things during my IRL streams.
But while using it - I can't connect to LOOPY - it just gives me test number 6 fail.

If I restart the computer - everything is fine. If I turn on Touch Portal - I can't get LOOPY to start (and if I open TP after LOOPY, it just stops working).

SRT Monitor won't change to BRB fail scene

I just updated to OBS Studio 29. Now, SRT Monitor won't change to BRB fail scene. I switched to older version of OBS, but same problem. Reinstalled OBS Studio 29 since older version had same problem. When SRT Monitor connects, scene switches to the scene intro/ scene OK as usual, but when source fails, SRT monitor stays there with black screen.

OBS is open? error blue screen test 6 of 10 failed :(

Is obs open?
test 6 of 10 failed is the error message
Blue screen with error mentioning this open obs?
and the first program I open is the obs before the srt monitor but it doesn't seem to detect it. any help on what problem may be occurring between these 2 programs so that it does not detect that the obs is running?
PS: Have I already configured the configuration file of the loopy750 SRT-Stats-Monitor and checked that both programs are allowed in the windows firewall?

How do you get the bitrate of each of the two SRT streams?

Thank you for contributing to open source software, this project is really inspiring.
I'm trying to recreate something similar in Angular, but I have a problem. I thought I could get the bitrate of the SRT stream with obs-webshocket but I can't find the way.

My question:

How do you get the bitrate of each of the two SRT streams?

Sorry for opening this as a problem, it really is not.
Thank you very much!

belabox cloud - not working

So I have been going down the rabbit hole of relay srt streaming. I have larix app and just signed up for Belabox cloud.

I installed SRT Loopy. I have config'd the file and assigned Bela as the [srt-live-server] I was under the impression that this works with Bela but it doesn't appear to work.

Maybe I have input something wrong but I am not seeing any error on start up for Loopy. It takes about 20 plus seconds to switch to the intro screen which doesn't seem right. Then when I connect in larix nothing happens. If I go to the live scene manually I can see the video is running. So, larix is connecting and like I said - no errors are being thrown.

I feel like it's the port, If I used anything other than 8080 then I do get an error about connecting. So does loopy support Bela relay?

One of my streams constantly causes a switch to the Low Bitrate Scene

My secondary stream seems to cause constant switches to the Low Bitrate Scene. It is a secondary stream so I'm not worried about the connection for that stream. Is there a way to set it to ignore the # 2 stream connection quality for the purposes of Low Bitrate Scene switching so it would only switch when the # 1 stream has connection problems? Forgive me if this is not an appropriate request to submit here I am new to Github.

Bitrate does not show

the file outputBitrate.txt always reads "Bitrate: (#1: n/a)". i see the file getting updated but updates to same value

No video playback after 2nd reconnection

My SRT only reconnects and scene switch after my first lost signal reconnection. When I lost signal for the 2nd time and restart, the mediasource won't display the video and scene won't switch, even though Larix says there is signal.

So far I had to stop-and-play on the media source in order to get video feed back up and scene switch.

[Feature Request] Scenes that get ignored by SRT

Simple but easy:
Define Scenes that are getting ignored when it comes to automatic switching.
For Example: I have a scene with the Text "Currently no Audio" but the video-signal and vise versa.
I can control this via Touchportal or OBS Websocket on my phone.
But SRT keeps switching to the other scene...

Would be awesome to have this feature :)

Problem with LBR scene and iphone

hi, thank you for the program, it works fine but has a problem, with recent iPhones using cinematic or auto stabilization, if you change camera from front to rear it creates 1 second of lag larix, the program interprets it as lbr scene and then goes always in LBR scene change when you change front / rear camera, can fix it? Thank you

bitrate of srt caller

it there a possibility so see the incoming bitrate of a caller in the loopy window?
I use MultiCameraSwitch=false.

I'm looking for a solution, sometimes the audio gets bad when there was a slow mobile connection.
the only solutions a the moment is to restart the source in obs.

Gstreamer SRT source in OBS

Hi,

I've tried to use Media Source for SRT listeners in OBS to no avail. The connection from larix is fine, but OBS just displays black video with the audio. However SRT listeners work just fine both in vmix and in obs when using obs-gstreamer plugin/gstreamer source in OBS. When I do this though, SRT stats monitor boots up fine, but thinks the stream has failed. Is there any way to have it recognize gstreamer sources in OBS instead of just OBS Media Source sources?

Thanks!
-C

[Feature Request] Webhooks

I was just wondering if there is some way to fire a webhook on stream loss? I often run my gear without any screens on so it takes me a while to notice that I'm no longer live. A webhook could be called to send a text (or whatever).

Thanks!

datarhei Core SRT integration

Hi there!

I am reaching out to say how much I appreciate the fantastic work you and your team have done so far. The SRT-Stats-Monitor tool is already fantastic, but I think it would be even better if datarhei Restreamer and Core were integrated into it.

I'm excited about the possibility of seeing this integration become a reality, and I genuinely believe that it would significantly enhance the tool's functionality.

Here is the URL to the API from datarhei Core. https://docs.datarhei.com/core/api-ffmpeg/process/state

Thank you so much for taking the time to consider my suggestion. Keep up the great work!

Cheers,
Sven

Low Bitrate Szene Time

Hello. thanks for the tool. I have the Problem that the switcher switches to fast the szene. Its possible to change the time wich switcher is waiting till he switch in Low Bitrate Szene?

Improve test 6 failure error message

Today's been the 3rd time I've seen someone in the OBS Discord ask for help because they couldn't get this tool to connect to OBS WebSocket, but today I could finally trace down what went wrong: The HTTP tool was missing. My guess is the user unchecked downloading it during the installation process and also didn't read the following instructions on how to download it separately.

It didn't get better when I, trying to help them, downloaded the portable file for a quick check and ran into the same issue, though for a different reason, because the portable .zip doesn't contain the HTTP tool (I think that's intended) and the Quick Start Guide says for OBS 28 that you need it, but for OBS 29 it does not. I even noticed this difference and interpreted it as "aha, so for OBS 29 you don't need this tool because they explicitly left it out from the instructions, then the problem must be elsewhere".

What would have saved us all a lot of time: if the error message would be more clear about why exactly it failed, so in that case "I am configured to use HTTP but I can't find the HTTP tool", instead of making it look like a connection issue. A necessary executable not being found is a big difference to a connection error in the whole troubleshooting approach, so it would help a lot if the error message could clearly indicate that. Thanks :-)

Loopy and Belabox problems

[srt-live-server]
SLS1Enabled=true
SLS2Enabled=false
SLSServerIP1=eu.srt.belabox.net
SLSServerIP2=127.0.0.1
SLSServerPort1=8080
SLSServerPort2=8181
SLSServerStats1=key
SLSServerStats2=stats
SLSServerPublisher1=key
SLSServerPublisher2=publish/live/stream2
SLSServerKeepAlive1=Default
SLSServerKeepAlive2=Default
SLSBitrateLow1=800
SLSBitrateLow2=800
SLSBitrateFail1=300
SLSBitrateFail2=300
Screenshot_1

the second server is disabled, I can’t understand why it gives an error (

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.