Comments on: How to Install an Nginx RTMP Server in Ubuntu 22.04 https://formatswap.com/blog/linux-tutorials/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04/ Tue, 16 May 2023 19:59:47 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: admin https://formatswap.com/blog/linux-tutorials/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04/#comment-81 Tue, 16 May 2023 19:59:47 +0000 https://formatswap.com/blog/?p=1149#comment-81 In reply to Oliver.

Hi Oliver, I am glad you enjoyed the tutorial. Here are some steps you could try to resolve the issue. It is most likely a firewall issue.

1. Verify Connectivity: Ensure that the NGINX RTMP server is reachable from the other laptop on the same Wi-Fi network. You can test this by pinging the server’s IP address from the laptop.

2. Check Firewall Settings: Confirm that the firewall on the NGINX server allows incoming connections on the RTMP port (default: 1935). Additionally, make sure that any firewalls on the laptop or network router are not blocking access to the NGINX server.

3. Adjust Network Configuration: Check the network configuration on the NGINX server to ensure it is set up correctly. Verify that the server’s IP address and subnet mask are properly configured for the Wi-Fi network.

4. Verify URL Format: Double-check the URL you are using in VLC on the other laptop. It should be in the format `rtmp:///`. Ensure that you have entered the correct IP address or hostname of the NGINX server and the appropriate application name as configured in your NGINX RTMP server.

5. Test with Different Devices: If possible, try streaming from other devices on the same Wi-Fi network to see if the issue is specific to the laptop or VLC player. This can help identify whether the problem lies with the NGINX server or the client device.

6. Monitor NGINX Logs: Check the NGINX logs for any error messages or warnings related to the incoming connection attempts. The log file is usually located at `/var/log/nginx/error.log`. This can provide insights into the cause of the connection issues.

7. Check Network Isolation: If the NGINX server and the other laptop are on different network segments or isolated subnets, ensure that there are no network configuration restrictions or firewall rules preventing access between them.

By following these troubleshooting steps, you should be able to identify and resolve the issue preventing the NGINX RTMP server from being accessible and streaming video on other devices within the same Wi-Fi network.

]]>
By: admin https://formatswap.com/blog/linux-tutorials/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04/#comment-80 Tue, 16 May 2023 19:56:11 +0000 https://formatswap.com/blog/?p=1149#comment-80 In reply to Ronald.

Here is an example of the config changes you would need to make to enable m3u8.

rtmp {
server {
listen 1935; // RTMP server port

application myapp {
live on;
hls on;
hls_path /path/to/hls/;
hls_fragment 2s; // Set the duration of each HLS segment
hls_playlist_length 6s; // Set the duration of the HLS playlist

# Additional RTMP configuration settings if needed

# Specify different video resolutions and bitrates if desired
# exec ffmpeg -i rtmp://localhost/myapp/$name -c:v libx264 -preset veryfast -c:a aac -b:v 500k -b:a 128k -f flv rtmp://localhost/myapp/$name_500k;
}

# Additional application blocks for different streaming applications if needed

# server-level RTMP configuration settings if needed
}

# Additional server blocks for multiple RTMP servers if needed
}

http {
server {
listen 80; // HTTP server port

location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /path/to/;
add_header Cache-Control no-cache; // Recommended for HLS streaming

# Additional HTTP configuration settings if needed
}

# Additional server-level HTTP configuration settings if needed
}

# Additional server blocks for multiple HTTP servers if needed
}

Once the NGINX RTMP server is running and configured, you can obtain the M3U8 URL by combining the server’s URL or IP address with the path specified in the RTMP configuration. For example, if your NGINX server is running on example.com and you defined the hls_path as /path/to/hls/, the M3U8 URL might be http://example.com/path/to/hls/stream.m3u8

Hope this helps.

]]>
By: Oliver https://formatswap.com/blog/linux-tutorials/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04/#comment-77 Mon, 08 May 2023 15:38:02 +0000 https://formatswap.com/blog/?p=1149#comment-77 Hey, thank you for your tutorials, but I have some problems related to receiving the video in other device. After setting and watching the video via VLC on my local ubuntu machine, I tried to watch it with another laptop in the same WIFI network, but when I inputed the url on the VLC player, it didn’t work and poped up error, unable to access. So do I need to add something in the configuration to allow the server to stream and be accessible in another device? Thank you so much!

]]>
By: Ronald https://formatswap.com/blog/linux-tutorials/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04/#comment-75 Wed, 03 May 2023 00:47:51 +0000 https://formatswap.com/blog/?p=1149#comment-75 It works perfectly fine.

how can i get the m3u8 url?

]]>