From patchwork Thu May 31 22:20:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Holljes X-Patchwork-Id: 9207 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp163461jad; Thu, 31 May 2018 15:27:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ+rBcTJk8RCCYTOx6d6s4spC3/7XHLESU6Lld8KuoPmDkgspxgubciei5NyhS+4IY5lW1P X-Received: by 2002:a1c:eecd:: with SMTP id j74-v6mr1059923wmi.137.1527805672184; Thu, 31 May 2018 15:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527805672; cv=none; d=google.com; s=arc-20160816; b=BydpJtNI+8WyT+riIBZolOwGMv+2D2caiPvc+V7QenrS0pma8ytAsGWiCKAuLJloK0 9vjrWRALh/4H59Qc5nuGXiyL5v2GGYORD24+9HxlpGKs2qK56uY48FACy1V0dtP1J9qi bwQ6EKMx9pVtOvT2PMBRiWaUOWYb/GtGgKfos3cZN+2fl8en+cFULacOHH6snS3yXZrw v8KVg+76PDHIxAcwc3acfdwLtavUf87Co3zWfM/+qpjSr4xPwJ6JDtrZ2kz27QPv7294 Ol7I1UpXSkMJ28NVnFA8zD9+Uixnskm/9cEqKeuY6RsxJ81YBgB0NnXTtaWjE7JYWZFN chYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=/3737bJleI6zvv+JKj7++ni1NAGlld74dA9XJfpgtbE=; b=l3WYcYYKu2/LdgcO6mUwBt4qZyPtFSr/cm5Z3JyxhwwxKGb6+tXZkEGTiOhOgZ90ns HqEiimT3tgc5dPsaMPhgV1EolQfY8OmFmztmmTJc3RigZ70VXqkUfX3NcYEhNw8SegL4 mMCcn9xaLi2ewwILOc7bnXB6QJPfXpyVgbZ4TO+QGxrOndw5a9L4PZAHSq6jdoJAFjsF ltwiS56myvb1U8uj3cl498HpuzA//0Gqg8tOIz+ZJj0NmaYbqeaYmgUsgKx5JVUYsxlz GnOEagVCndobePt+rH4YDUK+grX0a1rGt8m+vpysCXxiECGiKjjcArzMbNFN0HYfBdWQ nunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=eyEkl1JH; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p6-v6si25964373wrd.297.2018.05.31.15.27.51; Thu, 31 May 2018 15:27:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=eyEkl1JH; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3D2268A541; Fri, 1 Jun 2018 01:26:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8DA168A3E2 for ; Fri, 1 Jun 2018 01:26:01 +0300 (EEST) Received: by mail-wm0-f68.google.com with SMTP id t11-v6so56703532wmt.0 for ; Thu, 31 May 2018 15:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+wKfA+BzUfobJr42Mf74QX8T1+Q34IvXwTFYcHMrFIY=; b=eyEkl1JHOxARCQ/ZX/DYmHT2Bj+S558PmzMJHAgpDtKP7YmLQ39UydEzvbdEHdAllf VReLhKO6xQOhbEGCzkbpe2elGyqjJrDFyNcGc7kqvgsuRSwA86y9tJ6eVFn9l4ap9Kb3 v6ZomPAbnt10xxGUvl9+h4muecIV/Dc5k6rkcY7Z3sFLmoeepmKJUOkkf6HMxwDvos5X wXIiipxPZE3XcmVfOBQs5HeVEvshx5OqKAfkHNR8Yp0C3uayLvP6ujHEAKaJdlZGtcDG JkY//2XV0Kt0LNgQKvKR0eYLtqd/UBkQHRNqLmRbfXwpg+m+awiVnYI0kzRHccUR1P9q c1eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+wKfA+BzUfobJr42Mf74QX8T1+Q34IvXwTFYcHMrFIY=; b=GE8FutIs7HkxSe7BmDtZSLlnmHuMqGe9++libgccMU64LJ9Q+vOcFtb7iPr9OmDdwh Ue75Uog4qgvHh/ghnbv0p6DRRCppZl1oALcI2YI2JBGa/gSR6Q/fMZepqn0bOVCwYn/n diaQYV9CvmCSS9v9Res3xZJ2j66dxDAuvZexsGOTie7dsJ5HEU+LhFItPn6HfGyZx2ro oBsIOnSdtk3XnbqY9Mv3R6GoAOG17WS2Tz2WssIOIlU1pyqAARAXVdRzJ/I/+8nsqpSG 0rHgAhtjtmzYSVlOwUjZQ59DhACAs7sFh6cPd1Irh5NjF+3lZhXHt5nhO67gdxaYbKiO Oa0w== X-Gm-Message-State: ALKqPweTqz0wnii1hfZH2Gr56P861sJv51st5aH3lxxoCgyUlba7CWzj ZaIArPRa+jOQTfBBJspxhur6nQ== X-Received: by 2002:a1c:c86:: with SMTP id 128-v6mr930312wmm.18.1527805252008; Thu, 31 May 2018 15:20:52 -0700 (PDT) Received: from localhost.localdomain ([46.5.2.0]) by smtp.gmail.com with ESMTPSA id 72-v6sm38288429wrb.22.2018.05.31.15.20.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 15:20:51 -0700 (PDT) From: Stephan Holljes To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Jun 2018 00:20:32 +0200 Message-Id: <20180531222032.30111-9-klaxa1337@googlemail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180531222032.30111-1-klaxa1337@googlemail.com> References: <20180528181859.12182-1-klaxa1337@googlemail.com> <20180531222032.30111-1-klaxa1337@googlemail.com> Subject: [FFmpeg-devel] [PATCH 8/8] doc: Update Documentation.txt and add sample config as supplement X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Stephan Holljes MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Stephan Holljes --- 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://: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" } + } + } +}