-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement separate RTX payload type for retransmission on NACK #79
Comments
We want
What do you consider the best? I am still reading the code and trying to understand how everything is structured, but I guess to announce RTX track we want something like this: m.RegisterCodec(
webrtc.RTPCodecParameters{
RTPCodecCapability: webrtc.RTPCodecCapability{
MimeType: "video/rtx",
ClockRate: codec.ClockRate, // same clockrate as video track
Channels: codec.Channels, // same channels as video track
SDPFmtpLine: "apt=96", // 96 is the payload of the video track
RTCPFeedback: nil,
},
PayloadType: 97, // it seems to always be (payload of video track)+1, but we should maybe put it in `payloadType()`
},
tpe,
) Then when the RTX track negotiation is done, there will be the hard part about figuring out how to send retransmissions on this track. (I am still learning WebRTC/Pion API, so I may write bad code.) |
Either have codecFromName return a list, or inline the function within APIFromNames. Negotiating a separate RTX track, though, is the easy part. We also need:
Two things to note. One, you need to handle correctly the case when an RTX track has not been successfully negotiated. Two, you'll need to account for packet loss differently depending on whether an RTX track was negotiated or not. |
I changed Now the hard part is to modify the
Should I only need to modify/create another
Should I only need to patch |
I think so.
I'm not sure. There are four cases:
Currently, we don't distinguish between the four cases. In your code, you'll need to ensure that (1) and (2) get sent on the main track, while (3) and (4) are sent over the RTX track. I think there's no obvious way to distinguish between (2) and (4), so I suggest you simply send the (4) case on the main track for now. |
Here's the offer sent by galene-stream. Contrary to what I believed, it doesn't seem to negotiate an extra
|
Looking at it some more, it looks like Pion doesn't support having multiple payload types in a single track. We're going to need to extend Pion in order to implement the RTX ptype. |
From galene-stream/GStreamer perspective, another way to temporarily solve this may be to use one rtprtxqueue object. If I understand the description of the object, it does exactly what is needed for retranmissions with same SSRC and should work with Galène. I believe implementing the support for multiple payload per track in Pion will be useful to increase interoperability, but it seems to require a lot of effort, code and knowledge. |
I think that you should report the limitation with the GStreamer people, the issue should be pretty trivial to fix. As to your code, you should expect Galène to handle a separate RTX SSID as soon as it is implemented in Pion, so I wouldn't bother with temporary workarounds. |
In progress: pion/webrtc#2914 |
This issue is here to keep track of what was discussed on the mailing list and maybe discuss of how to solve it.
Galène does not advertise a separate RTX track in the SDP and expect the peer to retransmit on the main track. This seems to work with web browsers but it is problematic with other software such as GStreamer.
On Pion v2, RTX tracks were not supported. Galène is now using Pion v3 that can now support RTX.
It seems that the standard should be to retransmit on a separate track (https://tools.ietf.org/html/rfc4588).
The text was updated successfully, but these errors were encountered: