> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of
> Marton Balint
> Sent: Freitag, 13. Juni 2025 22:45
> To: FFmpeg development discussions and patches <ffmpeg-
> de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 03/10] avformat/segment: Log
> more detailed information about written segments
> 
> 
> 
> On Fri, 13 Jun 2025, softworkz wrote:
> 
> > From: softworkz <softwo...@hotmail.com>
> >
> > 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 <softwo...@hotmail.com>
> > ---
> > 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.

The line does belong there. The field it sets (offset_pts) is used 
for logging only.

(it had been unused for years and exactly the name that was needed,
a really funny coincidence)

But I'm withdrawing this one anyway.

Thanks a lot,
sw




_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to