1

I'm trying to stream from obs to nginx server. I'm using videojs as a player. In OBS Settings I'm using custom Streaming server and the url is rtmp://localhost/live. this is the configuration file for nginx:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                application live {
                        live on;
                        record off;                     
                }
        }
}

and this is the html part:

<video id="player" class="video-js vjs-default-skin" height="360" width="640" controls autoplay preload="none">
    <source src="rtmp://localhost/live" type="rtmp/mp4" />
</video>
4

1 回答 1

0

https://github.com/DigiSkyOps/knife 这是一个obs流服务器

nginx/配置

    rtmp {
  server {
    listen 1935;
    chunk_size 4000;
    application live {
      live on;
    }
    application hls {
        live on;
        hls on;
        hls_path /data/hls;
        hls_fragment 5s;
        hls_playlist_length 10s;
        hls_continuous on;
        hls_cleanup on;
        hls_nested on;
      }
    }
  }
于 2020-04-16T09:57:51.330 回答