I want to stream video securely and I am using ubuntu


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


ffplay tls://

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


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.

  • Note: I've not tested my answer :-) – garethTheRed Jan 2 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.