From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id A31174EF14 for ; Fri, 13 Jun 2025 20:47:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 8BF1568CB49; Fri, 13 Jun 2025 23:47:55 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E9F2F68C4E4 for ; Fri, 13 Jun 2025 23:47:48 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id A03C5EBDD9 for ; Fri, 13 Jun 2025 22:44:52 +0200 (CEST) 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 ZnNn6n3cr-jz for ; Fri, 13 Jun 2025 22:44:49 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id D1C3BEBDBA for ; Fri, 13 Jun 2025 22:44:49 +0200 (CEST) Date: Fri, 13 Jun 2025 22:44:49 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <6a76e43900f1ac469a138bc2f5163a46d4a1dfb5.1749794067.git.ffmpegagent@gmail.com> Message-ID: <93a5c9ec-aade-0c81-7177-d0e2ac17314c@passwd.hu> References: <6a76e43900f1ac469a138bc2f5163a46d4a1dfb5.1749794067.git.ffmpegagent@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 03/10] avformat/segment: Log more detailed information about written segments 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 Fri, 13 Jun 2025, softworkz wrote: > From: softworkz > > Also moves point of log writing to after rename of temp files > and changes log level to INFO. The completion of a segment is > important enough to justify logging at INFO level. > > Signed-off-by: softworkz > --- > libavformat/segment.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/libavformat/segment.c b/libavformat/segment.c > index 04e973a198..608cad0ba4 100644 > --- a/libavformat/segment.c > +++ b/libavformat/segment.c > @@ -417,8 +417,6 @@ static int segment_end(AVFormatContext *s, int write_trailer, int is_last) > } > } > > - av_log(s, AV_LOG_VERBOSE, "segment:'%s' count:%d ended\n", > - seg->avf->url, seg->segment_count); > seg->segment_count++; > > if (seg->increment_tc) { > @@ -471,6 +469,12 @@ static int segment_end(AVFormatContext *s, int write_trailer, int is_last) > av_free(final_filename); > } > > + av_log(s, AV_LOG_INFO, "SegmentComplete=%s:%d Index=%d Start=%f End=%f Duration=%f offset_pts=%s start_pts=%s Frames=%d filename=%s\n", > + av_get_media_type_string(s->streams[seg->reference_stream_index]->codecpar->codec_type), > + seg->reference_stream_index, seg->segment_idx, seg->cur_entry.start_time, seg->cur_entry.end_time, > + seg->cur_entry.end_time - seg->cur_entry.start_time, av_ts2str(seg->cur_entry.offset_pts), av_ts2str(seg->cur_entry.start_pts), > + seg->segment_frame_count, seg->cur_entry.filename); No CamelCase please, follow snake_case as the other similar messages. And yes, VERBOSE is the proper loglevel for this. > + > return ret; > > fail: > @@ -994,6 +998,8 @@ calc_times: > if (pkt->dts != AV_NOPTS_VALUE) > pkt->dts += offset; > > + seg->cur_entry.offset_pts = av_rescale_q(offset, st->time_base, AV_TIME_BASE_Q); > + This line does not belong to this patch, or the patch description is incomplete. Thanks, Marton > av_log(s, AV_LOG_DEBUG, " -> pts:%s pts_time:%s dts:%s dts_time:%s\n", > av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base), > av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base)); > -- > ffmpeg-codebot > > _______________________________________________ > 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". > _______________________________________________ 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".