SRTP audio encryption problems

Sebastian Dröge sebastian at centricular.com
Mon Mar 26 10:13:22 UTC 2018


On Mon, 2018-03-26 at 10:35 +0100, Toby Jaffey wrote:
> Hello,
> 
> I am attempting to use gstreamer for audio encryption using SRTP but
> am unable to get a working pipeline.
> Can anyone suggest what is wrong here:
> 
> GST_DEBUG=2 gst-launch-1.0 -v audiotestsrc wave=2 freq=200 ! alawenc
> ! rtppcmapay ! 'application/x-rtp, payload=(int)8, ssrc=(uint)123' !
> srtpenc
> key="012345678901234567890123456789012345678901234567890123456789" !
> udpsink host=127.0.0.1 port=5555
> 
> GST_DEBUG=2 gst-launch-1.0 udpsrc port=5555 caps='application/x-srtp, 
> payload=(int)8, ssrc=(uint)123, srtp-
> key=(buffer)012345678901234567890123456789012345678901234567890123456
> 789, srtp-cipher=(string)aes-128-icm, srtp-auth=(string)hmac-sha1-80, 
> srtcp-cipher=(string)aes-128-icm, srtcp-auth=(string)hmac-sha1-80'
> !  srtpdec ! rtppcmadepay ! alawdec ! pulsesink
> 
> The receiver is dropping data with the following warning:
> 
> :770:request_key_with_signal:<srtpdec0> Could not get caps for stream
> with SSRC 123
> 0:00:12.994153383  7472      0x202e770 WARN                 srtpdec
> gstsrtpdec.c:1212:gst_srtp_dec_chain:<srtpdec0> Invalid buffer,
> dropping

You have to connect to the "request-key" signal and return appropriate
caps there, or make sure to set complete caps on the stream via udpsrc. Your caps are missing the "roc" field at least.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180326/960f38b2/attachment.sig>


More information about the gstreamer-devel mailing list