Giter Site home page Giter Site logo

broadcast-box's People

Contributors

chasecares avatar clone1018 avatar colemickens avatar dependabot[bot] avatar dilllxd avatar endeavourl avatar jmalland avatar littleq0903 avatar longern avatar makindotcc avatar nathanbabcock avatar redmser avatar s3gfaultx avatar sean-der avatar zenithmdc 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

broadcast-box's Issues

mux: ending readLoop packetio.Buffer error the agent is closed

I set up broadcast-box on a public server in a docker container using the provided docker-compose.yaml.
Ports 80 and 443 are exposed so that the web server obtains a certificate.
It works as expected and the web site shows the broadcast box banner.

However, publishing a stream to the broadcast box from OBS fails.

The log of the broadcast-box docker container reads:

2024/04/20 20:48:32 Loading `.env.production`
NETWORK_TEST_ON_START is enabled. If the test fails Broadcast Box will exit.
See the README for how to debug or disable NETWORK_TEST_ON_START
2024/04/20 20:48:32 Running HTTP Server at `:8080`
Network Test passed.
Have fun using Broadcast Box.
mux ERROR: 2024/04/20 20:48:37 mux: ending readLoop packetio.Buffer error the agent is closed

CORS Issue, Access-Control-Allow-Origin missing

Hi,

I would like to use the WHEP endpoint from a client on a different page (a Firefox extension in this precise case).
But I get rejected because of CORS:

Reason: CORS header 'Access-Control-Allow-Origin' missing

I can see in the code that the header is supposed to get set:

func corsHandler(next func(w http.ResponseWriter, r *http.Request)) http.HandlerFunc {

But that doesn't seem to get to the client, on the BB page or on my FF extension.
These are all the headers that I get:
image

Add simple straightforward design

Given that we're already using Tailwind, it should be possible to utilize the newly incoming Glimesh design to give some consistency to Broadcast Box.

We can also use the Dark Mode feature of Tailwind to switch automatically to the users preference.

Add license information

Hello!

Could you please add information about the license of this repository โ€” is it allowed to copy, change and use the code in any purpose?
It would be great to see any popular open source license.

Support VP8 codec streaming

Currently buffer streams are created with H264 and Opus. If remote tracks are not these codecs, clients cannot play the stream correctly.

Transcode feature

Is it possible to provide an example?

Reading the code I don't find any reference about that.

Example AV1 Gstreamer pipeline for Broadcast Box

May I have an example Gstreamer pipeline for my Broadcast Box server?

Something like:

/Library/Frameworks/GStreamer.framework/Versions/1.0/bin/gst-launch-1.0 videotestsrc ! "video/x-raw,size=1920x1080,rate=30" \
! videoconvert ! queue ! rav1enc ! rtpav1pay pt=96 ssrc=2 \
! queue ! "application/x-rtp,media=video,encoding-name=AV1,payload=96,clock-rate=90000" \
! whip.sink_0 audiotestsrc ! audioconvert ! opusenc ! rtpopuspay ! \
'application/x-rtp,media=audio,encoding-name=OPUS,payload=96,clock-rate=48000,encoding-params=(string)2' ! \
whip.sink_1 whipsink name=whip whip-endpoint="https://BB_ENDPOINT"

Attempting to deploy to GCP / Cloud Run

Has anybody had any success with this? I'm able to get the site working, along with all the WebRTC channels - however, OBS throws an error after about 15 seconds:

WHIP :: SetRemoteDescription - Error! SetRemoteDescription called with no ice-ufrag

The Docker image works as it should when run locally, but not when deployed to CloudRun. Any help would be appreciated.

Selfhosted - Lack of Clear Documentation

Hiya,

i have been trying to set up my own instance for the past ~2h and keep failing left and right.

My first attempt was behind a reverse proxy, but when i realized it exposes UDP ports i moved it to using my SSL Certs directly and running in host mode.

The website is reachable via subdomain.domain.com:8080

And this is where the issues start.
SetRemoteDescription called with no ice-ufrag

Keeps popping up which is weird.

So i saw this existing issue: #40
And tried setting all kinds of parameters.

i use UFW as a firewall so as suggested i opened up 8080 for UDP and did set UDP_MUX_PORT
I also did use INCLUDE_PUBLIC_IP_IN_NAT_1_TO_1_IP but nothing works.

What is the root cause of this issue and whats a fool proof guide to set this up. or which ports do need to be opened. Troubleshooting this has proved impossible for me.

My obs lacks WISH stream option

I built obs on GNU/Linux with -DENABLE_WEBRTC=ON, but then in the stream options, I don't see WISH like in the screenshot in the readme of this project. Am I missing something? I'm using the current master of obs commit 3a1035576eb6a7c60c1757b3498d97da5d7bfb3b

Remove / Update "Peer-to-Peer (if you need it)" section on Readme

Broadcast-box does not create direct connections between two peers on its own.

In the README, it is stated:

With Broadcast Box you can serve your video without a public IP or forwarding ports!

However, this claim is not accurate - we still need to establish connection between peers somehow, and definetely broadcast-box cannot do this for us since we may be limited by NAT - so we may need to have public IP or forwarding ports (we have p2p transmission, not discovery).

Is there a way to enable forced stereo output in the SDP?

Chrome downmixes the audio to mono by default. I had assumed it would be as simple as modifying the string on this line:

RTPCodecCapability: webrtc.RTPCodecCapability{webrtc.MimeTypeOpus, 48000, 2, "minptime=10;useinbandfec=1", nil},

And replacing it with minptime=10;useinbandfec=1;stereo=1, but it seems to have no effect. I tried a few other things, too, but to no avail.

So, I'm not at all sure how this is working. It seems like the SDP is getting filled with minptime=10;useinbandfec=1 somewhere else.

If you have any ideas about this, please let me know. Thanks in advance.

EDIT:
I managed to get this to work by modifying index.js in web/src/components/player/:

diff --git a/web/src/components/player/index.js b/web/src/components/player/index.js
index 21f611f..5d9911e 100644
--- a/web/src/components/player/index.js
+++ b/web/src/components/player/index.js
@@ -66,6 +66,7 @@ function Player({ cinemaMode }) {
     peerConnection.addTransceiver('video', { direction: 'recvonly' })

     peerConnection.createOffer().then(offer => {
+      offer["sdp"] = offer["sdp"].replace("useinbandfec=1", "useinbandfec=1;stereo=1")
       peerConnection.setLocalDescription(offer)

       fetch(`${process.env.REACT_APP_API_PATH}/whep`, {

I'll leave this issue open since it seems more like a hack than anything else and perhaps there's a more elegant solution available, but this was the only solution I've tried so far that worked.

Clients can't watch stream when on different network

I'm trying to run my own copy of broadcast-box and I'm not able to watch the stream from a different network.

I'm using the latest OBS master branch I compiled myself and the latest broadcast-box's main branch which I also compile/run myself.

The exact details are as follows:

When broadcasting to the broadcast-box instance hosted on b.siobud.com I can view the OBS stream from anywhere in the world.

But when broadcasting to my own broadcast-box instance, running on the same machine as OBS, things don't work as well. I can view the stream from a browser running on the same computer as the one running OBS, and I can even view the stream from other devices on the same local network as the computer running OBS. But when I try to access the stream from a different network (friend's home), they can reach http://<my_external_ipv4>:8080 just fine (since I forwarded 8080) and see the broadcast-box UI, but the stream itself doesn't work for them. As mentioned before, when we do the same thing against b.siobud.com it works perfectly fine.

Am I missing something? Is there some other extra port that I need to forward on my router to make this work? What is the difference between the b.siobud.com instance and the instance I'm simply running locally?

My understanding is that Chrome on the viewing side and OBS on the streaming side should, through WebRTC, do whatever's needed to punch through the NAT, and they seem to do it perfectly fine when streaming/watching on b.siobud.com, but for some reason when I host it locally, they can't seem to reach each other.

help me

Can anyone help me please

i have no idea on how to use broadcast Box at all

please help me

Publish Pre-built OBS Images

Due to the WebRTC plugin not being available in OBS yet, we'll need to publish and maintain a small set of test images people can use to run OBS with WebRTC support.

Ideal platforms: Windows x64, Linux x64, MacOS x64 / ARM

Advanced code signing is required on Windows & Mac, however since we can't do that for OBS, we'll just need to have good instructions for the user on bypassing those installation requirements.

Make port configurable

Allow the user to configure the port with a simple environment variable. Should change both the Go HTTP server, and the port the frontend connects to for WebRTC negotiation. Default to 8080.

BB runs great on localhost:8080 but not behind haproxy+ssl

I'm having great success using bb on localhost:8080. But, when I put it on a server with haproxy in front, it will not let me see video. I cannot tell if the issue is with the publish or the playback. I see an webrtc error in the JS console, but that seems to appear when I'm using localhost as well. Is there a way to enable verbose logging on the server and get more information on the full flow?

Runtime Error on Local Network

I tested over LAN from Laptop to my Desktop, and also checked with WAN from Laptop to the SmartPhone. Both had the same error.

It actually shows broadcast box panel but when I input the key and click Watch, this is the error I get in both cases (LAN and WAN)

npm
error

No idea what "Publish Stream" does

Sorry if I'm just being kind of dumb, but I can't figure out what the "Publish" feature is supposed to be?

I figured maybe it was to broadcast a webcam/screen share from the browser? Maybe it's just not working for me?

Support libp2p

libp2p is a modular system of protocols,
libp2p powers many distributed and peer-to-peer systems. Developers can use libp2p as a networking layer to build peer-to-peer applications.

Why libp2p?
There are several reasons to consider using libp2p as a networking layer to create a robust P2P application:

  • Modularity: libp2p is designed to be modular, allowing developers to mix and match different components to meet the needs of their particular application. This makes it easy to customize the networking stack to fit the specific requirements of any P2P application.

  • Extensive transport configurability: libp2p provides a set of specifications that can be adapted to support various transport protocols, allowing libp2p applications to operate in various runtime and networking environments as the wealth of transport protocol choices makes it possible to use libp2p in a variety of scenarios.

  • Versatility: In addition to supporting a wide range of transports, libp2p offers a range of discovery mechanisms, data storage and retrieval patterns, and is also implemented in many programming languages, providing developers with great flexibility when building P2P applications.

  • Security: libp2p includes several security features, such as peer identity verification using public key cryptography and encrypted communication between peers using modern cryptographic algorithms.

  • Robustness: libp2p is a robust and reliable networking protocol that is designed to withstand stress, disturbance, and change. Its features and design choices ensure that it is able to function effectively and efficiently in a wide range of environments, and it is able to recover quickly from disruptions or failures. It also offers protection against network attacks through the use of mitigation techniques.

  • Resiliency: P2P networks are often more resilient than traditional client-server networks, as there is no single point of failure. libp2p includes features such as peer discovery and content routing that help to ensure that the network remains available and accessible even if some peers are offline or unreachable.

  • Efficiency: P2P networks can be more efficient in resource utilization, as data is distributed across multiple peers rather than stored on a central server. libp2p includes various storage and retrieval patterns that allow developers to distribute data efficiently across the network, making it possible to store and retrieve data in a cost-effective and scalable way.

  • Piercing NAT Barriers: libp2p is equipped with capabilities for NAT traversal, which allows P2P communication between peers even when they are behind NAT devices or firewalls. This helps to maintain the connectivity of the network and ensure that it remains accessible despite the presence of these obstacles.

  • Message Distribution and Dissemination: One such pattern libp2p uses is publish/subscribe (pubsub), which allows a sender (publisher) to send a message to multiple recipients (subscribers) without the publisher having to know who the subscribers are. libp2p implements pubsub through the use of protocols like gossipsub, providing developers with a flexible and efficient means of exchanging data and messages within their P2P applications.

  • Interoperability: libp2p implementations in different programming languages and libp2p releases across versions are designed to be interoperable with one another. This enables applications /from different language ecosystems to communicate seamlessly. This helps to promote a healthy, interconnected ecosystem of P2P applications.

  • Decentralization: One of the main advantages of P2P networks is their decentralized nature, allowing them to operate without a central authority. libp2p is designed to facilitate decentralized communication between peers, making it possible to build P2P applications resistant to censorship and more resilient in the face of network disruptions.

Trouble with Gstreamer WHEP

I can see video in Chrome after publishing this via WHIP:

gst-launch-1.0 v4l2src ! "video/x-raw,format=YUY2,width=1920,height=1080,pixel-aspect-ratio=1/1,framerate=60/1" ! videoconvert ! "video/x-raw,width=1920,height=1080,framerate=60/1,format=I420" ! svtav1enc target-bitrate=5000000 crf=63 preset=8 ! av1parse ! rtpav1pay ! 'application/x-rtp,media=video,encoding-name=AV1,payload=97,clock-rate=90000' ! whip.sink_0 audiotestsrc ! opusenc ! rtpopuspay ! 'application/x-rtp,media=audio,encoding-name=OPUS,payload=96,clock-rate=48000,encoding-params=(string)2' ! whip.sink_1 whipsink name=whip auth-token=test whip-endpoint=https://bb.vivoh.io/api/whip

(note: this is not a public server)

But I am not able to see video with this WHEP pipeline:

gst-launch-1.0 whepsrc name=whip auth-token=test whep-endpoint=https://bb.vivoh.io/api/whep ! videoconvert ! autovideosink

However no debug errors are thrown:

vivoh@vivoh-linux:~/Desktop/test$ GST_DEUBG=2 ./whep.sh 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^C^Xhandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:02:43.718775370
Setting pipeline to NULL ...
Freeing pipeline ...
vivoh@vivoh-linux:~/Desktop/test$

whep.sh is:

vivoh@vivoh-linux:~/Desktop/test$ cat whep.sh
#!/bin/bash                                                                                                                                    

export VIVOH_HOME=/usr/local/vivoh

export LD_LIBRARY_PATH=$VIVOH_HOME/lib/x86_64-linux-gnu
export GST_PLUGIN_PATH=$VIVOH_HOME/lib/x86_64-linux-gnu/gstreamer-1.0
#export GST_PLUGIN_SCANNER=$VIVOH_HOME/libexec/gstreamer-1.0/gst-plugin-scanner
export PATH=$PATH:$VIVOH_HOME/bin

gst-launch-1.0 whepsrc name=whip auth-token=test whep-endpoint=https://bb.vivoh.io/api/whep ! videoconvert ! autovideosink

Errors on npm start. Dependencies mismatch?

Followed the guide but got issues on the last part.

  • Installed Node.js for Windows, then Go
  • Following on the web folder run npm install (warns me about some deprecated critical packages)
  • Back on the root folder run go run .
  • On the web folder run npm start, and I get this:

D:\Portable Apps\broadcast-box\web>npm start

> [email protected] start
> dotenv -e ../.env.development react-scripts start

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
(node:13972) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:13972) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled with warnings.

[eslint]
src\App.js
  Line 1:17:  'useContext' is defined but never used         no-unused-vars
  Line 6:22:  'CinemaModeContext' is defined but never used  no-unused-vars

src\components\header\index.js
  Line 6:9:  'navigate' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in [eslint]
src\App.js
  Line 1:17:  'useContext' is defined but never used         no-unused-vars
  Line 6:22:  'CinemaModeContext' is defined but never used  no-unused-vars

src\components\header\index.js
  Line 6:9:  'navigate' is assigned a value but never used  no-unused-vars

webpack compiled with 1 warning

My goal is to broadcast to a class using WLAN, and encode at the same time so they have a repository to rewatch the class.
Also no WebRTC option in latest OBS Studio (v30.0.0)? Should I use WHIP instead?

Cannot get STUN/TURN function working

I saw this comment, and tried to replicate it, but without any success.

What I have tried:

  1. Grab the main branch, run broadcast-box on localhost:8080, and added TURN severs according to the linked comment.
  2. Setup a VM on Google Cloud, opening all ports in both directions
  3. Setup a reverse proxy from desktop port 8080 to GCP VM port 58080 using ssh ssh -R 58080:127.0.0.1:8080 [email protected]
  4. We can now access the stream via http://bar.com:58080/yourStreamkey (no https, it should not matter, right?)
  5. The HTML and JS is rendered correctly, so the proxy is working, but the actual stream is not loaded.

Scenario 1

To simulate a scenario where both the broadcast and the viewer are behind symmetric NAT, and to prevent LAN candidate pairs being picked, I performed the steps above with one extra change, setting ICETransportPolicy: webrtc.ICETransportPolicyRelay in webrtc.Config. Visit http://bar.com:58080/yourStreamkey in Chrome on the same PC as broadcast-box is running or Chrome on a laptop in the same LAN. The stream cannot be loaded. Looking at chrome://webrtc-internals, I get a red box with connectionstatechange: failed. candidateType=relay entries are present in both local and remote stats table

chrome_qQbXzMa7xI

Scenario 2

For a more realistic scenario, I used 4G LTE mobile data and Chrome on Android to view the broadcast. I did steps 1-5, this time not touching ICETransportPolicy. Looking at chrome://webrtc-internals on android, I get the same red box with connectionstatechange: failed. Similarly, candidateType=relay entries are present in both local and remote stats table.

Both scenarios have been repeated with two different TURN servers

  • Pion TURN server hosted on the VM in step 2
  • Tested with Pion TURN client -ping to ensure that it is working
peerConnection, err := api.NewPeerConnection(webrtc.Configuration{
	// ICETransportPolicy: webrtc.ICETransportPolicyRelay,
	ICEServers: []webrtc.ICEServer{
		{
			URLs: []string{
				"turn:bar.com:3478?transport=udp",
			},
			Username: "username",
			Credential: "password",
			CredentialType: webrtc.ICECredentialTypePassword,
		}
	}
})
  • metered.ca TURN server
peerConnection, err := api.NewPeerConnection(webrtc.Configuration{
	// ICETransportPolicy: webrtc.ICETransportPolicyRelay,
	ICEServers: []webrtc.ICEServer{
		{
			URLs: []string{
				"turn:a.relay.metered.ca:80",
				"turn:a.relay.metered.ca:80?transport=tcp",
				"turn:a.relay.metered.ca:443",
				"turn:a.relay.metered.ca:443?transport=tcp",
			},
			Username: :),
			Credential: :),
			CredentialType: webrtc.ICECredentialTypePassword,
		},
	}
})
Chrome Desktop Version 115
Chrome Android Version 114

Delay upto 10 secs after streaming for a few hours

I notice a delay of around 10 secs between the source and client side view. It started off fine.. but over 3 hours the delay got up tp 10 secs. Wonder if anyone else has noticed this.

I am using OBS 29.1.O-505-gdb8ae46ca (64 bit) to stream locally to broadcast-box
I have 4 local viewers in chrome browsers and 1 local obs viewer (as browser source).

Will test it further to see how this delay builds up over 30 mins, 60 mins, 90 mins... 180 mins.

Unable to watch streams with self-hosted broadcast-box outside of LAN

Heyo! I've been testing this along with the WebRTC PR for OBS-Studio, it's working amazingly except for one issue.

I am unable to see streams from my hosted broadcast-box outside of LAN (https://live.dathorse.com/), while siobud site works fine.
Using -e INCLUDE_PUBLIC_IP_IN_NAT_1_TO_1_IP=yes with --net=host hasn't worked, in fact using that environment variable causes OBS-Studio to freeze from an error (if needed, can provide).

Not sure if this is relevant issue for the project?

How to setup it to stream worldwide?

Hello, i'm on windows server 2022 vds rightnow, without virtualizaton, so how can i deploy this tool to be able to connect from every part of planet without using docker? It only starts localhost, no matter development or production enviroment, thanks in advance!

Failed to compile with npm build

root@localhost:~/src/broadcast-box/web# npm run build

[email protected] build
dotenv -e ../.env.production react-scripts build

Creating an optimized production build...
Failed to compile.

./src/components/header/index.js
Line 7: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 8: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 9: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 10: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 11: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 15: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 16: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 17: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 18: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 30: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 31: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 32: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 36: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 37: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 38: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 39: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 41: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 42: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 44: 'React' must be in scope when using JSX react/react-in-jsx-scope
Line 45: 'React' must be in scope when using JSX react/react-in-jsx-scope

Search for the keywords to learn more about each error.

Solution:
add the following line to ./src/components/header/index.js
import React from 'react'

root@localhost:/src/broadcast-box/web# nano ./src/components/header/index.js
root@localhost:
/src/broadcast-box/web# npm run build

[email protected] build
dotenv -e ../.env.production react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

63.29 KB build/static/js/1.9791ad40.chunk.js
1.55 KB build/static/js/main.6ba1d3d7.chunk.js
763 B build/static/js/runtime~main.229c360f.js
297 B build/static/css/main.36234f33.chunk.css

The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:

"homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

npm install -g serve
serve -s build

Find out more about deployment here:

https://bit.ly/CRA-deploy

However, I still get a weird looking page (No css?)

"Failed to connect" when trying to stream

When I try to stream without VPN to https://b.siobud.com/api/whip it fails to connect.
image

Log file

20:47:09.437: [obs-webrtc] [whip_output: 'adv_stream'] PeerConnection state is now: Connecting
20:47:09.970: ==== Streaming Start ===============================================
20:47:42.275: [obs-webrtc] [whip_output: 'adv_stream'] PeerConnection state is now: Failed
20:47:42.275: Output 'adv_stream': stopping
20:47:42.275: Output 'adv_stream': Total frames output: 966
20:47:42.275: Output 'adv_stream': Total drawn frames: 985
20:47:42.276: [obs-webrtc] [whip_output: 'adv_stream'] PeerConnection state is now: Closed
20:47:42.277: ==== Streaming Stop ================================================

How should I do peer-to-peer connection via broadcast-box

In the readme:

"With Broadcast Box you can serve your video without a public IP or forwarding ports! Run Broadcast Box on the same machine that you are running OBS, and share your video with the world! WebRTC comes with P2P technology, so users can broadcast and playback video without paying for dedicated servers.

You could also use P2P to pull other broadcasters into your stream. No special configuration or servers required anymore to get sub-second costreams."

How should I set this up? if I set up a broadcast-box on a machine with a private ip, in another machine not in the same LAN (private ip) how should I point the WHEP location?

Thanks in advance.

Where's the discord?

It's mentioned in the readme, but it's not linked anywhere. I have a problem with the video not being shown when I selfhost (built from source) and watch the stream, I only receive audio, I use OBS to stream

Lack of JitterBuffering on input causes playback issues

I've been trying to stream with webrtc for some days now but keep running into the same issue.

First up: I'm on Gentoo. Tried the Flatpak build from the linked site in #20 but that didn't work at all. After that I compiled obs from master, using the submodules on libdatachannel as opposed to native libraries. With this setup I could stream to broadcast-box on localhost and watch it just fine.

Opening port 8080 others could watch my stream as well, and streaming to my public ipv4 address worked without any issues either. However, I want to run broadcast box on my remote server and this is where the issue arises. I copied the files over and executed the same command to start the server but can't get any video to show up. To make sure it's not some issues with blocked ports I made an ssh tunnel forwarding port 8080 to my local machine and have broadcast box running there. Under this setup the stream works again.

I don't understand why it only works when the server is running my local machine. Both machines used the same command to start it (INCLUDE_PUBLIC_IP_IN_NAT_1_TO_1_IP=yes UDP_MUX_PORT=8080 APP_ENV=production go run .), using the same files and have the same go compiler running it.

My friend used the windows build from the linked issue and streamed to the same addresses I did, with the same results. When I could stream he could too, and when it was broken for me it was broken for him. The only difference was when we tried using https://b.siobud.com/, where his stream worked and my stream only had audio.

Write announcement blog post

We'll need a medium / short blog post to announce Broadcast Box, for sharing on social media. Should overall include the contents of the readme but could also include any background info / shoutouts to WebRTC future / Glimesh.

Update Docker Hub image

Would it be possible to update the Docker Hub image?

Ideally it'd be nice to have it deployed in CI.

Thanks

Creating a guide and tutorial for putting the Broadcast Box project online with domain and SSL.

Hello,

As a user of the Broadcast Box project, we would like to have a step-by-step guide and a video tutorial to assist the community in putting the project online with a custom domain and an SSL certificate. This would allow new users to become interested in the fantastic project which can produce great tools for the community.
In summary, creating a guide and tutorial on how to put the Broadcast Box project online with a domain and SSL would be extremely beneficial for the community.
Please consider creating these resources and I am willing to help in any way.

Add documentation for getting started

Documentation should include at minimum:

  • How to build / install
  • How to run
  • How to run without a shell open

Optionally:

  • How to monitor with systemd
  • Common runtime issues
  • How to start your own WebRTC project with Pion

Host a demo Broadcast Box on Glimesh.tv

Spin up a server and deploy Broadcast Box under some Glimesh subdomain.

Optionally: Add a timer to automatically kill streams after 5 / 10 minutes to deter people from abusing the demo service.

(Need Reproduce) Unable to watch stream when streaming for a while

Hey, thanks a lot for your work on this project! We're working through some of its kinks, but are kind of stumped on this one:

  • Watching a stream over the internet works fine initially. We are self-hosting.
  • But after the stream has been running for a minute or so, new users can no longer start watching the stream
    • According to the WebRTC debugger, packets are seemingly being exchanged, but the video just keeps on loading forever (stuck on black screen / loading spinner)
  • But users that have already started watching the stream continue seeing it without problems

This only happens for one specific user, so it's likely a network configuration/stability problem of some kind.

We tried streaming with the newly released OBS 30, but it also happens via /publish.

Does anyone have any idea how to better debug this issue, or fix it?

Public use of the status page

Hello, I have a few questions about the status page.

Are there any plans to disable the status page?
Is it acceptable to regularly pull the status page to monitor for new streams?
If yes, is there preferred frequency?

Would the project be open to a PR that would add a isActive key that would indicate if the stream key is in use?

I made a simple python script that checks the status page every ~5 minutes to look for new streams, and it has been quite entertaining. I've seen many interesting game streams, security cams and many people testing they are streaming setups, it's quite random and reminds me of the early days of Twitch.

I would like to create a simple script that will send a discord notification when a new stream is active, without being a burden on the system.

Thanks!
Chase

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.