Question / Help OBS studio rtmp to hls with NGINX or FFMPEG

ze rondeau

New Member
hello ,

I am using OBS studio with a small movie in loop for test ( MP4 H.264 aac)

basically I 'm trying to generate an HLS stream with playlist using Nginx on window 7 x64.

I have Nginx for window version 1.11.6 with rtmp library include.

I am not able to find a nginx.conf that work on window.

I am running nginx and OBS studio 17.0 on the same computer.

url : rtmp://localhost:1935/live
streamkey : test
folder : C:\Nginx

someone can share is conf file ?

thanks

ze
 

ze rondeau

New Member
hi ,

from your link, I did managed to get it work, thank you.

I have spent 2 days on this problem, gathering informations from the forum, and in Nginx website, Arut git.
nginx with rtmp compiled on window is pretty obscure.

you are right, it is not a problem with OBS studio.
it was more on how to connect OBS with nginx and to get it work on windows for HLS output.

I have included my nginx.conf if this can help someone.

thank you very much for your help

Yves

my nginx.conf for window
one channel
rtmp to hls

Code:
# *******************************************************************
# important notes for OBS studio on RTMP
# OBSstudio url
# rtmp://localhost:1935/live

# OBSstudio StreamKey
# test

# HTTP access
# http://localhost:8080/live/test/index.m3u8
# http://localhost:8080/        Welcome Nginx
# *******************************************************************
# Folders
# C:\nginx\nginx.exe
# C:\nginx\hls\live
# C:\nginx\hls\mobile
# C:\nginx\dash
# C:\nginx\html
# C:\nginx\conf
# C:\nginx\temp
# C:\nginx\logs
# C:\nginx\stats
# C:\nginx\videos
# *******************************************************************

worker_processes  1;
error_log  logs/error.log debug;
events {
worker_connections  1024;
}
rtmp {
server {
listen 1935;
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;
record all;
record_path /videos;
record_unique on;
hls on;
hls_nested on;
hls_path C:/nginx/HLS/live;
hls_fragment 8s;
hls_fragment_naming timestamp;

}
}
}

http {
include       mime.types;
default_type  application/octet-stream;

server {
listen 8080;
server_name home;

#creates the http-location for our full-resolution (desktop) HLS stream - "http://localhost:8080/live/test/index.m3u8"     
location /live {
types {
application/vnd.apple.mpegurl m3u8;
}
alias HLS/live;
add_header Cache-Control no-cache;
}

#allows us to host some webpages which can show our videos: "http://localhost:8080/index.html"    
location / {
root   c:/nginx/html;
index  index.html index.htm;
}  
}
}
 

Tormy

Member
Finally ... the only one setting is working ... but only with VLC ...
I can't use HTML Video tag ... it returns always black

HTML:
    <video controls>
        <source src="http://localhost:8080/live/live/index.m3u8"  type="application/x-mpegURL">
    </video>
 
Top