Originally Posted by: -TA_ Originally Posted by: DWAM I'm not a fan of NGINX on Windows (Linux is clearly recommended and offers more features) but that's weird.
Is it only your webcam that won't work ? Did you try with another one ? Or a real camera ? Or even an NDI feed ?
What does the NGINX stats module say when it happens ? It should display all sort of information regarding the nature of the ingested stream, like codecs and profiles used, bitrates and so on...
The only idea that comes to my mind is maybe a wrong color space from your webcam. Did you try adding your webcam with different input options in vMix (MJPEG instead of default, YUV instead of RGB, etc...)
2 things you can do to diagnose this issue :
- try streaming the same webcam to NGINX with OBS or FFMPEG and see if same thing happens or not > if if doesn't then it's vMix related or more precisely you're doing something wrong with vMix
- try streaming the same webcam from vMix to MistServer (another free RTMP server which works better on Windows btw) > if it works then it's NGINX related (but I doubt it unless it's a specific issue with the windows build of NGINX)
Keep me posted
Guillaume
Okey, changed to another PC and vmix install and now all cams (hdmi/ndi) and videos shows correctly at nginx server. Webcam seems to be MPEG only and thats causing the problem I think. Now I will try to setup some linux server if I can :-)
-Tommi
UPDATE
Hi! Anyone who could help with web server config ? Im not really familiar at Ubuntu at all so bear with me :-)
I have nginx server running and its receiving rtmp stream from vMix. Thats ok. I can see its coming to server and I can see it like VLC rtmp:// source
But when trying to see it from web browser its unavailable.
I can see from error log that browser request comes to http server but path is wrong and it cant find HLS stream.
HLS stream can be found at /var/livestream/hls folder but when I type http://server-ip/index.html it tries folder /var/www/html/live/stream/index
Ubuntu 18.04 running at Google Cloud
Config files under
nginx.conf
rtmp {
server {
listen 1935;
chunk_size 8192;
application live {
live on;
interleave off;
meta on;
wait_key on;
wait_video on;
idle_streams off;
sync 300ms;
session_relay on;
allow publish all;
allow play all;
max_connections 1000;
push rtmp://localhost/hls;
}
application hls {
live on;
allow play all;
hls on;
hls_type live;
hls_nested on;
hls_path /var/livestream/hls;
hls_cleanup on;
hls_sync 100ms;
hls_fragment 10s;
hls_playlist_length 60s;
hls_fragment_naming system;
}
}
}
index.html
<html>
<head>
<script src='http://Server-IP/videojs/video.js'></script>
<script src="http://Server-IP/videojs/videojs-http-streaming.js"></script>
<meta charset=utf-8 />
<title>LiveStream</title>
<link href="http://Server-IP/videojs/video-js.min.css" rel="stylesheet">
<!-- <link href="http://Server-IP/videojs/videojs-sublime-skin.min.css" rel="stylesheet"> -->
<!-- <link href="http://Server-IP/videojs/videojs-sublime-skin.css" rel="stylesheet"> -->
<!-- <link href="http://Server-IP/videojs/video-js.css" rel="stylesheet"> -->
<!-- <link href="http://Server-IP/videojs/videojs-skin-twitchy.css" rel="stylesheet" type="text/css"> -->
</head>
<body>
<center>
<video-js id="live_stream" class="video-js vjs-fluid vjs-default-skin vjs-big-play-centered" controls preload="auto" autoplay="true" width="auto" height="auto" poster="http://Server-IP/poster.jpg">
<source src="http://Server-IP/live/stream/index.m3u8" type="application/x-mpegURL">
<p class='vjs-no-js'>
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href='http://videojs.com/html5-video-support/' target='_blank'>supports HTML5 video</a>
</p>
</video-js>
<script>
var player = videojs('live_stream');
player.play();
</script>
</center>
</body>
</html>
error log
2020/06/18 11:41:40 [error] 7471#7471: *5 open() "/var/www/html/live/stream/index.m3u8" failed (2: No such file or directory)