News for hackers. Stuff that matters.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @10:32AM (#35327141)
I am heavily conflicted on this. I am happy that people get access to better codecs. Better compression and those that aren't encumbered with patents/licensing (AV1)

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by der_rod on Monday March 27, 2023 @11:03AM (#35327611)
Well there just isn't "something better". Yet.

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @11:12AM (#35327736)
I use WebRTC today and am happy with it! Works great for broadcasting from Web, Mobile and tools that support it (GStreamer)

I have a PR open to OBS for it right now https://github.com/obsproject/obs-studio/pull/7926

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by tracker1 on Monday March 27, 2023 @11:50AM (#35328227)
How many of those users are direct vs. relaying through a TURN server? I'm genuinely curious, as I kind of anticipate that the majority of users are relaying, but I guess if p2p requests can open router ports in the common config, that could work.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by londons_explore on Monday March 27, 2023 @01:03PM (#35329202)
IPv6 users usually manage a direct connection, and that is ~half the world now.

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by tracker1 on Tuesday March 28, 2023 @04:46PM (#35347582)
I realize most of that... just didn't realize how many work in terms of direct connection, which is nice to hear.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by londons_explore on Monday March 27, 2023 @01:02PM (#35329170)
When a PR sits for many months and has hundreds of comments, it probably means it's getting near to bikeshed territory and it would have been better to get small PR's in adding the groundwork and a project plan agreed with leads beforehand...
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @01:07PM (#35329243)
Project leads created the original PR + RFC

* 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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sesse__ on Monday March 27, 2023 @12:14PM (#35328525)
SRT is definitely “something better”. It doesn't support codec negotiation, but it's more generally much more reasonable than RTMP for video ingest.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by der_rod on Monday March 27, 2023 @12:31PM (#35328751)
Doesn't support AV1.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Dylan16807 on Monday March 27, 2023 @12:49PM (#35329002)
1. It looks like RTMP didn't support it, and arguably still doesn't, since they link to an "enhanced RTMP" spec.

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."

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by der_rod on Monday March 27, 2023 @12:56PM (#35329081)
1. Yes, it's an extension to the spec published by an organisation Adobe and Google are a part of. It extends the protocol in a backwards-compatible way.

2. SRT, in practice, is only ever used with MPEG-TS as the container for audio/video data, which does not support AV1.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Dylan16807 on Monday March 27, 2023 @01:04PM (#35329213)
The point is, you don't even need to extend the protocol for SRT. You just need to set up servers that are ready, just like companies are in the middle of doing for other techs.

Which I'm sure is still significant work, but is it much harder to do with SRT?

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by der_rod on Monday March 27, 2023 @01:32PM (#35329623)
> You just need to set up servers that are ready

The "just" is doing a lot of work here. Extending existing RTMP infrastructure is obviously much easier than spinning up an entirely different one. And you'd still have specify a way to use anything but MPEG-TS to send audio/video over SRT, which de facto does not exist (at least not that I can find).

I agree that extending RTMP isn't ideal, but other solutions have their own set of limitations, problems, and challenges. Whether that's SRT, RIST, or WebRTC.

For better and worse, RTMP and dealing with it at scale is well understood.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sesse__ on Monday March 27, 2023 @05:56PM (#35333287)
SRT is transport-agnostic. I've streamed AV1 within MKV within SRT.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by toast0 on Monday March 27, 2023 @12:23PM (#35328643)
> 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.

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by rcme on Monday March 27, 2023 @01:51PM (#35329904)
Does codec negotiation really make sense? Encoding video is so expensive that you can only realistically support one or two codecs at a given time. Anything else is wasteful.

> * 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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by formerly_proven on Monday March 27, 2023 @02:22PM (#35330288)
> Encoding video is so expensive that you can only realistically support one or two codecs at a given time. Anything else is wasteful.

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).

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by kevincox on Monday March 27, 2023 @03:53PM (#35331514)
Although in practice you often don't want to do these completely separately. What you want to do is encode the lowest quality as a "base" then medium as extra data that you can add on top, then high as extra data on top of that. This does make the higher qualities slightly less efficient but requires only slightly more data to broadcast different qualities. It would be extra cool in P2P use cases where everyone will be re-sharing the low quality instead of the users with the best connections using a completely separate stream and leaving no good connections to re-share the low quality stream.

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @02:02PM (#35330046)
> Does codec negotiation really make sense

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by favsq on Monday March 27, 2023 @02:06PM (#35330089)
>What if you have a low powered device that only has a H264 hardware decoder? What if you have two desktops that prefer AV1.

You recode on the server.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @02:25PM (#35330329)
You don't have a server (and in my cases you don't want)

* 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

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by favsq on Monday March 27, 2023 @02:35PM (#35330477)
That's not a good solution for... almost anybody. Most people would rather have the remote server recode, they would rather not have to open ports (with some connections you just can't), they would rather not expose their IP addresses, etc.

I can see your point but it has nothing to do with what platforms like Twitch are for.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @02:40PM (#35330551)
You wouldn’t open ports, you are in the same network.

I don’t think P2P is the answer to everything, in the same manner servers aren’t the answer to everything.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by MawKKe on Monday March 27, 2023 @02:48PM (#35330673)
I've been wondering about that multi track thing w.r.t video live streams

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.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by kevincox on Monday March 27, 2023 @03:48PM (#35331435)
> so that you could independently choose/optimize each channel's compression and thus make the whole stream more efficient?

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).

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by zamadatix on Monday March 27, 2023 @02:59PM (#35330806)
Even if WebRTC or something that supports all of these is added I still wouldn't be sad we are extending RTMP. If the next hot new thing requires artificially limiting the old thing then it's not really the next hot new thing.
Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by Sean-Der on Monday March 27, 2023 @03:06PM (#35330919)
The lack of collective 'internet user' ownership makes me sad. Many people want to improve RTMP, but an open discussion doesn't exist.

If RTMP was in the IETF my comment wouldn't apply anymore.

Re:OBS Studio Lands AV1 and HEVC RTMP Streaming Support by zamadatix on Tuesday March 28, 2023 @12:11AM (#35335825)
While not specifically the IETF isn't this spec enhancement done by folks in e.g. the obs, ffmpeg, xsplit, and vlc projects? I.e. is this an ideological concern of which standards body owns it or a practical one of people not being able to improve the standard.