From patchwork Sun May 20 18:54:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Holljes X-Patchwork-Id: 9028 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp7569995jad; Sun, 20 May 2018 12:01:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoKUTtiGiE8z8tfzOgAZQFvTzKaLxFpvHsuby3xhVOkw2rtvq7AUEID601xyehcMA+U/VQ0 X-Received: by 2002:adf:bc0f:: with SMTP id s15-v6mr13775456wrg.58.1526842881639; Sun, 20 May 2018 12:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526842881; cv=none; d=google.com; s=arc-20160816; b=hClwNdPxEXvIzRFOoisqYkDxBo4VBudV/MQJ3n+b8BJ05qCo/0QGioKZyiNHKTTvZR 1cBcDpwmWcEx9g2BjD7NlzomOaUytBedQ1C8nA73iie6e44Ey7xWFo5t+TOnWj6U8ypP 8pe/4g7LfZs2VCr78QRTGMazhEzduxsG1e6f0OSGqDRQ4BEmuO5b0zySFuo1NYP27HOh eqoj+TrRApDk76vWJp0OruYXqBPcBQ8Wu16J/+voBr4Ny5c1cpizn1T/VgXEEIpyWjmz cM5umg5+pPqSOT9B40OI7IibZT3d0N9vex6XdK4Hza1ctBFqf+eurkdIqHekQObWu7yo fbCw== 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=EjzSC1+yb6JYHDN9t8bw+snBm/DusKHy9P+r5lUtAouhNv7SGFwCjfx1iAs+LuEOnB gIeXPzttnUQTrauRDJYjQ5/7b8x58aj0NwxytXeq0QaiVnXKE/gOiLbCuqua5ZkKz8AB dAthgR3urdfAUQLtViZ9HCGzlZ26pL768e00xwsUuabBgdGrmkidIkR3B6sCMhodYC13 aP9hTUcLGJEaAWs82Vg2tpCeIP74wne7OGugJCopK5pbjqOfpSdStu9A4AshCr8IsCQf QeMTp4NVGwnbwIyyD4RvUGV1b0lw8DZD2wnW453rRU4hPaS20kEhSRBDIbjTNkprKMUt /i9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=K/5UDLmA; 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 n68-v6si11059811wrb.262.2018.05.20.12.01.21; Sun, 20 May 2018 12:01:21 -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=K/5UDLmA; 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 9952368A538; Sun, 20 May 2018 22:00:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2E1C368A536 for ; Sun, 20 May 2018 22:00:33 +0300 (EEST) Received: by mail-wr0-f196.google.com with SMTP id v60-v6so13880170wrc.7 for ; Sun, 20 May 2018 12:01:13 -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=K/5UDLmA2+Y7jzt6NJUiSvZHTcF2KmPvAHIRZaTbVR+az8cUh84v9ycG02oAWwx95x 6Ifft7ea6OBACn/Zwe10xx2088nGxrQR3sYushRh/3ufbTa3/v0Na4LhHBYeP2vQeXLc Pmbfz4V/L1+JKDKk8oWk6k8h6xR4WkBTVhyHutDS00oPwCqcp8pkMN781abKGDjAr4nu kTXEH1bnNLbg5wp+5GQNrRA63wlDhaDKmEccX3iWK0ekHOBC4awwOacwPbRdYiKp3nl0 +qoqZeAqc4j5CrZAd54MtZgS4DZiWGJ8cikOEjNZJQcoRqDNFaZMkcJOBk79qAkAmqCI ONuQ== 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=XmtdlGT4upV+vj7SA7vrdklEeE/YBaiYEAwKKNN9BTNjNyhl5wqpgsoORF5wXyt6hi bIAALnFRZ59ndBwQm/tom68VAWnoYjz/152DTyLXAyB/4o4VpPn8xEDboankNhT0uAhO Fc/jtrg9/9pzIkYW0oTtRbc8eW4mviZrdYZhm4D473Ljj1UPnvzsCxp8KV6SpDRjcC9F jfKomUPkoCWufXAgsnFMHdxPtMl43kKoC+eoFsyUtj+k8S9TtJtJ92a4g/PdYXBC39E2 i1IjHpzANCDjjMstb5PvIBTEX6IlsCnkqUs9uizxNZMGM7CJtsPK+S+ERVOCXvgHbncT Y0VA== X-Gm-Message-State: ALKqPwf7LB+Dr8poMCA9JR/c1GJT/oZ5QNQT/W18Qa5IUofASUJrcj3G GnbvlFh2kb8I728dfyN/mvmLUQ== X-Received: by 2002:adf:abc6:: with SMTP id s64-v6mr13414196wrc.66.1526842461178; Sun, 20 May 2018 11:54:21 -0700 (PDT) Received: from localhost.localdomain ([46.5.2.0]) by smtp.gmail.com with ESMTPSA id u8-v6sm3755918wmc.40.2018.05.20.11.54.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 11:54:20 -0700 (PDT) From: Stephan Holljes To: ffmpeg-devel@ffmpeg.org Date: Sun, 20 May 2018 20:54:04 +0200 Message-Id: <20180520185404.29836-9-klaxa1337@googlemail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180520185404.29836-1-klaxa1337@googlemail.com> References: <20180520185404.29836-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" } + } + } +}