Just search for rtmps and stunnel. Quite a few helpful results. There is even a docker container that makes this pretty simple.