srs icon indicating copy to clipboard operation
srs copied to clipboard

AV1/VP9 via SRT, out as MPEG-TS? Or AV1 via RTMP?

Open pannal opened this issue 1 year ago • 6 comments

What is the business background? Please provide a description. No business, private use.

Is your feature request related to a problem? Please describe. This is twofold. Nowadays AV1 and VP9 get more and more widely adopted. SRS still seems to focus on HEVC, though, at least in version 6.

As far as I know the only way to ingest a stream with AV1 video with SRS is to use SRT or WebRTC.

Describe the solution you'd like The Enhanced RTMP spec allows for other codecs apart from HEVC, too, so it would be great if SRS could support this.

Otherwise: is it possible to ingest a stream containing AV1 using SRT and converting it to MPEG-TS/HTTP-FLV, so it can be used with mpegts.js, which now supports those newer codecs?

Thank you so much for your work!

pannal avatar Nov 20 '24 00:11 pannal

Is it actually necessary to convert SRT to RTMP before converting it to MPEG-TS or HTTP-FLV? Why not remux it directly from SRT to MPEG-TS? In that case, codecs wouldn’t be an issue.

I don’t see any benefits of using SRT because it still gets converted to RTMP by SRS, so using it seems pointless.

Sanderluc5 avatar Nov 25 '24 13:11 Sanderluc5

Is that the case right now and that's possible already with SRS? Or are you saying it should be the way.

pannal avatar Nov 25 '24 17:11 pannal

Is that the case right now and that's possible already with SRS? Or are you saying it should be the way.

No not possible yet. Would still be nice to have, as MPEG2-TS supports more codecs / audio channels then RTMP.

Sanderluc5 avatar Dec 01 '24 11:12 Sanderluc5

That would be amazing, yes. Or, if the srt_to_rtmp step is crucial, supporting ERTMP V2 spec would suffice as well, I guess.

pannal avatar Dec 04 '24 11:12 pannal

As far as i know, AV1 is not yet supported with SRT (only WebRTC and eRTMP), because SRT uses MPEG-TS and AV1 is not yet implemented for transport stream usage.

zapf2000 avatar Dec 04 '24 13:12 zapf2000

Consider implementing.

TRANS_BY_GPT4

duiniuluantanqin avatar Mar 21 '25 09:03 duiniuluantanqin

AV1 in Enhanced RTMP is definitely possible and makes perfect sense for SRS.

1. The specification already exists:

  • Enhanced RTMP spec defines AV1 support using fourcc 'av01'
  • It's a standardized approach, not something SRS would need to invent

2. SRS already has the foundation:

  • Enhanced RTMP infrastructure is already working for HEVC
  • The fourcc-based codec identification system is in place
  • The pattern for adding new codecs via Enhanced RTMP is established

3. It fits SRS's architecture:

  • Enhanced RTMP is protocol-agnostic - it works across all SRS's output formats
  • Once AV1 works in the Enhanced RTMP layer, it automatically flows through to HLS, HTTP-FLV, and other outputs
  • There is no requirement to change the basic architecture that goes from SRT to RTMP to output. 4. Industry momentum:
  • AV1 is increasingly important for bandwidth efficiency
  • Major players (YouTube, Netflix) are adopting it
  • Client-side support (browsers, players like mpegts.js) is growing

Conclusion:

AV1 via Enhanced RTMP is the natural evolution of SRS's codec support, following the same pattern that was successfully used for HEVC. It's not a question of "if" but "when" - this is on the roadmap.

TRANS_BY_GPT4

winlinvip avatar Oct 26 '25 15:10 winlinvip