Lately i was trying to build a localhost live streaming service for some small events on my community using nginx and ngrok(i don't want to have trouble with all that port opening) but when i was doing some tests today i wat stuck with some instabilities on my stream, sometimes the video doesn't load or load very slowly, the transmission dies completely and must be refreshed to play normally again, and it seems that is ngroks fault(looking at the execution window the latency goes up very easily and when it does my transmission fall, i am using nginx with rtmp module, here is mt conf code:
worker_processes 1;
error_log logs/error.log info;
events {
worker_connections 512;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
ping 30s;
notify_method get;
application live {
live on;
on_publish http://127.0.0.1:80/auth;
hls on;
hls_fragment 10;
hls_playlist_length 60;
hls_path www/hls;
}
}
}
http{
server {
listen 80;
charset utf-8;
location / {
add_header Cache-Control no-cache;
root www;
}
location /auth {
if ($arg_psk = '****') {
return 201;
}
return 404;
}
}
}
i'm also using an free account on ngrok(i don't know if a premium one will increase perfomance), i wanna know if there is a way to decrease instabillity on my server so it can be better to watch my stream, i will be broadcasting to around 700 people.