Universal Video Streaming
DarkSwordsman
This feature request is asking VRChat to implement a "universal" system for streaming video to other users, regardless of the world or instance.
## Concept
The idea is to expose an API endpoint that someone can stream to, kinda like Twitch, which can be projected onto an object in game. This would allow other users to see content from other players near real-time, creating another layer of social interaction. Think of it like a similar social mechanic as someone IRL using their phone to show you something.
So for example: I open my OBS and set my stream URL to
vrchat.com/api/stream
and I have a stream key that VRChat uses to validate. I then start my stream, which allows me to spawn a tablet or something that other people can use to watch. This could either be a single object that everyone sees, or some way to view things on your own
tablet from another friend. Some other thoughts:
## Deployment:
mediamtx is an open source stream relay server.
This is something that can be configured or wrapped with other software, and deployed for a relatively low cost, only requiring a 1 Gbps connection on each VM that can probably handle 2 to 4 full instances of people, depending on bitrate. It simply copies the stream without transcoding (similar to how discord does it), so it's relatively low overhead.
Current video players do accept RTSPT. In the context of mediamtx: This means sending an RTMP stream over port 1935, then the end-user pulls with rtspt on 8554. In my case: I have an OVH VPS on the east coast 2,000 miles away from me. I am able to generally manage < 1 second of latency, even down to 500 ms on a good day. Typically 1.5-2 on the worst days.
Of course, if that costs too much engineering time or resources, VRChat could utilize Amazon's streaming service, or even possibly partner with VRCDN to provide a video backend.
## In-Game Experience:
Probably similar to the camera page, a way to just spawn in an object (tablet) to stream to, or enable streaming on your user object.
If we went the user object route, other users can select your user pill in game or profile through the menu. And similar to how we have different options on the user profile page when a user is in your instance, you should be able to see if they have an available stream to watch.
In game, a user must start a stream manually. What does this mean?
I was thinking we can just make it available whenever the API is being sent a stream, but this could be bad for security reasons (like accidentally streaming your entire desktop without realizing it, because you were streaming earlier).
So you could have a setting where the backend may still accept the stream (for stability reasons, since restarting a stream is more manual than just turning it off in game), but the user can configure whether it's available for other users. This could be after leaving an instance, or even a timer of "are you still there?" to confirm the stream is still running.
Brownie Points: OBS
does
have a local websocket API you can use. Steamer.bot uses it. So for example, you could have OBS running, but configure it's streaming state from in-game via that API, without having to use your overlays.## Safety
Default "opt in". The mechanics of this system would require other users to explicitly subscribe to their stream. Even to the point that you may want to
stop
people from receiving a stream if they are physically separated from other users. This can help save bandwidth as well.This includes mechanics around audio range. We could perhaps do an ear-muffs style interface for "other streams", this way users can't disrupt social experiences, though that is mostly solved already by being "opt-in".
## Other Software that Exists:
I can't remember the name of the company, but LSMedia was testing out RTSP streaming where users in-world could interact with the same computer screen as the host. But I am not sure how far this has gotten. It still apparently works I think, but it's limited to subscribers of LSMedia IIRC.
## Day Dreaming about the Future:
A small scenario:
A user likes to teach people things, or even holds classes for a thing in VRChat. This could enable them to almost have an in-game whiteboard or display to project things on, same as how they do it in school! They can do this in any world they choose, since the system is universal. They would be able to share concepts with people real-time, giving them a much more effective visual aid, rather than relying on pens in-game.
Log In
zimbolt
I'm down for this and it seems to imply it is strictly a stream. Which I like, no YouTube on this feature 👍 A good reporting system is crucial for this as well even though it's Opt-In. Ehhh, no Quest standalone support for it either imo. But maybe I'm just toxic. Adds even more value to VRC+
Angel 천사
The biggest issue here is going to be Bandwidth cost. Feels better just to use Twitch to stream and a SteamVR overlay (XSOverlay, etc) to watch. Bandwidth seems cheap for residential but when running a business, that bandwidth is expensive and streams use
a lot
. Which is why, if you've ever built an Udon Sync or serialization.. the limits are tiny and managed Per Second:1- Udon scripts can send out about 11 kilobytes per second.
2- Udon scripts with manual sync are limited to roughly 64690 bytes per serialization.
3- Udon scripts with continuous sync are limited to roughly 200 bytes per serialization.
So you can't fit even an image into that bucket, much less a live stream. You'll
have
to use something outside of VRC. Twitch, VRCDN, Kick, etc.Video Players in worlds, their video does not transit the VRC network. Your PC goes to Youtube or Twitch directly.
DarkSwordsman
Angel 천사 For sure, I accounted for most of that when writing this post.
My idea is that if it's locked behind VRC+ (or even like a VRC+ Pro tier or something), it should be able to justify the cost easily.
For example, I currently pay for a $5.50/mo VPS from OVH that has 500 Mbps symmetrical. It can theoretically handle an entire 80 person instance at 6 Mbps. Also, with VRCDN, their pricing is $3/mo for 40, $7 for 100, etc. This feature? Likely won't be used by more than 10-20 people at a time for more than a few hours a day by each user. Because of this, I would imagine the costs
could
be justified within the price of VRC+, given people won't use it constantly. If we consider the actual usage and bandwidth requirements, the costs even just for one person shouldn't be more than $1 a month, at most, assuming they spin up VPSes on the spot and only pay for required usage.The feature also doesn't
have
to require VRChat to make or pay for a backend for it. It could just be a client feature and the user inputs their own URL, or they can maybe only allow Twitch/VRCDN urls through it. There's a lot of flexibility for this feature.Really, the feature is just: A portable video player on your person. It doesn't really matter how we get there.
D
Docteh
lsmedia pivoted to working with a service named hyperbeam. its also available to supporters of ProTV. seems to work, personally i wonder why it hasnt been released more widely. business model would be my guess
i'd like to see vrchat get rtspt figured out for quest, should work according to the software they're using (exoplayer, avpro)