webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

Add interface to disable DTLS SRTP

Open CaptainNeil opened this issue 3 years ago • 7 comments

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:

  • rtmp receive origin aac data
  • decode aac to pcm
  • slice pcm to 10ms pcm list (the opus encoder requires)
  • encode pcm to opus
  • pack opus as an rtp package
  • send rtp package to TrackLocalStaticRTP

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

CaptainNeil avatar Jul 07 '22 11:07 CaptainNeil

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

HustCoderHu avatar Jul 07 '22 11:07 HustCoderHu

The problem is similar as #2090

CaptainNeil avatar Jul 08 '22 00:07 CaptainNeil

agreed

zjzhang-cn avatar Sep 23 '22 05:09 zjzhang-cn

@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 avatar Oct 07 '22 14:10 yyyar

@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

CaptainNeil avatar Dec 13 '22 13:12 CaptainNeil

absolutely agreed

GodKingGitHub avatar Nov 10 '23 08:11 GodKingGitHub

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.

Sean-Der avatar May 09 '24 03:05 Sean-Der