AVideo
AVideo copied to clipboard
unable to make live stream working
I can't be able to make live streaming working. I installed the NGINX RTMP server and trying to feed the video source from OBS studio.
When the check live url, nothing is working. Its always showing offline and I am not getting any option to delete scheduled live. I will have to delete it manually from the database to get rid of that live session.
Please help me make the make live streaming working.
Thanks in advance.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 99234 root 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99235 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99235 www-data 37u IPv4 390293 0t0 TCP localhost:1935->localhost:57260 (ESTABLISHED)
nginx 99235 www-data 41u IPv4 390284 0t0 TCP static-server_ip.lsan.ca.frontiernet.net:1935->client_ip:58802 (ESTABLISHED)
nginx 99236 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99237 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99238 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99239 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99240 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99241 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99242 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99243 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99244 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99245 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99246 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99247 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99248 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99249 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99250 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99251 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99252 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99253 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99254 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99255 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99256 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99257 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
nginx 99258 www-data 10u IPv4 391411 0t0 TCP *:1935 (LISTEN)
ffmpeg 99498 www-data 3u IPv4 397746 0t0 TCP localhost:57260->localhost:1935 (ESTABLISHED)
stdClass Object
(
[topCopyKeysButtonTitle] => Copy Live Keys
[hideTopCopyKeysButton] => 1
[button_title] => LIVE
[server_type] => stdClass Object
(
[type] => Array
(
[0] => Public UNDER DEVELOPMENT
[1] => Self Hosted
)
[value] => 1
)
[server] => rtmp://mysite.com/live
[playerServer] => https://mysite.com:8443/live
[stats] => https://mysite.com:8443/stat
[restreamerURL] => https://mysite.com/plugin/Live/standAloneFiles/restreamer.json.php
[controlURL] => https://mysite.com/plugin/Live/standAloneFiles/control.json.php
[controlServer] => http://localhost:8080/
[disableRestream] =>
[disableDVR] =>
[disableGifThumbs] => 1
[disableLiveThumbs] => 1
[hideTopButton] =>
[hideUserGroups] =>
[hideShare] =>
[hideAdvancedStreamKeys] =>
[hidePublicListedOption] =>
[useAadaptiveMode] => 1
[protectLive] => 1
[experimentalWebcam] =>
[doNotShowLiveOnVideosList] =>
[doNotShowOnlineOfflineLabel] =>
[doNotShowLiveOnCategoryList] =>
[doNotShowOfflineLiveOnCategoryList] =>
[limitLiveOnVideosList] => 12
[doNotShowGoLiveButton] =>
[doNotShowGoLiveButtonOnUploadMenu] =>
[doNotProcessNotifications] =>
[useLiveServers] => 1
[disableMeetCamera] =>
[playLiveInFullScreen] =>
[playLiveInFullScreenOnIframe] =>
[hls_path] => /HLS/live
[requestStatsTimout] => 4
[cacheStatsTimout] => 60
[requestStatsInterval] => 60
[streamDeniedMsg] => You can not stream live videos
[allowMultipleLivesPerUser] => 1
[controllButtonsShowOnlyToAdmin_record_start] =>
[controllButtonsShowOnlyToAdmin_record_stop] =>
[controllButtonsShowOnlyToAdmin_drop_publisher] =>
[controllButtonsShowOnlyToAdmin_drop_publisher_reset_key] =>
[controllButtonsShowOnlyToAdmin_save_dvr] =>
[disable_live_schedule] =>
[live_schedule_label] => Upcoming Events
[webRTC_isDisabled] => 1
[webRTC_server] => stdClass Object
(
[type] => Array
(
[0] => Public
[1] => Self Hosted
)
[value] => 1
)
[webRTC_SelfHostedURL] => mysite.com
[webRTC_CertPath] => /etc/ssl/mysite/9c7f382e26d8a9bf.crt
[webRTC_KeyPath] => /etc/ssl/mysite/mysite.com.key
[webRTC_ChainCertPath] => /etc/ssl/mysite/fullchain.crt
[webRTC_PushRTMP] =>
)
Please help me
looks like your Nginx is not properly installed, try to find installation help on the nginx Github
2022/08/11 13:53:57 [info] 218627#0: *11 connect: app='live' args='s=ZXhSYzZyZ3FJYVhUMmtlSjF4R3VCQT09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://mysite/live?s=ZXhSYzZyZ3FJYVhUMmtlSjF4R3VCQT09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' tc_url='rtmp://mysite/live?s=ZXhSYzZyZ3FJYVhUMmtlSjF4R3VCQT09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [info] 218627#0: *11 createStream, client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [info] 218627#0: *11 publish: name='62f564b5d7ce0' args='' type=live silent=0, client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [info] 218627#0: *11 notify: publish 'mysite/plugin/Live/on_publish.php', client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [error] 218627#0: recv() failed (111: Connection refused)
2022/08/11 13:53:58 [info] 218627#0: *11 notify: empty or broken HTTP response, client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [info] 218627#0: *11 disconnect, client: Client_ip, server: 0.0.0.0:1935
2022/08/11 13:53:58 [info] 218627#0: *11 deleteStream, client: Client_ip, server: 0.0.0.0:1935
I am getting these errors now and i am not able to connect to stream from OBS studio
am I missing any other configuration?
Any help?
Questions: is your OBS connecting and working?
I can see this:
2022/08/11 13:53:58 [error] 218627#0: recv() failed (111: Connection refused)
I do not know what is this and where this comes from
2022/08/11 13:53:58 [info] 218627#0: *11 notify: empty or broken HTTP response, client: Client_ip, server: 0.0.0.0:1935
I suspect you have a bad on_publish URL on your nginx.conf
Below is my nginx.conf file
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;
### Use case option (max_streams; default is 32 )
#max_streams 10;
allow play all;
#creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments
application live {
allow play all;
live on;
#hls on;
#hls_nested on;
#hls_path /HLS/live;
#hls_playlist_length 60m;
#hls_fragment 4s;
drop_idle_publisher 30s;
sync 500ms;
#Experimental. Force dropped stream, or ended stream from being watched. (idle_streams)
#idle_streams off;
on_publish http://mysite.com/plugin/Live/on_publish.php;
on_publish_done http://mysite.com/plugin/Live/on_publish_done.php;
on_play http://mysite.com/plugin/Live/on_play.php;
on_record_done http://mysite.com/plugin/Live/on_record_done.php;
#exec ffmpeg -re -i rtmp://localhost/live/$name -c:v libx264 -preset veryfast -c:a copy -f hls -hls_time 5 -hls_list_size 0 -f flv rtmp://localhost/adaptive/$name_hi;
#exec ffmpeg -re -i rtmp://localhost/live/$name
# -c:v libx264 -vf scale=-2:240 -r 20 -g 40 -keyint_min 40 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 400k -maxrate 700k -bufsize 1400k -c:a aac -strict -2 -b:a 96k -f flv rtmp://mysite.com/adaptive/$name_low
# -c:v libx264 -vf scale=-2:480 -r 30 -g 60 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 1200k -maxrate 2100k -bufsize 4200k -c:a aac -strict -2 -b:a 128k -f flv rtmp://mysite.com/adaptive/$name_mid
# -c:v libx264 -vf scale=-2:720 -r 30 -g 60 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 2400k -maxrate 3000k -bufsize 6000k -c:a aac -strict -2 -b:a 128k -f flv rtmp://mysite.com/adaptive/$name_hi;
#recorder video {
# record all manual;
# record_path /var/www/tmp;
# record_notify on;
# record_max_size 2048M;
# record_suffix -%d-%b-%y-%T.flv;
###If live-stream is over 30FPS and you want to limit it to 30FPS recording to light the encoding task #record_max_frames 30;
# ## record_max_frames 30;
#}
### Record Audio Separately ( For podcast )
#recorder audio {
# record audio;
# record_path /var/www/tmp;
# record_max_size 1024M;
# record_suffix -%d-%b-%y-%T.mp3;
#}
}
application adaptive {
live on;
hls on;
hls_path /HLS/live;
hls_nested on;
hls_playlist_length 10m;
allow play all;
allow publish 127.0.0.1;
deny publish all;
hls_variant _hi BANDWIDTH=264000,RESOLUTION=1280x720; # this is for line 34 only, do not uncomment it
hls_variant _low BANDWIDTH=900000;
hls_variant _mid BANDWIDTH=2400000;
hls_variant _hi BANDWIDTH=3500000;
}
}
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 8443 ssl;
listen [::]:8443 ssl;
ssl_certificate /etc/ssl/mysite/fullchain.crt;
ssl_certificate_key /etc/ssl/mysite/mysite.com.key;
#include /usr/local/nginx/snippets/self-signed.conf;
#include /usr/local/nginx/snippets/ssl-params.conf;
#listen 8080;
server_name localhost;
#creates the http-location for our full-resolution (desktop) HLS stream - "http://my-ip/live/my-stream-key/index.m3u8"
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;
}
#allows us to see how stats on viewers on our Nginx site using a URL like: "http://my-ip/stats"
#location /stats {
# stub_status;
#}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /var/www/html/mysite-Streamer;
}
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 /var/www/html/mysite-Streamer;
# #index index.php index.html index.htm;
# proxy_pass http://server_ip:8081;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
#}
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
# fastcgi_intercept_errors on;
# #fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
#}
}
server {
listen 443 ssl;
server_name encoder.mysite.com;
ssl_certificate /etc/ssl/mysite/fullchain.crt;
ssl_certificate_key /etc/ssl/mysite/mysite.com.key;
location / {
proxy_pass http://server_ip:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/mysite/fullchain.crt;
ssl_certificate_key /etc/ssl/mysite/mysite.com.key;
server_name mysite.com,www.mysite.com;
location / {
proxy_pass http://server_ip:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
#location ~ \.php$ {
# include /etc/nginx/snippets/fastcgi-php.conf;
# fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
#}
location /control {
allow 127.0.0.1;
deny all;
rtmp_control all;
}
}
}
what do you get with this?
curl -I http://mysite.com/plugin/Live/on_publish.php
Thank you so much for your help. I modified nginx configuration to listen port 80 and able to connect to obs studio stream
root@mysite:~# lsof -i:1935
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 574317 root 6u IPv4 1696873 0t0 TCP *:1935 (LISTEN)
nginx 574318 www-data 6u IPv4 1696873 0t0 TCP *:1935 (LISTEN)
nginx 574318 www-data 15u IPv4 1686238 0t0 TCP static-IP.lsan.ISP.net:1935->static-IP.lsan.ISP.net:53462 (ESTABLISHED)
But the live url still showing offline.
I don't know whats the problem again.
That is also a known problem
you did not setup SSL properly
if you want to redirect http://mysite.com/ to https://mysite.com/ without affecting your RTMP, try to use the IP instead of the domain on the Nginx on_* parameters, the on_* parameters cannot be redirected
https://github.com/WWBN/AVideo/issues/4880#issuecomment-814461018
also I suspect you have bad configurations in other places. but try to fix one at a time
2022/08/16 07:30:18 [info] 574318#0: *9153 client connected 'client_ip'
2022/08/16 07:30:19 [info] 574318#0: *9153 connect: app='live' args='s=TUs3VjlGL0dvVUpqZDZybmxDL2Vsdz09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://mysite.com/live?s=TUs3VjlGL0dvVUpqZDZybmxDL2Vsdz09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' tc_url='rtmp://mysite.com/live?s=TUs3VjlGL0dvVUpqZDZybmxDL2Vsdz09&webSiteRootURL=aHR0cHM6Ly9nbzJ1YmUuY29tLw' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:30:20 [info] 574318#0: *9153 createStream, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:30:20 [info] 574318#0: *9153 publish: name='62fb95f6a24da' args='' type=live silent=0, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:30:20 [info] 574318#0: *9153 notify: publish 'mysite.com/plugin/Live/on_publish.php', client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:30:20 [info] 574318#0: *9153 notify: publish redirect to 'https://mysite.com/plugin/Live/on_publish.php', client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:30:23 [error] 574318#0: *9173 open() "/HLS/live/62fb95f6a24da/index.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da/index.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:23 [error] 574318#0: *9174 open() "/HLS/live/62fb95f6a24da.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:34 [error] 574318#0: *9255 open() "/HLS/live/62fb95f6a24da/index.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da/index.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:34 [error] 574318#0: *9256 open() "/HLS/live/62fb95f6a24da.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:42 [warn] 574318#0: *9012 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/4/47/0000000474 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3267 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3267", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:44 [info] 574318#0: *9012 client prematurely closed connection while sending to client, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3267 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3267", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:45 [warn] 574318#0: *9282 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/5/47/0000000475 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /node_modules/video.js/dist/video.min.js?cache=1651690605_1659564473 HTTP/1.1", upstream: "http://server_ip:8081/node_modules/video.js/dist/video.min.js?cache=1651690605_1659564473", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:49 [error] 574318#0: *9347 open() "/HLS/live/62fb95f6a24da/index.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da/index.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:49 [error] 574318#0: *9348 open() "/HLS/live/62fb95f6a24da.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da.m3u8 HTTP/1.0", host: "mysite.com:8443"
2022/08/16 07:30:51 [warn] 574318#0: *8996 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/6/47/0000000476 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3274 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3274", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:53 [info] 574318#0: *8996 client prematurely closed connection while sending to client, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3274 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res720/index0.ts?seq=3274", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:54 [warn] 574318#0: *9175 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/7/47/0000000477 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index0.ts?seq=3277 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index0.ts?seq=3277", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:30:58 [warn] 574318#0: *9175 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/8/47/0000000478 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index0.ts?seq=3281 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index0.ts?seq=3281", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:02 [warn] 574318#0: *9175 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/9/47/0000000479 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3285 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3285", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:05 [info] 574318#0: *9153 deleteStream, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:31:05 [info] 574318#0: *9153 notify: publish_done 'mysite.com/plugin/Live/on_publish_done.php', client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:31:05 [info] 574318#0: *9153 disconnect, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:31:05 [info] 574318#0: *9153 deleteStream, client: client_ip, server: 0.0.0.0:1935
2022/08/16 07:31:05 [warn] 574318#0: *9175 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/0/48/0000000480 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3287 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3287", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:09 [warn] 574318#0: *9065 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/1/48/0000000481 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3291 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3291", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:16 [warn] 574318#0: *9193 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/2/48/0000000482 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3297 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3297", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:20 [warn] 574318#0: *9175 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/3/48/0000000483 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3301 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3301", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:23 [warn] 574318#0: *9065 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/4/48/0000000484 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3305 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3305", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:24 [info] 574318#0: *9178 client timed out (110: Connection timed out) while waiting for request, client: client_ip, server: 0.0.0.0:443
2022/08/16 07:31:28 [warn] 574318#0: *9065 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/5/48/0000000485 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3309 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3309", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:33 [warn] 574318#0: *9065 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/6/48/0000000486 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3315 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3315", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:37 [warn] 574318#0: *9193 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/7/48/0000000487 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3319 HTTP/1.1", upstream: "http://server_ip:8081/plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3319", host: "mysite.com", referrer: "https://mysite.com/live/0/mysite?live_schedule=5"
2022/08/16 07:31:41 [warn] 574318#0: *9085 an upstream response is buffered to a temporary file /usr/local/nginx/proxy_temp/8/48/0000000488 while reading upstream, client: client_ip, server: encoder.mysite.com, request: "GET /plugin/Live/view/loopBGHLS/res240/index1.ts?seq=3321 HTTP
That is also a known problem
Please help me solve this problem
read this https://github.com/WWBN/AVideo/issues/6970#issuecomment-1216725011
also, you still did not share what you get with this command
curl -I http://mysite.com/plugin/Live/on_publish.php
root@mysite:~# curl -I http://mysite.com/plugin/Live/on_publish.php
HTTP/1.1 302 Found
Server: nginx/1.16.1
Date: Tue, 16 Aug 2022 14:40:34 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://mysite.com/plugin/Live/on_publish.php
code 302 means was redirected; the expected code MUST be 401
fix the redirect issue described above and try again.
Hi Daniel
fixed the redirect issue.
root@mysite:~# curl -I http://mysite.com/plugin/Live/on_publish.php
HTTP/1.1 401 Unauthorized Error
Server: nginx/1.16.1
Date: Tue, 16 Aug 2022 20:58:56 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: http://imasdk.googleapis.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,HEAD,OPTIONS,POST,PUT
Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
Set-Cookie: key=value; secure; SameSite=None
Set-Cookie: a4ad8a44ac7b242cc24f3658d601a8a8=qla41egtdsob7t5lg6t58s0c79; expires=Tue, 16-Aug-2022 21:58:56 GMT; Max-Age=3600; path=/
Set-Cookie: yptDeviceID=4fee89a3-5337-4ec6-83ee-54924ebb4f84; expires=Wed, 16-Aug-2023 20:58:56 GMT; Max-Age=31536000; path=/; domain=mysite.com; secure; SameSite=None
Cache-Control: max-age=1, private, must-revalidate
Now live url showing online when connected to RTMP via OBS. But streaming is not getting played on the live url. Still playing default video.
Nginx error log:
2022/08/16 14:02:11 [error] 680324#0: *424 open() "/HLS/live/62fb95f6a24da.m3u8" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /live//62fb95f6a24da.m3u8 HTTP/1.0", host: "mysite.com:8443"
Please let me know what else i missed out
had to comment below adaptive block to live streaming working. Please help me configure the adaptive mode
application adaptive {
live on;
hls on;
hls_path /HLS/live;
hls_nested on;
hls_playlist_length 10m;
allow play all;
allow publish 127.0.0.1;
deny publish all;
hls_variant _hi BANDWIDTH=264000,RESOLUTION=1280x720; # this is for line 34 only, do not uncomment it
hls_variant _low BANDWIDTH=900000;
hls_variant _mid BANDWIDTH=2400000;
hls_variant _hi BANDWIDTH=3500000;
}
I am also getting back to our trouble shooting of this same problem. We have no errors streaming from vmix. but the live is not showing. But this seems wrong - what did I miss?:
root@avideo:~# sudo /usr/local/nginx/sbin/nginx -s stop && sudo /usr/local/nginx/sbin/nginx root@avideo:~# curl -I http://video2.xxxxxxxx/plugin/Live/on_publish.php HTTP/1.1 301 Moved Permanently Date: Thu, 18 Aug 2022 17:20:40 GMT Server: Apache/2.4.52 (Ubuntu) Location: https://video2.xxxxxxxx/plugin/Live/on_publish.php Content-Type: text/html; charset=iso-8859-1
@stevespaw clearly you are making the same mistake described here
@ramesh8830 first make sure it will work without adaptive
@DanielnetoDotCom Is the "apache" correct in the curl response?
When I changed the "on_" 's to Ip's vmix would not connect.
this is not about apache, this is about nginx that needs to access using the HTTP port (NOT HTTPS), and without redirection
I am also getting back to our trouble shooting of this same problem. We have no errors streaming from vmix. but the live is not showing. But this seems wrong - what did I miss?:
root@avideo:~# sudo /usr/local/nginx/sbin/nginx -s stop && sudo /usr/local/nginx/sbin/nginx root@avideo:~# curl -I http://video2.xxxxxxxx/plugin/Live/on_publish.php HTTP/1.1 301 Moved Permanently Date: Thu, 18 Aug 2022 17:20:40 GMT Server: Apache/2.4.52 (Ubuntu) Location: https://video2.xxxxxxxx/plugin/Live/on_publish.php Content-Type: text/html; charset=iso-8859-1
Please make sure add both 80 and 443 in your nginx conf file and make sure to stop force redirecting to https on on_* urls.
server {
listen 80;
listen 443 ssl;
server_name mysite.com;
........
}
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.