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>
https://github.com/DigiSkyOps/knife this is a obs stream server
nginx/config
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;
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.