-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How can I get Peer Connection's packet loss information? #1348
Comments
Hello @DevRockstarZ! |
@r-novel Thanks for your great comment! |
@r-novel Sorry for re-comment in the closed issue. |
@DevRockstarZ Hello! |
@r-novel Thanks for your great comment! |
@DevRockstarZ Hello! Yeah, buffer.go works with RTP packets. You could read data from pc.track, unmarshaling to pion/rtp Packet, and send to buffer. Generally, the algorithm looks like this:
Also, you can look at amazing Pion-based app Peer-Calls: |
@r-novel Thanks for your comment! |
@DevRockstarZ Hello! Sure! You could use only RTP packets for counting packet lost; You may do a few changes for removing rtcp.Nack create and send logic from your jitter buffer implementation. If you are interesting you could read here more about RTCP NACK feedback and packet retransmit. |
@r-novel Thanks for your fast comment. |
@DevRockstarZ I'm really happy if my comments were useful. |
@r-novel hi and sorry if i'm repeating parts of the question above.. i'm new to pion. trying to achieve something similar to the rtwatch app: stream an existing file / other source via pion to browser. now, i see on the browser side, using the chrome://webrtc-internals, that i have packets lost over time. also, during loses video freezes shortly. usually, in a full webrtc browser-to-browser the packets will get retransmitted using the NACKs or other mechanisms. I do see there is a RTCPFeedback struct but doesn't look like media engine or any codec uses this. are you saying the basic retransmit of lost packets is not implemented yet but planned for 3.1.0? if yes, is there any other error correction which is implemented at this point which i can 'turn on' to avoid packet loss? |
@uharband Hello! If I understand correctly, you streaming from static file (from you FS) through Pion app to Browser? Simple algo below:
If you cast video via GStreamer or FFmpeg you may try to tune some settings. What about RTCPFeedback: For example: rtcpFb := []webrtc.RTCPFeedback{
webrtc.RTCPFeedback{
Type: webrtc.TypeRTCPFBGoogREMB,
},
webrtc.RTCPFeedback{
Type: webrtc.TypeRTCPFBNACK,
Parameter: "pli",
},
webrtc.RTCPFeedback{
Type: webrtc.TypeRTCPFBNACK,
},
}
codec = webrtc.NewRTPVP8CodecExt(pt, 90000, rtcpFb , "")
mediaEngine.RegisterCodec(codec) I hope my answer will be useful to you. Best regards, Roman. |
hi @r-novel |
for the sake of future reference to getting nack packets. assuming you have one sender
|
I looked up all of the code, in webrtc/stats.go
I found
this code.
When I call peerconnection.GetStats(), but no information about packet loss.
How can I get packet loss information?
Thanks.
The text was updated successfully, but these errors were encountered: