how to protect my stream using ffmpeg with protocol rtsp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to protect my stream using ffmpeg with protocol rtsp

carlo sgambato
I generated my stream using ffmpeg with protocol rtsp (i love ffmpeg)
i generated a key with openssl with this command

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout
/home/pi/SSL/httpd-selfsigned.key -out /home/pi/SSL/httpd-selfsigned.crt

the software generated two files: a key and a certificate.

How can i insert this files in the encoder (ffmpeg)?

The stream command is this:

./ffmpeg -re -i prova.mp4 -c:v h264_nvmpi -b:v 4000k -r 30 -ac 1 -ar 44100
-f rtsp -rtsp_transport tcp rtsp://94.177.197.109:443/live/a


thank you for your attention
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: how to protect my stream using ffmpeg with protocol rtsp

Moritz Barsnick
On Wed, Jun 17, 2020 at 18:20:10 +0200, carlo sgambato wrote:
> How can i insert this files in the encoder (ffmpeg)?
>
> The stream command is this:
>
> ./ffmpeg -re -i prova.mp4 -c:v h264_nvmpi -b:v 4000k -r 30 -ac 1 -ar 44100
> -f rtsp -rtsp_transport tcp rtsp://94.177.197.109:443/live/a

Firstly, your server needs to run TLS, which it doesn't. (I tried your
URL.) And when it does, the protocol will be rtsps://.

Once that is running, and ffmpeg happens to need to use client
certificates, you should look at the documentation of the "tls"
protocol's options. Check for "cafile" and "certfile".

> sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout
> /home/pi/SSL/httpd-selfsigned.key -out /home/pi/SSL/httpd-selfsigned.crt
>
> the software generated two files: a key and a certificate.

Are you sure you didn't mean to use these for the server?

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".