pion / webrtc

Pure Go implementation of the WebRTC API
https://pion.ly
MIT License
13.05k stars 1.6k forks source link

Add interface to disable DTLS SRTP #2273

Open CaptainNeil opened 1 year ago

CaptainNeil commented 1 year ago

Summary

As the title describes, I would like to have an interface to disable DTLS SRTP, just like the enable_dtls_srtp defined in C++

Motivation

To analyze RTP payload.

Describe alternatives you've considered

I'm working on rtmp 2 webrtc, the workflow is as follow:

Unfortunately, the received sound on the other end is noisy. I saved the opus data before sending it to the RTPSender, and it sounded fine.

So I wanted to use Wireshark to see what happened, but the rtp payload was encrypted.

By searching at code,I could'n find a way to turn it off.

@Sean-Der

HustCoderHu commented 1 year ago

agreed, TLS should be configurable, coz encryption is not necessary under some circumstances, performance critical i.e.

CaptainNeil commented 1 year ago

The problem is similar as #2090

zjzhang-cn commented 1 year ago

agreed

yyyar commented 1 year ago

@CaptainNeil did you managed to solve the issue? I have similar problem doing the same thing (aac->opus->webrtc) I've got choppy audio as described in #2090. I noticed 0 lost packets in webrtc-internals in chrome, but lots of concealedSamples and insertedSamplesForDeceleration.

CaptainNeil commented 1 year ago

@CaptainNeil did you managed to solve the issue? I have similar problem doing the same thing (aac->opus->webrtc) I've got choppy audio as described in #2090. I noticed 0 lost packets in webrtc-internals in chrome, but lots of concealedSamples and insertedSamplesForDeceleration. @yyyar I have solved this problem. My problem is the noise caused by the rtp timestamp. When I pack OPUS into an RTP packet, I did not increase the timestamp according to the audio size. Therefore, noise will be generated when webRTC rendering

GodKingGitHub commented 7 months ago

absolutely agreed

Sean-Der commented 1 month ago

I am in support of this!

What someone should do is add support for the NULL cipher to pion/srtp. Then via the SettingEngine both sides can request it.

As long as this requires the developer explicitly requesting it (via the SettingEngine) it would be great to have.

sirzooro commented 2 days ago

I am working on some changes to srtp module now. I will add NULL cipher there too.