-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.fix extend timestamp when using librtmp; 2.add rpm packet script;
- Loading branch information
Showing
17 changed files
with
793 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
docker/*.tar* | ||
openresty/ | ||
nginx/ | ||
.git/ | ||
*.code-workspace | ||
.DS_Store | ||
h5player/ | ||
.vscode/ | ||
nginx/ | ||
source/ | ||
rpmbuild/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
df_path=$1 | ||
service=$2 | ||
|
||
install_path=$df_path"/usr/local/"$service | ||
|
||
cp -rf ./deps/* $install_path"/sbin" | ||
|
||
cp ./resource/conf-template/nginx.conf $install_path"/conf/nginx.conf" | ||
|
||
cp ./resource/stat.xsl $install_path"/html/stat.xsl" | ||
|
||
cp ./resource/crossdomain.xml $install_path"/html/crossdomain.xml" | ||
|
||
cp -r ./h5player $install_path"/html/" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
user root; | ||
daemon on; | ||
master_process on; | ||
worker_processes 1; | ||
#worker_rlimit 4g; | ||
|
||
#error_log logs/error.log; | ||
#error_log logs/error.log notice; | ||
error_log logs/error.log info; | ||
|
||
worker_rlimit_nofile 102400; | ||
worker_rlimit_core 2G; | ||
working_directory /tmp; | ||
|
||
#pid logs/nginx.pid; | ||
|
||
events { | ||
# use epoll; | ||
worker_connections 1024; | ||
multi_listen unix:/tmp/http 6080; | ||
multi_listen unix:/tmp/rtmp 6035; | ||
dynamic_refresh_interval 5s; | ||
dynamic_domain_buckets 1001; | ||
resolver 114.114.114.114 valid=10s; | ||
resolver_timeout 30s; | ||
} | ||
|
||
stream_zone buckets=1024 streams=4096; | ||
|
||
rtmp { | ||
on_master http://{control_addr}/control/server stage=start,update update=5 args=serverId=pms-mmm&announceIp={announceIp}&httpPort=6080&httpsPort=443&rtmpPort=6035&protocol=rtmp; | ||
log_format log_bandwidth '{"app":"$app","name":"$name","bitrate":$bitrate,"args":"$args","timestamp":$ntp,"ts":"$time_local","type":"$command","remote_addr":"$remote_addr","domain":"$domain"}'; | ||
access_log logs/bandwidth.log log_bandwidth trunc=10s; | ||
|
||
server { | ||
listen 6035; | ||
serverid pms-mmm; | ||
out_queue 2048; | ||
server_name localhost; | ||
|
||
application * { | ||
idle_streams on; | ||
on_publish http://{control_addr}/control/publish stage=start,update,done update=2 args=serverId=$serverid&announceIp=live.pingos.io&scheme=$scheme&token=$parg_token; | ||
on_meta http://{control_addr}/control/meta stage=start,update,done update=2 args=serverId=$serverid&scheme=$scheme&announceIp=live.pingos.io&$metadata; | ||
|
||
rtmp_auto_pull off; | ||
rtmp_auto_pull_port unix:/tmp/rtmp; | ||
|
||
# live_record on; | ||
# live_record_path /tmp/record; | ||
|
||
# recorder r1{ | ||
# record all; | ||
# record_path /tmp/record; | ||
# } | ||
|
||
# exec_publish bash -c "ffmepg -i rtmp://127.0.0.1/live/$name -c copy /tmp/mp4/$name-$starttime.mp4"; | ||
|
||
live on; | ||
hls on; | ||
hls_path /tmp/hls; | ||
hls_fragment 4000ms; | ||
# hls_max_fragment 6000ms; | ||
hls_playlist_length 12000ms; | ||
|
||
hls2memory on; | ||
mpegts_cache_time 20s; | ||
|
||
hls2_fragment 1300ms; | ||
hls2_max_fragment 1600ms; | ||
hls2_playlist_length 3900ms; | ||
|
||
wait_key on; | ||
wait_video on; | ||
cache_time 1s; | ||
low_latency off; | ||
fix_timestamp 0s; | ||
# h265 codecid, default 12 | ||
hevc_codecid 12; | ||
} | ||
} | ||
} | ||
|
||
http { | ||
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" "$http_X-Real-IP" "$host"'; | ||
|
||
|
||
access_log logs/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
#keepalive_timeout 0; | ||
keepalive_timeout 65; | ||
|
||
#reset_server_name www.test1.com www.test2.com; | ||
#gzip on; | ||
server { | ||
listen 6080; | ||
location /rtmp_stat { | ||
rtmp_stat all; | ||
rtmp_stat_stylesheet /stat.xsl; | ||
} | ||
|
||
location /xstat { | ||
rtmp_stat all; | ||
} | ||
|
||
location /sys_stat { | ||
sys_stat; | ||
} | ||
|
||
location /proxy/ { | ||
rewrite ^/proxy/(.*) /sys_stat break; | ||
proxy_pass http://$1:; | ||
} | ||
|
||
location /bs { | ||
broadcast unix:/tmp/http /proxy; | ||
broadcast_rewrite_prefix " " [; | ||
broadcast_suffix ]; | ||
} | ||
|
||
location /control { | ||
rtmp_control all; | ||
} | ||
|
||
location /flv { | ||
flv_live 6035; | ||
chunked_transfer_encoding off; | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header Cache-Control no-cache; | ||
} | ||
|
||
location /ts { | ||
ts_live 6035 app=live; | ||
} | ||
|
||
location /hls { | ||
# Serve HLS fragments | ||
types { | ||
application/vnd.apple.mpegurl m3u8; | ||
video/mp2t ts; | ||
} | ||
root /tmp; | ||
add_header Cache-Control no-cache; | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
} | ||
|
||
location /hls2 { | ||
hls2_live 6035 app=live; | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header Cache-Control no-cache; | ||
} | ||
|
||
location / { | ||
chunked_transfer_encoding on; | ||
root html/; | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.