srtp rtcp ssrc

Amit Soni amitsoni77 at gmail.com
Thu Nov 21 08:34:38 UTC 2019


Hi All,

I am using srtpenc/dec elements for encoding and decoding RTP/RTCP
packets. I have sending video pipeline with sending RTP & RTCP and
receiving RTCP and receiving one with receiving RTP & RTCP and sending
RTCP.

When I run the pipeline, I get below warning message at senderĀ“s:
WARN                 srtpdec
gstsrtpdec.c:812:request_key_with_signal:<d> Could not get caps for
stream with SSRC

I think it is not able to find key corresponding to received SSRC in
receiving RTCP RR packets at senderĀ“s side.

Also, I guess I need to set SSRC in RTCP RR packets coming from
receiving side. Since receiver will insert its own SSRC in RTCP RR
packet, I need to know it at both sides. How do I set the same?

Please let me know if my understanding is correct and any alternate
way to achieve same.

Thanks
Amit

Sending pipeline :

REM_PORT=6006 REM_SSRC=5678 REM_IP=127.0.0.1 \
REM_KEY="098765432109876543210987654321098765432109876543210987654321" \
LOC_PORT=5005 LOC_SSRC=1234 \
LOC_KEY="123456789012345678901234567890123456789012345678901234567890" \
SRTP_CAPS="payload=(int)103,ssrc=(uint)$REM_SSRC,roc=(uint)0, \
    srtp-key=(buffer)$REM_KEY, \
    srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-80, \
    srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-80" \
bash -c 'gst-launch-1.0 \
  rtpbin name=r \
  srtpenc name=e key="$LOC_KEY" \
    rtp-cipher="aes-128-icm" rtp-auth="hmac-sha1-80" \
    rtcp-cipher="aes-128-icm" rtcp-auth="hmac-sha1-80" \
  srtpdec name=d \
  videotestsrc ! decodebin \
    ! x264enc tune=zerolatency \
    ! rtph264pay ! "application/x-rtp,payload=(int)103,ssrc=(uint)$LOC_SSRC" \
    ! r.send_rtp_sink_0 \
  r.send_rtp_src_0 ! e.rtp_sink_0 \
    e.rtp_src_0 ! udpsink host=$REM_IP port=$REM_PORT \
  r.send_rtcp_src_0 ! e.rtcp_sink_0 \
    e.rtcp_src_0 ! udpsink host=$REM_IP port=$((REM_PORT+1))
sync=false async=false \
  udpsrc port=$((LOC_PORT+1)) ! "application/x-srtcp,$SRTP_CAPS" ! d.rtcp_sink \
    d.rtcp_src ! r.recv_rtcp_sink_0'


 Receiving pipeline is :
REM_PORT=5005 REM_SSRC=1234 REM_IP=127.0.0.1 \
REM_KEY="123456789012345678901234567890123456789012345678901234567890" \
LOC_PORT=6006 LOC_SSRC=5678 \
SELF_KEY="098765432109876543210987654321098765432109876543210987654321" \
SRTP_CAPS="payload=(int)103,ssrc=(uint)$REM_SSRC,roc=(uint)0, \
    srtp-key=(buffer)$REM_KEY, \
    srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-80, \
    srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-80" \
CAPS_RTP="media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)103"
\
bash -c 'gst-launch-1.0 \
  rtpbin name=r  \
  srtpenc name=e key="$SELF_KEY" \
    rtp-cipher="aes-128-icm" rtp-auth="hmac-sha1-80" \
    rtcp-cipher="aes-128-icm" rtcp-auth="hmac-sha1-80" \
  srtpdec name=d \
  udpsrc port=$LOC_PORT ! "application/x-srtp,$SRTP_CAPS" ! d.rtp_sink \
    d.rtp_src ! "application/x-rtp,$CAPS_RTP" ! r.recv_rtp_sink_0 \
    r. ! rtph264depay ! decodebin ! autovideosink \
  udpsrc port=$((LOC_PORT+1)) ! "application/x-srtcp,$SRTP_CAPS" ! d.rtcp_sink \
    d.rtcp_src ! r.recv_rtcp_sink_0 \
  r.send_rtcp_src_0 ! e.rtcp_sink_0 \
    e.rtcp_src_0 ! udpsink host=$REM_IP port=$((REM_PORT+1))
sync=false async=false'


More information about the gstreamer-devel mailing list