HLS Streaming Server OBS is fine server doesn't get signal

Forum home -> Tech Talk -> View topic

Post

Posted
Rating:
#395 (In Topic #82)
Avatar
Standard member
Thanks for the great tutorial video.

I followed every step from the video through obs part.

when I put server address from droplets and start streaming on obs it is running (I see green and k/s ping on bottom right of obs as well) however when I check server with ls -al it doesnt get any signal like his.

Can anyone advise me how to fix it?

thank you no signal.JPG

*when I check bandwidth, it seems like video is streaming into server but it doesnt creat any file how can I redirect the file to hls folder?

bandw.JPG

Last edit: by richbom

Online now: No Back to the top

Post

Posted
Rating:
#396
Avatar
NOTS Staff
Can you please post the output of your nginx.conf file?

cat /usr/local/nginx/conf/nginx.conf

NGINX logs from /var/log may also be helpful.
Online now: No Back to the top

Post

Posted
Rating:
#397
Avatar
Standard member
Don't understand the streaming key. Running nginx on local machine and network, followed all the way through to OBS as well. Camera is showing in OBS, enter ip address of local machine

rtmp://192.168.50.7/show
streaming key is "1"

hit start streaming and get this error:

Could not access the specified channel or stream key, please double-check your stream key.  If it is correct, there may be a problem connecting to the server.

Here is nano file:

worker_processes  auto;
events {
    worker_connections  1024;
}

# RTMP configuration
rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        application show {
            live on;
            # Turn on HLS
            hls on;
            hls_path /nginx/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            deny play all;
        }
    }
}

http {
    sendfile off;
    tcp_nopush on;
    # aio on;
    directio 512;
    default_type application/octet-stream;

    server {
        listen 8080;

        location / {
            # Disable cache
            add_header 'Cache-Control' 'no-cache';

            # CORS setup
            add_header 'Access-Control-Allow-Origin' '*' always;
            add_header 'Access-Control-Expose-Headers' 'Content-Length';

            # allow CORS preflight requests
            if ($request_method = 'OPTIONS') {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Max-Age' 1728000;
                add_header 'Content-Type' 'text/plain charset=UTF-8';
                add_header 'Content-Length' 0;
                return 204;
            }

            types {
                application/dash+xml mpd;
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }

            root /nginx/;
        }
    }
}


Here is the error.og file:

2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to [::]:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:1935 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to [::]:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:1935 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to [::]:80 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: bind() to 0.0.0.0:1935 failed (98: Address already in use)
2020/04/04 17:59:32 [emerg] 3336#3336: still could not bind()


Online now: No Back to the top

Post

Posted
Rating:
#398
Avatar
NOTS Staff
Before, you said:

richbom said

when I put server address from droplets and start streaming on obs it is running (I see green and k/s ping on bottom right of obs as well)
Now, you said:

wayzata said

hit start streaming and get this error:
These are two different behaviors when you attempt to start streaming (actually streaming vs. popping up an error message.) So you're changing things without understanding what they do and also not telling me about it. I cannot read your mind or travel back in time to find out what you messed up, and I don't have time to try and understand what you thought you were doing.

From your logs, it looks like you may have forgotten to kill an older NGINX process before you started a new one at some point. Your config options won't apply until NGINX has actually been restarted.

With regards to "not understanding" the stream key, the stream key will simply become the name of your .m3u8 file.

Edit: I also noticed that the location directory for your http server does not match the hls_path directive for the HLS server. You need to serve via HTTP the same directory that your HLS server is putting its files into.

Last edit: by jacobgkau

Online now: No Back to the top

Post

Posted
Rating:
#399
Avatar
Standard member
Hi Jacob, thanks greatly for the response. For context and background, I'm a complete newbie when it comes to linux and learning as I go.

I have had an opportunity to restart ngnix.

Can you be more clear on the hls_path directive directory and what you mean? If you are too busy, I understand. Thanks.

Online now: No Back to the top
1 guest and 0 members have just viewed this.