Page 1 of 1

SRTP receive and view in player

Posted: 05 Jan 2024 02:19
by bschoeler
Hi all,
I'm trying to figure out how to get SRTP to be displayed by VLC player, sent from a custom streaming device.
So far, I've been able to verify the device can send RTP (it is successfully displayed by VLC).

I command VLC in the following way to test RTP:
vlc sdp.sdp

sdp.sdp does not contain much:

Code: Select all

c=IN IP4 192.168.1.163 m=video 18082 RTP/AVP 96 a=rtpmap:96 H264/90000 a=recvonly
I know that SRTP requires a master key and salt, and I pass them in to VLC like so:
vlc -vvvv srtp_sdp.sdp --srtp-key=fdf17163b1e1bdd80ae3a267f02e608d --srtp-salt=6cb703eecbc5b9bfab395d220b83

srtp_sdp.sdp:

Code: Select all

c=IN IP4 192.168.1.163 m=video 18082 RTP/SAVP 96 a=rtpmap:96 H264/90000

However, VLC seems to seize up parsing the srtp_sdp.sdp. Regardless of whether I pass the SRTP key and salt, the VLC window opens and closes instantly.

In the logs, I see some warnings:
ps warning: this does not look like an MPEG PS stream, continuing anyway
ps warning: garbage at input from 72, trying to resync..

Does anyone have any idea what I am missing?

Thanks

Re: SRTP receive and view in player

Posted: 05 Jan 2024 11:43
by RĂ©mi Denis-Courmont
If the SDP-specified profile is AVP, then SRTP is of course not used and the srtp-key and srtp-salt parameters are accordingly ignored.

If it is SAVP, then the SRTP parameters are to be specified via SDP, not the command line. VLC does not currently support that, I am not even aware of a SDP standard extension for passing a fixed pair of key and salt.