From patchwork Mon May 28 18:18:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Holljes X-Patchwork-Id: 9135 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp2231811jad; Mon, 28 May 2018 11:28:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI3BlRckxuLiAt+wF+Rh54uf6v1uNU9b+8FYODvYPrVMFI7V41KDZIQ1GjQwGxDweEStE3L X-Received: by 2002:a1c:a906:: with SMTP id s6-v6mr8505726wme.116.1527532121087; Mon, 28 May 2018 11:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527532121; cv=none; d=google.com; s=arc-20160816; b=zlDjMxs4YoR1nvtzUFnPrxSBMR4LO2z2Bm5nagP0z0sRePKpW51uKbzXdApbp2fnRc YIfEwFcPlThql59a5npeTXUfRfnWa8bWyeFQhwvpH115QKLmQwMegbGFracjiwP9Ve02 9+gzqSiMqC81W3iMVLT1v1Wh3KdXV/uBuBhjhUzKWI7uPp+CEY2LssQWGZqkHDbUlPuD DRzfKkAxBdg2B07QHuXSGyfpgQMgvxOLWE4U11iySkolGhMi7uquPfnh3oHSzbD4ei+G FtDOeHmwA0P/AUOyfrhQjT7V49ykOpFTmU03b+/AGTs1DlhGMXv7pmsEX2m1OLydAieO ZGEQ== 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=FjvISW+RvRC4Ly2jgCmx+sS9G0lxW61/77XkvHeu8Fvk+suYj27TuyN2i6CkaAlz0Z +XBCN3hNg1SLsRPy4153Pic2Dn6ftQ5nqTsrTG2W9rqJ/M0UzRF9OjyGFC09bgIRGPOF QEfRC90M6xIaIGRubjTrY+7vlnNiUjzb0YeOwEoQ9Tm7d621xpSMJ/JwXLpvPF4yhwhS v1fUQ4XxR5YcFBPagFigm58U2RtP24wQN5x8f3aBTVgAQITIqaZNUhk4rbANBO3Wb3Rx OcH2/lxuk0D6ngOdE4AxoqrcH+p+d3hrLSyS1TLA2GuFe13q+KFwy8OLt6BOAVX2k15+ EGzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=JfCdeZvb; 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 u7-v6si12714206wrc.112.2018.05.28.11.28.40; Mon, 28 May 2018 11:28:41 -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=JfCdeZvb; 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 694C968A40C; Mon, 28 May 2018 21:26:51 +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 E02DE68A3BC for ; Mon, 28 May 2018 21:26:47 +0300 (EEST) Received: by mail-wm0-f68.google.com with SMTP id a67-v6so34029497wmf.3 for ; Mon, 28 May 2018 11:27:31 -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=JfCdeZvbv0pR8m0cPaMoFP5CAD0yv1+7l0alPoaQFfmSfxvUE7dLEgcWNiJz0y9465 Z020d0BxDgPzCZlYqwm4FXArVTWHgChIGgAIF6L6SBw58P+fGhqlOKzUS+P+5vkt88Rj Jyy25hju2pH6cKDKWLdy3Ax7BeA4hZdQckCmFcwTTPxKvmGQriQDNmQS4B4iS3DE5SAU PGk0EI8wiUgkaeAlle6z35NW8g9+vQyRpYZU0qDd+9u/oSsG/f2LZYZywnEo7krCAgOc ozPsp/0AMCt54w24tfYlu2QngnxXTLY8js/TMf7gyUCEznhy1+6OtDA/DON9LfamLSid sw4w== 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=qeJ5uxvQPfM3odtrMK8IkjPT04dTaM6OEW5li0M0lUdFNiZkzuQOA/A0DMljFF77ng gMMrXAyTgryYelm6U5bV0fg/8STUSIJkxcgAfl1eDVGrL7p7iygdKtsKeF5my06iTJn/ Qok27uycxvkvRtU3SqGvnAwg4pXfmQBRGfaw5bTPm//RUd4RegVKt9PYMe3THDvhXRkA 7t5DAOjubqE6ezPn+WKsTFc1MO10VHCkjoXMa7zfZPZQ4H2qFVJpemuTkFrd5hZuncmu 1nOJkiI6FHtuZcc5NM7SCcxvpQzpL2Iwz9pQhF4me2Zpm9oyOqcZjn/MRfxGPMFWWaIt OsEQ== X-Gm-Message-State: ALKqPwdC5FdWPFPEv1xMifcKlCQEYiS1re699zdd/b2sg8rYdl1c8esC pXGwvMLdTiIc9IoAjaxZPWfOsw== X-Received: by 2002:a1c:f70b:: with SMTP id v11-v6mr8774845wmh.77.1527531575552; Mon, 28 May 2018 11:19:35 -0700 (PDT) Received: from localhost.localdomain ([46.5.2.0]) by smtp.gmail.com with ESMTPSA id p5-v6sm14649465wre.83.2018.05.28.11.19.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 11:19:34 -0700 (PDT) From: Stephan Holljes To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 May 2018 20:18:59 +0200 Message-Id: <20180528181859.12182-9-klaxa1337@googlemail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180528181859.12182-1-klaxa1337@googlemail.com> References: <20180520185404.29836-1-klaxa1337@googlemail.com> <20180528181859.12182-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" } + } + } +}