mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-02 06:39:32 +02:00
added more examples to README
This commit is contained in:
parent
8104bff06f
commit
6b96942097
20
README.md
20
README.md
|
@ -143,7 +143,7 @@ rtmp_auto_push directive.
|
||||||
#
|
#
|
||||||
# Multiple exec lines can be specified.
|
# Multiple exec lines can be specified.
|
||||||
|
|
||||||
exec /usr/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec flv -acodec copy -s 32x32 -f flv rtmp://localhost:1935/small/${name};
|
exec ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec flv -acodec copy -s 32x32 -f flv rtmp://localhost:1935/small/${name};
|
||||||
}
|
}
|
||||||
|
|
||||||
application small {
|
application small {
|
||||||
|
@ -151,6 +151,13 @@ rtmp_auto_push directive.
|
||||||
# Video with reduced resolution comes here from ffmpeg
|
# Video with reduced resolution comes here from ffmpeg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application webcam {
|
||||||
|
live on;
|
||||||
|
|
||||||
|
# Stream from local webcam
|
||||||
|
exec_static ffmpeg -f video4linux2 -i /dev/video0 -c:v libx264 -an -f flv rtmp://localhost:1935/webcam/mystream;
|
||||||
|
}
|
||||||
|
|
||||||
application mypush {
|
application mypush {
|
||||||
live on;
|
live on;
|
||||||
|
|
||||||
|
@ -168,6 +175,13 @@ rtmp_auto_push directive.
|
||||||
# and play locally
|
# and play locally
|
||||||
pull rtmp://rtmp3.example.com pageUrl=www.example.com/index.html;
|
pull rtmp://rtmp3.example.com pageUrl=www.example.com/index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application mystaticpull {
|
||||||
|
live on;
|
||||||
|
|
||||||
|
# Static pull is started at nginx start
|
||||||
|
pull rtmp://rtmp4.example.com pageUrl=www.example.com/index.html name=mystream static;
|
||||||
|
}
|
||||||
|
|
||||||
# video on demand
|
# video on demand
|
||||||
application vod {
|
application vod {
|
||||||
|
@ -275,7 +289,11 @@ rtmp_auto_push directive.
|
||||||
|
|
||||||
location /hls {
|
location /hls {
|
||||||
# Serve HLS fragments
|
# Serve HLS fragments
|
||||||
|
types {
|
||||||
|
application/vnd.apple.mpegurl m3u8;
|
||||||
|
}
|
||||||
alias /tmp/app;
|
alias /tmp/app;
|
||||||
|
expires -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue