Open fnbsullivan opened 1 year ago
share nginx conf
user www-data; worker_processes 1; error_log logs/error.log debug; events { worker_connections 1024; } rtmp { server { listen 1935; buflen 1000ms; chunk_size 4096; ping_timeout 30s; allow play all; application live { allow play all; live on; hls on; hls_nested on; hls_path /HLS/live; hls_fragment 10; drop_idle_publisher 30s; sync 500ms; on_publish http://localhost/AVideo/plugin/Live/on_publish.php; on_publish_done http://localhost/AVideo/plugin/Live/on_publish_done.php; on_play http://localhost/AVideo/plugin/Live/on_play.php; on_record_done http://localhost/AVideo/plugin/Live/on_record_done.php; } } } http { include mime.types; default_type application/octet-stream; server { listen 8080; server_name christiantube.com;
location /live {
expires 60;
add_header 'Cache-Control' 'public';
location ~ \.m3u8$ {
expires -1;
# Disable cache
add_header 'Cache-Control' 'no-cache';
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
}
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/vnd.apple.mpegurl m3u8;
}
alias /HLS/live;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root html;
}
location /control {
# replace this with the IP of your AVideo site
allow 127.0.0.1;
deny all;
rtmp_control all;
}
#allows us to host some webpages which can show our videos: "http://my-ip/my-page.html"
location / {
root html;
index index.html index.htm;
}
listen 8443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/christiantube.com-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/christiantube.com-0001/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
} }
http://localhost/AVideo/plugin/Live/on_publish.php change local host to your servers ip address. If host is not correct local won't work. after you change all the local hosts to ip address restart nginx
When I change that to the local IP address of the server, I have the same issue. Note, the notification works, I believe that means on_publish is working. But the video will not play. Prior to updating, I was able to stream. Anything else I can look at?
do you have xsend installed
Yea, health check shows all good.
Stat page on?
any logs?
check your js console
Let me know if you can point me in the right direction to get these errors fixed? Thanks!
show the console when you try to play a video. also, check the network tab in the console.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am successfully able to start a stream, but I am unable to view the stream. It just spins for hours:
The notification, by the way, does not show up unless I refresh the page.
Let me know what I can do to troubleshoot.
Brian