From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AE7F445953 for ; Fri, 28 Apr 2023 08:01:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 61EB168BF71; Fri, 28 Apr 2023 11:01:33 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D9FAE68BF69 for ; Fri, 28 Apr 2023 11:01:26 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 514942404EE for ; Fri, 28 Apr 2023 10:01:26 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id c5BLdu2CILqT for ; Fri, 28 Apr 2023 10:01:25 +0200 (CEST) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 949512404EC for ; Fri, 28 Apr 2023 10:01:25 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 761E41601B2; Fri, 28 Apr 2023 10:01:25 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <98e50dd9-c85e-3f18-654c-228ea6cb8113@davyandbeth.com> References: <98e50dd9-c85e-3f18-654c-228ea6cb8113@davyandbeth.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Fri, 28 Apr 2023 10:01:25 +0200 Message-ID: <168266888545.3843.830158000112531029@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: Added ability to set a input burst time before readrate is enforced X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Your email client mangled the patch, so it cannot be applied as is. Quoting Davy Durham (2023-04-07 09:57:54) > Implemented is the -irb flag (i.e. "initial read burst") that > causes ffmpeg to read the specified number of seconds of input before a > given readrate starts to be enforced. All inputs have to reach this > point before the readrate is enforced. The reason for this change is, > in the scenario of live-streaming by transcoding from an pre-recorded or > delayed source to an HLS or DASH webroot, we can more quickly prime the > system of the first few seconds before the real-world read rate is > imposed. Else, one must wait for an entire segment length before the > data can be fetched from the web server. > > Signed-off-by: Davy Durham > --- > doc/ffmpeg.texi | 2 ++ > fftools/ffmpeg.h | 2 ++ > fftools/ffmpeg_demux.c | 13 ++++++++++++- > fftools/ffmpeg_opt.c | 3 +++ > 4 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > index d433d60ce9..a519fea192 100644 > --- a/doc/ffmpeg.texi > +++ b/doc/ffmpeg.texi > @@ -1709,6 +1709,8 @@ it may cause packet loss. > It is useful for when flow speed of output packets is important, such > as live streaming. > @item -re (@emph{input}) > Read input at native frame rate. This is equivalent to setting > @code{-readrate 1}. > +@item -irb @var{seconds} I think 'irb' is too short for an option that modifies behavior of another, rather obscure, option. How about -readrate_burst or -readrate_delay or something along these lines? > @@ -1159,6 +1160,16 @@ int ifile_open(const OptionsContext *o, const > char *filename) > f->rate_emu = 0; > } > + f->initial_read_burst = o->initial_read_burst ? > o->initial_read_burst : 0.0; > + if (f->initial_read_burst < 0.0) { > + av_log(NULL, AV_LOG_ERROR, "Option -irb for Input #%d is %0.3f; Use f as the log context, then you can drop the input file number in the string itself. Same below. Otherwise seems reasonable. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".