RTMP and some livestreaming myths…

I have had various discussions over the last couple of years and the same old tired arguments keep coming up about livestreaming. Today I want to address what I think is a major problem and why it keeps happening despite there being alternatives!

RTMP V1.0 was defined way back in 2012 by Adobe and was used to transmit flv files “live”. RTMP stands for Real Time Messaging Protocol and is a very basic and simple protocol that is STILL the main protocol to transmit livestreams, and is assumes that an x.264 codec is used. You can add extra things like security to it (RTMPS) which does add a little bit extra protection against stream hijacking but in reality it’s not secure, is easy to hack and steal a stream and the x.264 codec is pretty rubbish in todays world. So why is it still used? Well it works, and x.264 is pretty light on resources, so for example streaming a game (remember that) generally doesn’t tax the system too much so it also means streaming music from the same system as the DAW etc. is running on works quite well. But with platforms like Twitch hardly changing anything in over a decade it has also meant that the quality of livestreams has hardly changed in a decade either. Twitch for most people is still capped at 1080p30 with a bitrate of 8000, something that in this day and age of cheap 4k tv’s and displays is pretty laughable. Come on Twitch it is 2024 for God’s sake! This reliance on RTMP is also why you hear/see people saying you can’t stream over mobile data and/or WiFi. That’s because RTMP is terrible with anything like packet loss or jitter, both problems that can occur much more often with non-wired connections. Remember I said RTMP is simple, well yes, what it does if there is jitter or packet loss is to simply ignore it and continue where it can. I’m sure we’ve all seen those glitchy streams or audio dropping out. This also means that if the system sending the RTMP stream struggles to render a frame, then that frame disappears into the ether! So we end up with low resolution and bitrate streams to mitigate errors and glitches from happening. All of these factors including that the platforms really don’t like spending any more money than they have to despite making billions each year means the progression in livestreams has been slow if any progress has been made at all. As people have a real aversion to paying for streams this means investment has been poor at best and here we are stuck with a rubbish protocol which is years past it’s sell by date!

So what can we do about this? Well there are a few improvements. Youtube now supports RTMP+ or EnhancedRTMP which at least allows for the x.265 (HEVC) and AV1 codecs to be used that are far, far more efficient at the same bitrates but need beefier hardware to encode. You have also been able to send streams to youtube via the HLS method which is how Netflix, Disney+ et al stream but that needs a fast pc and other issues like up to 30 seconds latency have put most off. HLS can, and does, support HEVC (x.265) though for better streams at lower bitrates, but is harder to setup up even though OBS (for example) has support baked in and has done for a few years now. Twitch is partnering with nVidia to bring along it’s take on enhanced RTMP

Now this IS a step in the right direction but personally I cannot see why Twitch and Youtube don’t embrace better ingestion protocols like SRT and/or RIST both of which have much better options like packet retransmission, buffers and adaptive rates so your stream pretty much works 100% of the time. The only thing I can think of is the cost and the fact that these methods need better hardware. However this hasn’t stopped the platforms from pushing through changes before. SRT for example is how 99.9% of Tv streams are broadcast around the globe these days because of the control over the stream is way better. RIST is also even better than SRT in some ways. Enhanced Broadcasting as seen in the video above for example will need a very modern GPU to work, and most laptops it won’t work well at all because of the hardware requirements needed. The only advantage is that is *should* fall back to a basic setting, but again I reckon that will still mean 1080p lowish bitrate streams until the hardware market catches up. Some newer platforms like live.space have built in SRT support and 4K streams on that platform are common, but it’s not got anywhere near the popularity and/or reach of Twitch and Youtube yet. Perhaps if enough people make the move then we can see them getting their acts together, but it is hard to beat Youtube for example when many tv’s will play a stream back for the average Jo(e) who just wants to catch a stream.

Anyway this rather long post is coming to an end, so here’s the final words. Livestreaming is great, I love it, and it can be really good. But the platforms seem to be putting profit before the users and creators again. They can, and should, do better! If I was to recommend a platform right now, then my first choice would be youtube as it is available for much more viewers, accepts RTMP+, can do 4k streaming if you have the hardware and most people currently don’t get ads in streams. If you’d like to watch the last stream I did on my own channel then it is embedded below. 4k60 stream for you techno lovers!

3dcadmin Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *