FFmpeg stream encryption

Viewed 3263

I am doing a project where a stream has to be transmitted in real time and in a secure manner to a server.

As it can be found in the documentation it is possible to ''encrypt'' a stream using:

  1. srtp https://www.ffmpeg.org/ffmpeg-protocols.html#srtp

    This works fine but the speed and quality aren't that good. (delay of 3 seconds). I would be grateful for improvements (see below)

  2. tls using certificates (https://www.ffmpeg.org/ffmpeg-protocols.html#tls)

    What exactly does tls? Does it even encrypt or is it just to verify that the stream comes from the correct source?

What else can i use to achieve adequate quality and speed?


PS: The command for SRTP with AES with 3 second delay:

ffmpeg -r 24 -f x11grab -s 1280x1024 -i :0.0 -c:v libx264 -crf 35 -pix_fmt yuv420p -threads 4 -preset fast -tune fastdecode -bsf:v h264_mp4toannexb -movflags +faststart -f rtp_mpegts -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz "srtp://10.0.0.100:8888"

I output it with ffplay:

ffplay -srtp_in_suite AES_CM_128_HMAC_SHA1_80 -srtp_in_params zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz srtp://client:8888 -fast -fs
1 Answers
Related