конфиг nginx
events {
worker_connections 768;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application hls {
live on;
hls on;
hls_path /etc/nginx/hls;
}
application dash {
live on;
dash on;
dash_path /etc/nginx/dash;
}
}
}
http {
server {
listen 80;
root /etc/nginx/;
# This URL provides RTMP statistics in XML
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /etc/nginx/;
}
##
# location / {
# root /etc/nginx/;
# }
##
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
}
location /dash {
root /etc/nginx/dash/;
add_header Cache-Control no-cache;
}
}
worker_connections 768;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application hls {
live on;
hls on;
hls_path /etc/nginx/hls;
}
application dash {
live on;
dash on;
dash_path /etc/nginx/dash;
}
}
}
http {
server {
listen 80;
root /etc/nginx/;
# This URL provides RTMP statistics in XML
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /etc/nginx/;
}
##
# location / {
# root /etc/nginx/;
# }
##
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
}
location /dash {
root /etc/nginx/dash/;
add_header Cache-Control no-cache;
}
}
конфиг ffmpeg
[spoiler]
ffmpeg -loglevel verbose -re -i rtsp://10.102.39.18:554/CH001.sdp -vcodec libx264 -s 320x240 -r 10 -threads 1 -vprofile baseline -f flv rtmp://localhost:1935/hls/movie &
[/spoiler]
No comments:
Post a Comment