Not accept key file video streaming

0

I want to stream video securely and I am using ubuntu

console1

/home/ajithmsm/ffmpeg   -stream_loop -1 -i out.mp4 -vcodec copy -f mpegts tls://127.0.0.1:2222?listen'&'cert=domain.crt'&'key=domain.key

console2

ffplay tls://127.0.0.1:2222

I use this command to create crt and key

openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 - out domain.crt

sudo cp test.crt /usr/local/share/ca-certificates/

sudo update-ca-certificates

It's streaming perfectly my problem was I am not send any key or crt file to another system but the video was streaming. I don't know the video was encrypted, whether there is encrypted video then how the video will play with out key

Any one knows how to send the commands and tell what's the problem with these commands and how do I stream video ffmpeg using tls

msm

Posted 2019-01-02T06:26:40.040

Reputation: 1

Answers

0

If you read the documentation you see that you need to add ?tls_verify=1 to the ffplay client command in order for it to verify the certificate sent by the server:

If enabled, try to verify the peer that we are communicating with.
...
This is disabled by default since it requires a CA database to be provided by the caller in many cases.

If you enable it, you should get errors as you say the certificate isn't installed on the client.

garethTheRed

Posted 2019-01-02T06:26:40.040

Reputation: 2 520

Note: I've not tested my answer :-) – garethTheRed – 2019-01-02T16:20:14.963