From 6b9694209727479805f2a50f14506890802640c3 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 6 Feb 2013 12:58:04 +0400 Subject: [PATCH] added more examples to README --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6715ba..a8c27c3 100644 --- a/README.md +++ b/README.md @@ -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; } }