ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support AV1 codec.

tony199555 opened this issue · comments

Alright, the title is very grand, but I don't have much to say.

First, let's talk about Google, Netflix, Firefox, Microsoft and other big players leading the AOM AV1. This is to "defeat" the super unfriendly licensing fee of H265, using a new generation of video encoding developed based on Google's VP10 (which was abandoned and incorporated into AV1). It is completely open source and free. It can be expected that this will be the hottest alternative to H265. In my opinion, apart from RTMP, AV1+DASH/HLS is one of the best solutions for live streaming in the future. Of course, there is still room for improvement in terms of latency.

Next, let's talk about the H265 encoding with a big mouthful of blood. Everyone was looking forward to it before it came out, but when it came out, they were shocked by the licensing fees. The very complex licensing traps make it difficult for large, medium and small companies. In terms of performance, major professional media have written about it, so I won't go into detail. But it is certain that it has improved a lot compared to H264. Comparing it to AV1, it seems that AV1 is slightly better. In the future, there will definitely be many companies using H265, but its share will inevitably be swallowed up by AV1, even a large part of it.

Based on the two most popular options above, I am most optimistic about the prospects of AV1+DASH. First of all, AV1 is open source and free for commercial use, which avoids many licensing traps. Secondly, the use of DASH is more convenient, and multi-resolution/bitrate switching is very flexible and convenient. Moreover, there is no specific requirement for video encoding. Thirdly, RTMP is limited by Adobe's development progress, so far, H265 has been out for several years, and the official still does not support H265.

As for iOS, it's better to stick with HLS. Although DASH can be used, the official clearly doesn't want you to use it, so save some energy.

Welcome to add more!!

P.S. Please make sure to pay attention to AV1 and integrate it into SRS, ffmpeg should support it.

Reference:
http://media.pkusz.edu.cn/achievements/?p=138
https://www.jianshu.com/p/ad8544e2d3fd

I just did some research and found this webpage
https://www.ceve-market.org/static/av1playground/test2.html
I felt the biggest difference at 55 frames, you can go and see.

Second update: Adobe is also one of the developers of AV1, so it is expected to accelerate the integration of AV1 into RTMP.

Third update (never-ending): Apple has recently joined AOM, so Apple will follow up.

commented

FFmpeg already supports AV1

Yes, I've tried it and it feels okay, just a bit slow.

P.S. The correct one is FFMPEG

It's possible, but need more discuss.

Adobe will support AV1, but RTMP may not be updated. You can consider bypassing this problem, such as:

  1. Define a real-time standard, just like 265, RTMP can extend id support.
  2. Use HTTP POST TS method to push the stream, replacing RTMP.
  3. Use HTTP-TS distribution instead of HTTP-FLV.

TS is a more flexible encapsulation, supporting all kinds of codecs, but the drawback is that it is too complex.

Define CodecID for AV1 in FLV:

SrsVideoCodecIdAV1 = 13,

SRS had AV1 support for WebRTC, see #2324

However, we have plan but not decided to support AV1 in live stream, because Chrome(might? seems? not sure) does not support AV1.

After Chrome had HEVC support, for decoding by hardware, then we start to support HEVC and mpegts.js supports HEVC over HTTP-TS or HTTP-FLV.

Another issue, MPEG-TS does not support AV1, only a draft right now.

So seems need more time for hardware decoder and MPEG-TS/HLS to support AV1 for live stream.

Implementing Live AV1 Encoding
Tencent Cloud already supports AV1's FLV packaging format, will SRS be able to support it?

commented

Update on 2023.07.18

Currently, RTMP has been upgraded to support HEVC and AV1, as seen in #3495

It is likely that FFmpeg and OBS will quickly support AV1 over RTMP or HTTP-FLV.

However, for players like MSE that need to support AV1 over MP4, further research may be required.

While WebRTC supports AV1, it is only available on Chrome, and it appears that Safari does not support it.