[FFmpeg-devel] [PATCH 8/8] doc: Update Documentation.txt and add sample config as supplement

Stephan Holljes klaxa1337 at googlemail.com
Fri Jun 1 01:20:32 EEST 2018


Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
---
 Documentation.txt | 17 ++++++++---------
 sample_config.lua | 28 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 9 deletions(-)
 create mode 100644 sample_config.lua

diff --git a/Documentation.txt b/Documentation.txt
index 9a7f0bf..c8fef11 100644
--- a/Documentation.txt
+++ b/Documentation.txt
@@ -67,16 +67,15 @@ struct HTTPDInterface {
 Usage
 -----
 
-Currently streams can be supplied as a stream through stdin or any ffmpeg-
-compatible URI, e.g. files or network locations. Examples:
+To use ffserver, a config file has to be created that defines what streams to
+read and where to serve them. A sample config is supplied as sample_config.lua.
+This sample config defines two servers with a total of three streams. The first
+server serves two streams on all interfaces on port 8080, while the second
+server serves one stream on 127.0.0.1. The streams can be received by
+requesting the configured stream name as the GET parameter in the HTTP request.
+In the sample config, this would be "http://<server_address>:8080/default_stream"
+for the first stream.
 
-cat somefile.mkv | ./ffserver
-
-./ffserver somefile.mkv
-
-./ffserver http://somehost/somefile.mkv
-
-This will start reading the file and open port 8080 for HTTP client connections.
 The stream is read in real time from whatever resource it is retrieved.
 Currently a maximum of 16 clients is implemented.
 
diff --git a/sample_config.lua b/sample_config.lua
new file mode 100644
index 0000000..a5e6192
--- /dev/null
+++ b/sample_config.lua
@@ -0,0 +1,28 @@
+-- Sample configuration file for ffserver
+-- Contains all settings
+settings = {
+    -- A server instance
+    default_server = {
+        -- Server settings
+        bind_address = "0.0.0.0",
+        port = 8080,
+        -- Stream settings
+        default_stream = {
+            input = "default.mkv",
+            formats = { "mkv" }, -- later possible: { "mkv", "hls", "dash" }
+        },
+        other_stream = {
+            input = "other_file.mkv",
+            formats = { "mkv" }
+        }
+    },
+    -- Another server instance
+    other_server = {
+        bind_address = "127.0.0.1",
+        port = 8081,
+        default_restream = {
+            input = "yet_another_file.mkv",
+            formats = { "mkv" }
+        }
+    }
+}
-- 
2.16.2



More information about the ffmpeg-devel mailing list