by Sean-Der · 3y ago · 0 comments
I am sad that we are extending RTMP instead of adopting something better. I want things like
* Codec negotiation happening at connect time, so we don't hardcode things
* Multi-track. So users can upload multiple audio tracks, or do Simulcast. I would love a world where users upload the multiple quality levels. Then anyone could run a stream service, not just those that can afford transcodes.
* P2P. Stream your OBS output directly to another user. It is frustrating to see users struggle with setting up RTMP servers/HLS when they want to share their video with just one or two other people. The other use case I really care about is co-streaming.
* Standardized. I would like to see whatever protocol we use be discussed in the IETF. It frustrates me that it is just companies behind closed doors deciding things. If an individual/open source/startup has an idea or use case it is never going to make it into RTMP.
I have been trying to add WebRTC support https://github.com/obsproject/obs-studio/pull/7926 so I am hopeful for the future.
MoQ (Media over QUIC) development is underway at the IETF - with involvement from Twitch/YouTube/Facebook/Cisco/etc. - but will probably still take quite some time before its finalised and can be adopted.
I have a PR open to OBS for it right now https://github.com/obsproject/obs-studio/pull/7926
IPv4 users seem to manage a connection ~70% of the time in my experience. Remember only one peer needs to have a router with a suitable config for everything to work.
* PR https://github.com/obsproject/obs-studio/pull/7192
* RFC https://github.com/obsproject/rfcs/pull/43
I tried to keep the size as small as I could. It is just basic audio+video (no Simulcast/ICE Renegotiation etc...) It has been a tough process, but I am going to keep working on it until I can get consensus.
2. "Unlike some other protocols that only support specific video and audio formats, SRT does not limit you to a specific container or codec, since it is media or content agnostic. SRT operates at the network transport level, acting as a wrapper around your content. This means it can transport any type of codec, resolution or frame rate. This is important because it can future proof workflows by working transparently with MPEG-2, H.264, and HEVC for example."
I believe both AV1 and HEVC/h.265 specify optional Scalable Video Coding, although I don't know if that's a common feature of encoders or if this integration supports it. If the stars align, it's straightforward to choose parts of the stream to throw away to fit into available bandwidth or decode capacity without transcoding. Of course, decoder support is also needed.
Wouldn't it make sense to have separate channels for distinct content streams (e.g game capture, face camera, overlays..) so that you could independently choose/optimize each channel's compression and thus make the whole stream more efficient?
I don't know anything about compression algorithms, but I hypothesize that maybe now the algos would also be able to do a better job since the frames have less abrupt discontinuities (in the viewport perspective).
This would also enable stream viewers's to activate/deactivate channels when needed. For example, when the overlay/webcam/etc occludes the view on layer (channel) below.
In general the compression algorithm will make an intelligent decision on where to spend bits. However you may gain a bit more accuracy here. The better win may be to set priorities (maybe make the scrolling text crisp right away because it doesn't move often anyways) but I am still skeptical that you would see much benefit.
> enable stream viewers's to activate/deactivate channels when needed
On the other hand this would be very cool. I can also see moving away from fixed aspect ratios to moving the bits around the screen. Maybe the webcam can be above the (non-video) chat rather than over top of the video. Or even just mapping the different streams (that I have selected) into my aspect ratio better (like Google Meet and other video conferencing tools do).
> * P2P. Stream your OBS output directly to another user. It is frustrating to see users struggle with setting up RTMP servers/HLS when they want to share their video with just one or two other people. The other use case I really care about is co-streaming.
The nginx RTMP plugin supports converting an RTMP stream into an HLS stream. It's pretty easy to set up. Even if OBS used WebRTC or some other p2p solution, you would still need some type of signaling / connection negotiation setup.
On startup you could be connecting two clients that have completely different sets of codecs. What if you have a low powered device that only has a H264 hardware decoder? What if you have two desktops that prefer AV1. WebRTC lets each side publish what codecs they support, and their priority
> It's pretty easy to set up
Yea it is not bad if you are comfortable with those things. I want to empower users who have no idea what Linux, codecs or systemd is. I want to create something like 12 year old me would have used. I could have had a lot of fun with my friends if we could have done P2P.
> you would still need some type of signaling / connection negotiation setup.
I use QR codes for this.
For public signaling is also cheap enough that it could be provided for free. I think the project name was simplewebrtc? Hosting RTMP/HLS for free is prohibitively expensive though.
You recode on the server.
* I don't want to upload my video from my security camera to a remote host. It has security and privacy implications
* I don't have the bandwidth available
* I don't want to pay the bandwidth and compute costs.
* I don't want to incur the extra latency
Even consumer nVidia cards support at least three simultaneous encode streams, which would be perfectly cromulent for a relay-only streaming service (high / medium / phone).
Of course at some number of viewers in a centralized setup it probably does make sense to send just upload the top quality and make separate lower quality streams for small efficiency gains that add up.
If RTMP was in the IETF my comment wouldn't apply anymore.
WebRTC has so much potential, I have big ideas for using it in a number of projects, if I can ever just clone myself a couple of times. Thanks for your work and enthusiasm!
I constantly dream of a much more simple, but also powerful OBS replacement, with separated components for sending inputs to a "compositing" server, that can then rebroadcast via WebRTC. Maybe with customizable templates that could be more powerful than OBS's scenes. With the ability to let viewers customize/change their views further... It's a bit much to type out all here, but the WebRTC-powered future is very exciting.