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 2282D41101 for ; Sat, 11 Feb 2023 16:28:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 19F3568BD13; Sat, 11 Feb 2023 18:28:21 +0200 (EET) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C52568B5DA for ; Sat, 11 Feb 2023 18:28:14 +0200 (EET) Received: by mail-ej1-f45.google.com with SMTP id ud5so22699050ejc.4 for ; Sat, 11 Feb 2023 08:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=Jck981FztqJ5eJTk+S1l7LmfglMiT09u6irJdchGMKk=; b=bmLhFD8y4nUJtYDOHoA/U0wXGA+0ma3wvhsvk5wjZCjcqhPJlhQxtEfo2YJm13T/rr l1wdij1ktOVVC4/kHaG+YyRr9fiZp5+VxJR7DVjesTZoXpehT1fvFZUQJah8dpuDYJJN RrIYa3BJ8NKXg7w7lMQE78ARrrgCj/FFdaJAhOi6QZ/WAujByPtLua1z7/VEzvZ/QZnw Qy82xupOWINdIeYQmLZpDnp3A2ry30Z+UG7uP3UdmtLwjLiYo8ezHfYxjXNQgv/sEDkS AZf2L8PcPn/iqTZ2pM5xw0Uqqgdg6wz3ZkRGfLpN+b0SRYfMZD3+wIsdEFaNBHHMP1XJ BpeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Jck981FztqJ5eJTk+S1l7LmfglMiT09u6irJdchGMKk=; b=Rxmk67+ulRjS407w2lPmCXNUp+kqWj0euqqnqZNluSVurI7bZUUMDoMBu10yT8fWD0 9i2oCl0okpMf8o3wDTdyGgyESvjEr1R12NI+moFq+315hvAQhgII2T46Pdfy/WI1Zfou 4MDQ77cx/YjjaIs1w8v+/CBxpWqntLtTlPyQNtO1kt6hqR+Ci5KCs/jZmT3Yef5qPLIp H3JxzcPDhhpOAiBsG28e4KpAdQsQFpnWfqbPKkMnQTrK93t7Z2rhh4OIO0ltb1Gd33wG dFoed1lnmom5yUX1tlt4ukjhpSqDgaKAMwkOjKqetZpCwqJv/wUyA0F2Ph/Lo/Io1Yde BkDg== X-Gm-Message-State: AO0yUKWKZGcoXoCQfA0pqoJ5C/5HiWpit8iDmR7ziLqAkURFNltrE/Zg vLXB6RziIzc3Iksco0mCSth662plM/sDaQ== X-Google-Smtp-Source: AK7set87WkiuSeT1/FLTNY+kMgbernGHeDveATnsIXEGzFdI0/k3uHE6AlsVReZsmSh5TO7W2iZXuw== X-Received: by 2002:a17:906:5a5e:b0:8ae:11ca:81de with SMTP id my30-20020a1709065a5e00b008ae11ca81demr12351245ejc.34.1676132893171; Sat, 11 Feb 2023 08:28:13 -0800 (PST) Received: from mariano (94-37-133-75.adsl-ull.clienti.tiscali.it. [94.37.133.75]) by smtp.gmail.com with ESMTPSA id hf27-20020a1709072c5b00b0088cdb05f1d5sm4055269ejc.113.2023.02.11.08.28.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 08:28:12 -0800 (PST) Received: by mariano (Postfix, from userid 1000) id 33F84BFB73; Sat, 11 Feb 2023 17:28:11 +0100 (CET) Date: Sat, 11 Feb 2023 17:28:11 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: <20230211162811.GA31279@mariano> Mail-Followup-To: FFmpeg development discussions and patches References: <20230125010744.255455-1-stefasab@gmail.com> <29fe7152-55a9-8354-b018-60d4ac6e8681@gyani.pro> <20230206012523.GA338325@mariano> <20230208234118.GU1949656@pb2> <20230211023000.GE338325@mariano> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <20230211023000.GE338325@mariano> User-Agent: Mutt/1.13.2 (2019-12-18) Subject: Re: [FFmpeg-devel] [PATCH] doc/ffmpeg: extend -dts_delta_threshold option description 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On date Saturday 2023-02-11 03:30:00 +0100, Stefano Sabatini wrote: > On date Thursday 2023-02-09 00:41:18 +0100, Michael Niedermayer wrote: > > On Mon, Feb 06, 2023 at 02:25:23AM +0100, Stefano Sabatini wrote: > [...] > > > Subject: [PATCH 2/2] ffmpeg: review -dts_delta_threshold and -dts_delta_error > > > options > > > > > > Review handling of -dts_delta_threshold and -dts_delta_error options, > > > specify them as floating point expressed in seconds. > > > > > > Also, review and simplify logic. Adjust values for tests, since in > > > some cases the new values does not trigger the correction logic. > > > > > > PR: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=8252 > > > --- > > > doc/ffmpeg.texi | 36 ++++++++++++++++--- > > > fftools/ffmpeg.c | 72 ++++++++++++++++++++----------------- > > > fftools/ffmpeg.h | 2 ++ > > > fftools/ffmpeg_demux.c | 3 ++ > > > tests/fate/filter-audio.mak | 2 +- > > > tests/fate/mpeg4.mak | 2 +- > > > 6 files changed, 77 insertions(+), 40 deletions(-) > > > > This seems to break a case with concat and vsync > > ./ffmpeg -y -i 'concat:///home/michael/videos/angels.mpg|/home/michael/videos/angels.mpg' -vsync 0 -an file.avi > > > > ... > > cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A > > [mpeg4 @ 0x55e051b8d4c0] Invalid pts (0) <= last (11)00.00 bitrate=N/A speed= 0x > > [vost#0:0/mpeg4 @ 0x55e051b9d700] Error submitting video frame to the encoder > > Conversion failed! > > > > > > Ill mail you the angels.mpg, i think its online somewhere but i cant > > find it > > Fixed, now the code should be equivalent to the previous > implementation. > > What happened in this case (and apparently in the other fate tests > failing), is that some sort of limit correction is applied: > > detected dts:-0.041711 < dts_limit:0.358789 > ts delta 0.5005 applied => ts_offset_discont:0.5005 dts:0.458789 > > preventing the invalid pts error. > > The limit correction, hardcoded in the ffmpeg.c code, is completely > unrelated to the dts_delta_threshold value, no idea if it would make > sense to make this parametric (but at least now it should be a bit > more clear from the code/logs). Moving the refactoring changes to a dedicated thread. Updating the doc extensions. --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-doc-ffmpeg-extend-documentation-for-dts_delta_thresh.patch" >From f7df77c9d488fa0f470eba064cdcce915c519ca3 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 11 Feb 2023 17:18:39 +0100 Subject: [PATCH 3/3] doc/ffmpeg: extend documentation for -dts_delta_threshold and -dts_error_threshold PR: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=8252 --- doc/ffmpeg.texi | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index d9d4b75567..63be7951e6 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1837,12 +1837,38 @@ results, but increase memory use and latency. The default value is 10 seconds. -@item -dts_delta_threshold -Timestamp discontinuity delta threshold. +@item -dts_delta_threshold @var{threshold} +Timestamp discontinuity delta threshold, expressed as a floating point +number of seconds. + +The timestamp discontinuity correction enabled by this option is only +applied to input formats accepting timestamp discontinuity (for which +the @code{AV_FMT_DISCONT} flag is enabled), e.g. MPEG-TS and HLS, and +is automatically disabled when employing the @code{-copy_ts} option +(unless wrapping is detected). + +If a timestamp discontinuity is detected whose absolute value is +greater than @var{threshold}, ffmpeg will remove the discontinuity by +decreasing/increasing the current DTS and PTS by the corresponding +delta value. + +The default value is 10. + @item -dts_error_threshold @var{seconds} -Timestamp error delta threshold. This threshold use to discard crazy/damaged -timestamps and the default is 30 hours which is arbitrarily picked and quite -conservative. +Timestamp error delta threshold, expressed as a floating point number +of seconds. + +The timestamp correction enabled by this option is only applied to +input formats not accepting timestamp discontinuity (for which the +@code{AV_FMT_DISCONT} flag is not enabled). + +If a timestamp discontinuity is detected whose absolute value is +greater than @var{threshold}, ffmpeg will drop the PTS/DTS timestamp +value. + +The default value is @code{3600*30} (30 hours), which is arbitrarily +picked and quite conservative. + @item -muxdelay @var{seconds} (@emph{output}) Set the maximum demux-decode delay. @item -muxpreload @var{seconds} (@emph{output}) -- 2.25.1 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --ikeVEW9yuYc//A+q--