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 B4141498F3 for ; Thu, 22 Feb 2024 09:16:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D373468D1FD; Thu, 22 Feb 2024 11:16:16 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 961CA68CA05 for ; Thu, 22 Feb 2024 11:16:10 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 3D512EA00C for ; Thu, 22 Feb 2024 10:16:10 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QtSGnCuMRkzZ for ; Thu, 22 Feb 2024 10:16:07 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id B38CCEA00B for ; Thu, 22 Feb 2024 10:16:07 +0100 (CET) Date: Thu, 22 Feb 2024 10:16:07 +0100 (CET) From: Marton Balint To: Allan Cady via ffmpeg-devel In-Reply-To: <1143270169.3066257.1708564887911@mail.yahoo.com> Message-ID: <0430c2a6-2e6a-ec15-24b3-409c55055dd5@passwd.hu> References: <20240221073915.26055-1-allancady.ref@yahoo.com> <20240221073915.26055-1-allancady@yahoo.com> <1143270169.3066257.1708564887911@mail.yahoo.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] libavutil/timestamp.h: Fix loss of precision in timestamps for silencedetect on long files 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 22 Feb 2024, Allan Cady via ffmpeg-devel wrote: > I had a similar thought, as all timestamps would have the same issue. > > This is my first contribution here, and I don't know the code very well, > so I was being cautious. I'm open to expanding the scope, but I'm sure I > would need some help doing it right and not breaking things. > > For starters, I'm curious why there are two functions & macros: > > av_ts2str/av_ts_make_string (which used "%" format specifier) That takes a 64-bit integer timestamp and is actually using "%"PRId64 because that is the correct (portable) format string for an int64_t variable. > av_ts2timestr/av_ts_make_time_string (which used "%6g") That takes an integer timestamp and a rational time base. Float timestamps (in seconds) is calculated by multiplying the two, that is what is printed. > > Do you know the rationale for that? I see that only av_ts2timestr is used in silencedetect.c. > > And are you suggesting we should fold those two functions into one? No, they have different purpose. The first prints out a timestamps which can be in any time base. The second prints out a timestamp in seconds. > > I did notice something in the output from silencedetect. After I made my > change, I see the output is now: > > > frame:92404 pts:53224175 pts_time:2413.79 > lavfi.silence_start=2411.120272 > frame:92411 pts:53228207 pts_time:2413.98 > lavfi.silence_end=2413.992744 > lavfi.silence_duration=2.872472 > > > I see that the pts_time values still have the original formatting. I > don't know what pts_time is, or where those lines are coming from. Seems > like maybe those should have fixed precision as well. Well, that is likely using the same function, but you only fixed silencedetect, right? > > Guidance for a noob please? Thanks. > > (P.S. Can you tell me, when I reply to the list (as opposed to patch > submission using git send-email), how should I address the email? > Obviously it should go to ffmpeg-devel@ffmpeg.org, but should I include > you as a recipient, or as a cc:, or only to the list? or is there some > other way it gets directed to you? Any other guidance on how to format > email? Thanks.) I don't think there is a rule, I have seen it happen both with or without CC. You don't need to CC me though, as I am a regular on the list, but others may have other preference. Regards, Marton PS: Please avoid top positing in you replies. _______________________________________________ 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".