* Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/dump: Print stream start offsets for input streams [not found] <20250419150541.A8EF7411BF6@natalya.videolan.org> @ 2025-04-20 11:24 ` Gyan Doshi 2025-04-20 20:07 ` softworkz . 0 siblings, 1 reply; 2+ messages in thread From: Gyan Doshi @ 2025-04-20 11:24 UTC (permalink / raw) To: ffmpeg-devel On 2025-04-19 08:35 pm, softworkz wrote: > ffmpeg | branch: master | softworkz <softworkz@hotmail.com> | Sat Feb 23 04:59:10 2019 +0100| [02d7384ed5eec0152056c081b536c16cb86e6361] | committer: softworkz > > avformat/dump: Print stream start offsets for input streams > > Seeing the offset of video and audio streams to each other is often > a useful metric in diagnosing and understanding issues with playback > or transcoding. > This commit adds those offsets to the stream info print. > > Signed-off-by: softworkz <softworkz@hotmail.com> > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02d7384ed5eec0152056c081b536c16cb86e6361 > --- > > libavformat/dump.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavformat/dump.c b/libavformat/dump.c > index 3d37623a41..8c7db7b275 100644 > --- a/libavformat/dump.c > +++ b/libavformat/dump.c > @@ -678,6 +678,11 @@ FF_ENABLE_DEPRECATION_WARNINGS > print_fps(1 / av_q2d(st->time_base), "tbn", log_level); > } > > + if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) { > + const double stream_start = av_q2d(st->time_base) * st->start_time; > + av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start); This should use the same precision as the other timestamp printouts, to avoid subtle inaccuracies. For a single-stream MPEG-TS , ffmpeg prints "start: 1.466667" for the format and "Start-Time 1.467s" for the stream. Regards, Gyan > + } > + > dump_disposition(st->disposition, log_level); > av_log(NULL, log_level, "\n"); > > > _______________________________________________ > ffmpeg-cvslog mailing list > ffmpeg-cvslog@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog > > To unsubscribe, visit link above, or email > ffmpeg-cvslog-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". ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/dump: Print stream start offsets for input streams 2025-04-20 11:24 ` [FFmpeg-devel] [FFmpeg-cvslog] avformat/dump: Print stream start offsets for input streams Gyan Doshi @ 2025-04-20 20:07 ` softworkz . 0 siblings, 0 replies; 2+ messages in thread From: softworkz . @ 2025-04-20 20:07 UTC (permalink / raw) To: FFmpeg development discussions and patches > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Gyan > Doshi > Sent: Sonntag, 20. April 2025 13:25 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/dump: Print > stream start offsets for input streams > > > > On 2025-04-19 08:35 pm, softworkz wrote: > > ffmpeg | branch: master | softworkz <softworkz@hotmail.com> | Sat > Feb 23 04:59:10 2019 +0100| [02d7384ed5eec0152056c081b536c16cb86e6361] > | committer: softworkz > > > > avformat/dump: Print stream start offsets for input streams > > > > Seeing the offset of video and audio streams to each other is often > > a useful metric in diagnosing and understanding issues with playback > > or transcoding. > > This commit adds those offsets to the stream info print. > > > > Signed-off-by: softworkz <softworkz@hotmail.com> > > > >> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02d7384ed5ee > c0152056c081b536c16cb86e6361 > > --- > > > > libavformat/dump.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/libavformat/dump.c b/libavformat/dump.c > > index 3d37623a41..8c7db7b275 100644 > > --- a/libavformat/dump.c > > +++ b/libavformat/dump.c > > @@ -678,6 +678,11 @@ FF_ENABLE_DEPRECATION_WARNINGS > > print_fps(1 / av_q2d(st->time_base), "tbn", > log_level); > > } > > > > + if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && > st->time_base.den && st->time_base.num) { > > + const double stream_start = av_q2d(st->time_base) * st- > >start_time; > > + av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", > stream_start); > > This should use the same precision as the other timestamp printouts, > to > avoid subtle inaccuracies. > For a single-stream MPEG-TS , ffmpeg prints "start: 1.466667" for the > format and "Start-Time 1.467s" for the stream. > > Regards, > Gyan > Yup, that makes sense. New patch coming. Thank you, 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-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-20 20:07 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20250419150541.A8EF7411BF6@natalya.videolan.org> 2025-04-20 11:24 ` [FFmpeg-devel] [FFmpeg-cvslog] avformat/dump: Print stream start offsets for input streams Gyan Doshi 2025-04-20 20:07 ` softworkz .
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git