Closed Lordblanca closed 3 years ago
Did you configure your server to work with SSL/https?
https://github.com/WWBN/AVideo/wiki/Set-up-my-own-Stream-Server
from step 10.
The server is already set up https https://lbcomsvr.com. this is a test server to make sure every thing is right and I can reproduce it if I have to on my main server. There is http://www.lbcomsvr.com which all comes up well. And https://lbcomsvr.com where the live stream does not come up at all. Thank you in advance Robert Jean-Louis
On Sat, Apr 10, 2021, 11:35 AM Julian Romero @.***> wrote:
Did you configure your server to work with SSL/https?
https://github.com/WWBN/AVideo/wiki/Set-up-my-own-Stream-Server
from step 10.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WWBN/AVideo/issues/4903#issuecomment-817154633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBOGMDF7UWR6IKLTJDI2ODTIBV2VANCNFSM42WRBHOQ .
It is not enough. You need to configure the http section of nginx.conf file :
(...)
http {
include mime.types;
default_type application/octet-stream;
server {
listen 8443 ssl;
#you need to change the following 2 lines to the ssl certificate and key path in your server
ssl_certificate /etc/letsencrypt/live/your-site/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-ste/privkey.pem;
(...)
Also, FOR ME, the lines below worked once inserted into the apache2 conf file:
RewriteEngine on
# Go to https if not on /plugin/Live/
RewriteCond %{SERVER_PORT} =80
RewriteCond %{THE_REQUEST} !/plugin/Live/ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Go to http if on /for on_connect.php, on_done.php, on_play.php , on_publish.php , on_record_done.php /
RewriteCond %{SERVER_PORT} !=80
RewriteCond %{THE_REQUEST} /plugin/Live/* [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
So basically you are configuring your server to accept https when rtmp is accessed via nginx and to no use https when the Live plugin directory is accessed.
I did what you sent me. I have a connection. Like I did before. but now I have an online green light. but no video or audio for live streaming. I am running a test server before I go live with the main server. attached is a copy of my nginx conf and the apache2 conf files. Please let me know what else to do. I'm almost there. Thank You in advance Robert Jean-Louis Blessings
On Sat, Apr 10, 2021 at 10:50 PM Julian Romero @.***> wrote:
It is not enough. You need to configure the http section of nginx.conf file :
(...) http { include mime.types; default_type application/octet-stream; server { listen 8443 ssl;
you need to change the following 2 lines to the ssl certificate and key path in your server
ssl_certificate /etc/letsencrypt/live/your-site/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-ste/privkey.pem;
(...)
Also, FOR ME, the lines below worked once inserted into the apache2 conf file:
RewriteEngine on
Go to https if not on /plugin/Live/
RewriteCond %{SERVER_PORT} =80 RewriteCond %{THE_REQUEST} !/plugin/Live/ [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Go to http if on /for on_connect.php, on_done.php, on_play.php , on_publish.php , on_record_done.php /
RewriteCond %{SERVER_PORT} !=80 RewriteCond %{THE_REQUEST} /plugin/Live/ [NC] RewriteRule ^(.)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
So basically you are configuring your server to accept https when rtmp is accessed via nginx and to no use https when the Live plugin directory is accessed.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WWBN/AVideo/issues/4903#issuecomment-817238069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBOGMHWRWIOKR4PCEW5LWLTIEE65ANCNFSM42WRBHOQ .
I'm sorry but there's no attached files in your comment...
Attached are apache2 conf and nginx conf
On Tue, Apr 13, 2021 at 6:39 PM Julian Romero @.***> wrote:
I'm sorry but there's no attached files in your comment...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WWBN/AVideo/issues/4903#issuecomment-819097644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBOGMER634FN53KZVMH4ZLTITBZRANCNFSM42WRBHOQ .
Sorry again but there are no files attached. if you are replying the email notification, please be aware that email attachments are not sent to github. you must upload any file throught github.com
Here is my nginx conf file. I'm using OBS. I have a connection green light on OBS studio. But no audio and no video. This is a test server. Main server goes up once I can reproduce the server without error ... user www-data; worker_processes 1; error_log logs/error.log debug; events { worker_connections 1024; } rtmp { server { listen 1935; buflen 2s; allow play all;
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; hls_base_url https://******.com:444/live; on_publish http:// **/plugin/Live/on_publish.php; on_publish_done http:// **/plugin/Live/on_publish_done.php; on_play http://******//plugin/Live/on_play.php; on_record_done http:// **//plugin/Live/on_record_done.php;
#exec ffmpeg -re -i rtmp://localhost/live/$name
# -c:a aac -strict -2 -b:a 96k -c:v libx264
-vf scale=-2:240 -re 20 -g 40 -keyint_min 40 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 400k -maxrate 700k -bufsize 1400k -b:a 96k -f hls -hls_time 2 -hls_list_size 0 -f flv rtmp://localhost/adaptive/$name_low
-vf scale=-2:480 -re 30 -g 60 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 1200k -maxrate 2100k -bufsize 4200k -b:a 128k -f hls -hls_time 2 -hls_list_size 0 -f flv rtmp://localhost/adaptive/$name_mid
-vf scale=-2:720 -re 30 -g 60 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 2400k -maxrate 3000k -bufsize 6000k -b:a 128k -f hls -hls_time 2 -hls_list_size 0 -f flv rtmp://localhost/adaptive/$name_hi;
#recorder video{
# record all;
# record_path /var/www/tmp;
# record_notify on;
# record_max_size 2048M;
# record_suffix -%d-%b-%y-%T.flv;
#}
}
#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 _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;
#include /usr/local/nginx/snippets/self-signed.conf;
#include /usr/local/nginx/snippets/ssl-params.conf;
listen 8080;
listen 444 ssl;
server_name www.**.com; ssl_certificate /etc/ssl/certs/**combinerootintermediate.cer; ssl_certificatekey /etc/ssl/private/.**.com_private_key.key;
(desktop) HLS stream - "http://my-ip/live/my-stream-key/index.m3u8" location /live {
add_header 'Cache-Control' 'no-cache';
# 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; }
site using a URL like: "http://my-ip/stats"
# stub_status;
#}
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 My Ip Address;
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/**/; index index.html index.htm; }
#location ~ \.php$ {
# include /etc/nginx/snippets/fastcgi-php.conf;
# fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
#}
}
}
Here is my Apache2 conf. Added code that you gave me to the bottom of the page.
specific
# #
Debian's
possible, in
as
outlined
#
# #
pieces
up the
#
can be
#
sites-enabled/
modules,
#
their
our
#
in
will not
#
#
#
#
#
#
#
#
#
DefaultRuntimeDir ${APACHE_RUN_DIR}
#
# PidFile ${APACHE_PID_FILE}
#
# Timeout 300
#
# KeepAlive On
#
# MaxKeepAliveRequests 100
#
# KeepAliveTimeout 5
User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP}
#
# HostnameLookups Off
# ErrorLog ${APACHE_LOG_DIR}/error.log
#
e.g.
# LogLevel warn
IncludeOptional mods-enabled/.load IncludeOptional mods-enabled/.conf
Include ports.conf
/var/www.
Options FollowSymLinks AllowOverride None Require all denied
<Directory /usr/share> AllowOverride None Require all granted
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted
# AccessFileName .htaccess
#
# <FilesMatch "^.ht"> Require all denied
#
#
#
# LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
RewriteEngine on
RewriteCond %{SERVER_PORT} =80 RewriteCond %{THE_REQUEST} !/plugin/Live/ [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
on_publish.php , on_record_done.php / RewriteCond %{SERVER_PORT} !=80 RewriteCond %{THE_REQUEST} /plugin/Live/ [NC] RewriteRule ^(.)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
On Tue, Apr 13, 2021 at 9:03 PM Julian Romero @.***> wrote:
Sorry again but there are no files attached. if you are replying the email notification, please be aware that email attachments are not sent to github. you must upload any file throught github.com
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WWBN/AVideo/issues/4903#issuecomment-819148155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBOGMB5LNBY6UIPUAJXOL3TITSWBANCNFSM42WRBHOQ .
Configure live plugin these 2 need port 444
Nginx needs to also be configured to listen to port 444 and you need to add your certificates under your listen 444
Skip 8
It seems you have little clue on how conf files work. I would recommend a help from @DanielnetoDotCom service support at https://youphp.tube/marketplace/#ServicesT
The idea is to teach him so he will be able to teach others so Dan can be free to work on Developing
your issue is the https over rtmp . Before you change anything post here a screenshot of your stats page .
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"m using OBS. I can live stream to regular page http: no problem. I can't live stream to my https. I get a connection but no video or audio to my https. Can you please direct me to and updated page with instructions for https. thank you