Skip to content

Major backend update#386

Merged
IIamaseconds merged 62 commits intomainfrom
backend-rewrite
Aug 1, 2025
Merged

Major backend update#386
IIamaseconds merged 62 commits intomainfrom
backend-rewrite

Conversation

@IIamaseconds
Copy link
Copy Markdown
Collaborator

Massive rewrite of the backend.

Introduces new features as well

  • Stream Profiles
    These can be created through the backend executable with flags '-createNewProfile -streamKey TheKey'
  • Multiple Audio Tracks
    It is now possible to stream multiple audio tracks as well as multiple video tracks to the same stream.
  • Reduces chance of packet bombing
    When using public streaming keys where anyone can submit to the same streams, it will now create separate layers against the stream instead of sending all WHIP packets to the same receiving layer, causing image interpolation and audio issues
  • Easier development with HTTPS.
    Vite now has a proxy which helps when using a self-signed certificate for development locally

Other minor things has been added as well, and a lot of changes to how WHIP and WHEP works.
This will require more testing, so if anyone is able to give it a look through in the coming time to verify that things looks and operates correctly, it would be appreciated. I have tested myself and will continue to do so to catch small issues and fix them before merging.

@IIamaseconds IIamaseconds linked an issue Jul 31, 2025 that may be closed by this pull request
@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

@sleroq

I wasn't able to test it on my VPS with certs managed by caddy, works only locally.

Logs

I have tested setting up a caddy instance on my own domain, and it seems to work somewhat. The only thing I have a little issues with was actually getting it to stream.

Is this something that has worked for you on the latest main branch?

Will start out loading .env if available, and then .env.development or .env.production, in that order. Whichever is found first is applied, and variables conflicting with .env will overwrite .env variables.
Make WhepHandler public and accessible for networktest.
Add networktest flag
@sleroq
Copy link
Copy Markdown
Collaborator

sleroq commented Jul 31, 2025

@sleroq

I wasn't able to test it on my VPS with certs managed by caddy, works only locally.
Logs

I have tested setting up a caddy instance on my own domain, and it seems to work somewhat. The only thing I have a little issues with was actually getting it to stream.

Is this something that has worked for you on the latest main branch?

Yes, main branch is working fine. I will test again later with your latest changes.

@IIamaseconds IIamaseconds merged commit ec65094 into main Aug 1, 2025
4 checks passed
@Sean-Der
Copy link
Copy Markdown
Collaborator

Sean-Der commented Aug 1, 2025

@IIamaseconds does this break existing users at all? I noticed some env variables changed, maybe worth undoing?

any users that break maybe will stop using broadcast box :(

I’m all for breaking things that improve users experience though!

@Tathagata-0
Copy link
Copy Markdown

@IIamaseconds does this break existing users at all? I noticed some env variables changed, maybe worth undoing?

any users that break maybe will stop using broadcast box :(

I’m all for breaking things that improve users experience though!

I'm just an end user so I can't really assist with code, but I'm getting this as of the past few minutes.
Screenshot_20250731_202508

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

You would be right, I actually got so focus on people just pulling the image and not actually configuring it and persisting it while I was testing.
Maybe I could implement a check that accounts for both versions of the environment variable so that people on the old config wont be affected by it ?

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

@Tathagata-0 - Are you on the discord? Maybe I can have a quick chat with you and resolve this. :-)

@Sean-Der
Copy link
Copy Markdown
Collaborator

Sean-Der commented Aug 1, 2025

@IIamaseconds I am sorry, but I think you need to revert :(

For every user that comes on GitHub we are gonna have 10x that break and decide they don't want to use Broadcast Box anymore.

What do you think of reverting (just temporarily) and doing small changes/make sure users don't break? That's the only thing we can't compromise on

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

I completely agree! Lets revert! And I will look into the settings being fixed! Sorry I didn't get to test that part thorough enough! I am going to replace the 'latest' so that people will pull the prechange version of the image! :-)

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

Revert should be done now, and "latest" is back to previous version. Seems like it works here.
@Tathagata-0 - If you pull the newest version, does it work again?

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

Also, @Sean-Der - I think you are right that it is the .env files.
I am going to writer a converter for them so that it wont be an issue next time.
It's going to take any given .env file and move it to a .bak, and then iterate through the settings and migrate them to a new file, so people can have their settings and not worry about the migration of them. My bad!

@Tathagata-0
Copy link
Copy Markdown

Revert should be done now, and "latest" is back to previous version. Seems like it works here. @Tathagata-0 - If you pull the newest version, does it work again?

No luck for me, but I was using https://b.siobud.com/api/whip before as I haven't able to figure out how to get it to work locally (in general).

@Sean-Der
Copy link
Copy Markdown
Collaborator

Sean-Der commented Aug 1, 2025

Sorry about that @Tathagata-0 b.siobud.com is be back now!

also if you are interested would love to help you self host :)

@Sean-Der
Copy link
Copy Markdown
Collaborator

Sean-Der commented Aug 1, 2025

@IIamaseconds I don’t use .env files. I’m guessing the majority people don’t (docker/env variables)

We can’t break these settings. Can you please revert (because I deploy against main)

I love all the stuff in the PR. I also believe it’s achievable with zero breakage right?

@Tathagata-0
Copy link
Copy Markdown

@Sean-Der Awesome!

As for self-hosting, that sounds great, I can visit the Discord when I have some time (assuming that's the best place to ask).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add multichannel audio support for player page

4 participants