Answered by:
Connecting OBS-STUDIO to Nginx server

Question
-
I have installed and started nginx server on Ubuntu 14.04. My objective is to stream a video (live) using HLS (http live streaming). I followed this tutorial https://www.vultr.com/docs/setup-nginx-on-ubuntu-to-stream-live-hls-video and it recommends using OBS-STUDIO. However, I don't know how to stream from the OBS-STUDIO to the Nginx and then be able to view the steam from other machines (e.g. with VLC). Any help?
- Moved by Dave PatrickMVP Saturday, April 18, 2020 12:41 PM looking for forum
Saturday, April 18, 2020 12:29 PM
Answers
-
Might try asking for help over here.
https://obsproject.com/forum/list/windows-support.32/
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP Saturday, April 18, 2020 1:14 PM
- Marked as answer by Richard MuellerMVP Saturday, April 25, 2020 11:21 AM
Saturday, April 18, 2020 12:41 PM
All replies
-
Might try asking for help over here.
https://obsproject.com/forum/list/windows-support.32/
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP Saturday, April 18, 2020 1:14 PM
- Marked as answer by Richard MuellerMVP Saturday, April 25, 2020 11:21 AM
Saturday, April 18, 2020 12:41 PM -
Add a media source for OBS.
Configure the self-defined media server on OBS, add a URL as follows:
URL: rtmp://domain_name:1935/hlslive
stream name: test
Build Nginx with nginx-rtmp-module ,install, and then config nginx.conf
vim /usr/local/nginx/conf/nginx.conf
add or config the following module:
rtmp {
server {
listen 1935; #listen port
chunk_size 4096;
application hlslive { #rtmp push stream request path
live on;
hls on;
hls_path /usr/share/nginx/html/hlslive/test;
hls_fragment 3s;
hls_playlist_length 18s;
}
}
}
also config as a http server for hls m3u8 request:
http {
...
server {
listen 8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
run nginx
nginx -c /usr/local/nginx/conf/nginx.conf
Click Begin Push Stream on OBS Streaming.
Input the following URL to view the live video.Saturday, April 18, 2020 12:59 PM