Can't stream OBS into HTML5 player (Workflow: OBS - NGINX - HLS - Video.js)

eugenio_bt

New Member
Hello everyone, this is my first post on this forum, but I follow you since long time.
This is my situation:
I have created a website in wich I want to embed a player with the audio/video stream coming from OBS. I can't use services like Twitch or Youtube because and so I need to use a custom HTML5 Video player. My chosen one is video.js.
I have created a Windows 2016 server on AWS and inside the server I have installed NGINX for Win with rtmp module. Then I have set up the configuration file. For testing it I have done something like that:
Code:
rtmp {
        server {
                listen 1935;
                chunk_size 4096;
                application live {
                        live on;
                        record: off;
                }
}
Than I have set up OBS with "custom" service, server: "rtmp://<server IP>/live" code: "test" and then I have started the NGINX and gone live on OBS.
I've tried to open the stream with vlc media player and all Is perfectly working! WOW!!!

But here starts the problems. I know that to stream directly on video.js I need to convert the rtmp in HLS but I really don't know how to do it. I've tried to follow some guides but always gut stucked at starting point.
I try change the .conf file in something like that:
Code:
rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                application live {
                        live on;
                }
                application hls {
                    live on;
                    hls on;
                    hls_path /tmp/hls/;
                    hls_fragment 6s;
                    hls_playlist_length 60s;
               }
        }
}

But the server won't start anymore.
I'm doing something wrong? Or maybe is the windows based server that will not work with HLS?
Could someone give me some helps? I'm looking for a step by step tutorial but I can't find it.

Really appreciate your works and helps.
 
Top