sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

How To Add RTP Header Extension? #1066

Closed nodminger closed 6 months ago

nodminger commented 7 months ago

Is there any procedure to add multiple RTP header extension when sending RTP packets from Sipsorcery WebRTC to WebRTC Web Applications? I was checking Sipsorcery source code, and I am not able to understand it completely. Can anyone who is already familiar with RTP packetization guide me with this?

ChristopheI commented 7 months ago

Perhaps if you describe your use case, it will help

nodminger commented 7 months ago

@ChristopheI I want to add this extension to reduce video delay (https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/rtp-hdrext/playout-delay). I found out when streaming using Sipsorcery, JitterBufferDelay/JitterBufferEmittedCount and other JitterBuffer stats increases quickly. I also found out KeyFrames are being sent very often. How to set KeyFrame to be sent only in the first frame and stop it? Because even KeyFrames can cause the receiving end to use more resources, right?

nodminger commented 6 months ago

@ChristopheI @sipsorcery is there any way to add RTP Headers?

sipsorcery commented 6 months ago

There's no hook to add a custom RTP header. You'll need to go into the source directly.