Another addition to the nginx configuration could be “rtmp” module and ffmpeg:

Setting up HLS live streaming server using NGINX
https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/

I am pretty curious how this performs on a Raspberry Pi, because this device is not very famous for its network/streaming/data processing power