Introduction
HLS stands for HTTP live streaming. Itβs an HTTP based media streaming protocol developed by Apple. Unlike UDP based protoc...
For further actions, you may consider blocking this person and/or reporting abuse
git clone git://github.com/arut/nginx-rtmp-module.git i attempted to down load this to my server this was the error is there another way to get this plugin?
thanks
lenard
[root@server ~]# git clone git://github.com/arut/nginx-rtmp-module.git
Cloning into 'nginx-rtmp-module'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.113]: errno=Connection refused
i finally downloaded the module but now i get i have put this plugin in several places i am not sure what to do
Lenard
configuring additional modules
adding module in ../nginx-rtmp-module
./configure: error: no ../nginx-rtmp-module/config was found
[root@server nginx-1.17.0]# ls
auto conf html man README
CHANGES configure LICENSE nginx-rtmp-module.git src
CHANGES.ru contrib Makefile objs
check the path specified for the cloned module and make sure the module was cloned without any errors. The config file that caused the error is located on the project root directory on github. So i suggest you make sure the path specified is the correct path to the module.
what will be the best way to get this file without errors?
i had to use wget to get the file
i was wondering if you could please let me know if i got the conf file correct
thanks
lenard
* @version 1.8.10
* @package Engintron for cPanel/WHM
* @author Fotis Evangelou
* @url engintron.com
* @copyright Copyright (c) 2010 - 2018 Nuevvo Webware P.C. All rights reserved.
* @license GNU/GPL license: gnu.org/copyleft/gpl.html
*/
user nginx;
pid /var/run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 65535;
server_tokens off;
events {
multi_accept on;
use epoll;
worker_connections 65535;
}
We need to setup an rmtp server to stream video from client devices
rtmp {
server {
listen 1935;
chunk_size 4096;
ping 30s;
notify_method get;
allow play all;
# rmtp handler our clients connect to for live streaming, it runs on port 1935. It converts the stream to HLS and stores it on our server
application app {
live on;
hls on;
hls_path /var/www/hls/live;
hls_nested on; # create a new folder for each stream
record_notify on;
record_path /var/www/videos;
record all;
record_unique on;
}
}
}
http {
## Basic Settings ##
client_body_buffer_size 128k;
client_body_timeout 30s; # Use 5s for high-traffic sites
client_header_timeout 30s; # Use 5s for high-traffic sites
client_max_body_size 1024m;
keepalive_timeout 20s;
port_in_redirect off;
sendfile on;
server_names_hash_bucket_size 512;
server_name_in_redirect off;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
types_hash_max_size 2048;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name _;
location / {
root html;
index index.html index.htm;
}
# the http end point our web based users connect to see the live stream
location /live {
types {
application/vnd.apple.mpegurl m3u8;
}
alias /var/www/hls/live;
add_header Cache-Control no-cache;
}
}include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name _;
location / {
root html;
index index.html index.htm;
}
# the http end point our web based users connect to see the live stream
location /live {
types {
application/vnd.apple.mpegurl m3u8;
}
alias /var/www/hls/live;
add_header Cache-Control no-cache;
}
}
This is very nice. Thank you for this article. I have a doubt. I wanted to make a webiste similar to netflix(On a smaller level, i understand), where i have few video files(Movies) and i want to stream those to the web browser.
I understood that i can convert all my files using ffmpeg. using this command
But Shall i do this will all my files only once and generate chunks. Or shall i issue this command every time a new user request a video. I have seen that these files under the directory /var/www/hls/live are lost on restarting nginx.
As far as i know it has to be done for every request.
Great article, I've been able to setup my server for streaming and able to livestream to the server and push to other platforms. I can also use VLC to view the live stream by xxx.xxx.xxx.xxx/live/123456/index...., however I am not able to view the livestream with an embedded player on a website. Is it due to crossdomain or do I need an SSL certificate, or am I leaving something out. your assistance would be greatly appreciated.
"ffmpeg -i /path/to/video -c:v h264 -c:a aac -strict -2 -f flv rtmp://server_ip:1935/app/unique_stream_name #the name of the stream has to be unique "
When it says /Path/To/Video what exactly should I put there? because I chose a directory thinking it's where I was gonna save video files, but after I pressed Enter it appeared in Red "It is a directory" so... may you help me, please?
Cool article. I'm just stuck on point 3. can you please explain a bit in details like server-ip from which server. Just missing a little piece of information on streaming part like you did for nginx
The ip or hostname of the remote machine Nginx is running on
hi
please upload shell script fullconfig.sh this page install&config all level and set this page
Centos & ubanta
thanks