added more examples to README

This commit is contained in:
Roman Arutyunyan 2013-02-06 12:58:04 +04:00
parent 8104bff06f
commit 6b96942097

View file

@ -143,7 +143,7 @@ rtmp_auto_push directive.
#
# 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 {
@ -151,6 +151,13 @@ rtmp_auto_push directive.
# 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 {
live on;
@ -168,6 +175,13 @@ rtmp_auto_push directive.
# and play locally
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
application vod {
@ -275,7 +289,11 @@ rtmp_auto_push directive.
location /hls {
# Serve HLS fragments
types {
application/vnd.apple.mpegurl m3u8;
}
alias /tmp/app;
expires -1;
}
}