logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
-TA_  
#1 Posted : Friday, June 12, 2020 6:30:35 PM(UTC)
-TA_

Rank: Advanced Member

Groups: Registered
Joined: 6/12/2015(UTC)
Posts: 72
Location: Finland

Thanks: 1 times
Was thanked: 5 time(s) in 2 post(s)
Has anyone has expriment about this

I have nginx-server installed at Win10 machine with http-streaming . I can send stream to it from vMix via rtmp and nginx makes hls-stream but why I get only audio not video when sending for example webcam feed from vMix ?

If sending mp4 file which is recorded in vMix then I can see both audio and video in browser

Thks, Tommi
DWAM  
#2 Posted : Friday, June 12, 2020 7:09:05 PM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
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
-TA_  
#3 Posted : Monday, June 15, 2020 6:30:43 PM(UTC)
-TA_

Rank: Advanced Member

Groups: Registered
Joined: 6/12/2015(UTC)
Posts: 72
Location: Finland

Thanks: 1 times
Was thanked: 5 time(s) in 2 post(s)
Originally Posted by: DWAM Go to Quoted Post
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
-TA_  
#4 Posted : Thursday, June 18, 2020 10:55:07 PM(UTC)
-TA_

Rank: Advanced Member

Groups: Registered
Joined: 6/12/2015(UTC)
Posts: 72
Location: Finland

Thanks: 1 times
Was thanked: 5 time(s) in 2 post(s)
Originally Posted by: -TA_ Go to Quoted Post
Originally Posted by: DWAM Go to Quoted Post
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)
DWAM  
#5 Posted : Friday, June 19, 2020 3:45:56 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Check the HLS directives on NGINX wiki
https://github.com/arut/...dule/wiki/Directives#hls

I think you have a permission issue cause you forgot this

root /var/livestream/hls

You might also want to check the Google user group for NGINX RTMP in case you don't already
https://groups.google.com/forum/embed/#!forum/nginx-rtmp
DWAM  
#6 Posted : Friday, June 19, 2020 4:27:15 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
To troubleshoot in case my assumption is wrong, can you see your chunks in /var/livestream/hls
I guess no
Jan C  
#7 Posted : Monday, June 22, 2020 1:29:22 AM(UTC)
Jan C

Rank: Newbie

Groups: Registered
Joined: 6/22/2020(UTC)
Posts: 1
Denmark

When using RTMP server, key frames need to be at least 2
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.