Message ID | 20190718225511.71099-1-ffmpeg@tmm1.net |
---|---|
State | New |
Headers | show |
On 7/19/19, Aman Gupta <ffmpeg@tmm1.net> wrote: > From: Aman Gupta <aman@tmm1.net> > > When using `ffprobe -show_format -show_streams -show_packets`, > it makes more sense to omit static data about the file format > and streams before the long list of packets instead of at the > end. > > Signed-off-by: Aman Gupta <aman@tmm1.net> > --- > fftools/ffprobe.c | 38 ++++++++++++++++++++------------------ > 1 file changed, 20 insertions(+), 18 deletions(-) > Sure this does not need FATE update? > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 5aaddb0308..c9c10b143d 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -3003,6 +3003,26 @@ static int probe_file(WriterContext *wctx, const char > *filename) > ifile.fmt_ctx->streams[i]->discard = AVDISCARD_ALL; > } > > + if (do_show_format) { > + ret = show_format(wctx, &ifile); > + CHECK_END; > + } > + > + if (do_show_streams) { > + ret = show_streams(wctx, &ifile); > + CHECK_END; > + } > + > + if (do_show_programs) { > + ret = show_programs(wctx, &ifile); > + CHECK_END; > + } > + > + if (do_show_chapters) { > + ret = show_chapters(wctx, &ifile); > + CHECK_END; > + } > + > if (do_read_frames || do_read_packets) { > if (do_show_frames && do_show_packets && > wctx->writer->flags & > WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER) > @@ -3019,24 +3039,6 @@ static int probe_file(WriterContext *wctx, const char > *filename) > CHECK_END; > } > > - if (do_show_programs) { > - ret = show_programs(wctx, &ifile); > - CHECK_END; > - } > - > - if (do_show_streams) { > - ret = show_streams(wctx, &ifile); > - CHECK_END; > - } > - if (do_show_chapters) { > - ret = show_chapters(wctx, &ifile); > - CHECK_END; > - } > - if (do_show_format) { > - ret = show_format(wctx, &ifile); > - CHECK_END; > - } > - > end: > if (ifile.fmt_ctx) > close_input_file(&ifile); > -- > 2.20.1 > > _______________________________________________ > 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".
Aman Gupta (12019-07-18): > From: Aman Gupta <aman@tmm1.net> > > When using `ffprobe -show_format -show_streams -show_packets`, > it makes more sense to omit static data about the file format > and streams before the long list of packets instead of at the > end. > > Signed-off-by: Aman Gupta <aman@tmm1.net> > --- > fftools/ffprobe.c | 38 ++++++++++++++++++++------------------ > 1 file changed, 20 insertions(+), 18 deletions(-) Been there, tried that: it will miss all streams that appear late, like subtitles in MPEG-PS. It needs to be an option. Regards,
On Thu, Jul 18, 2019 at 03:55:11PM -0700, Aman Gupta wrote: > From: Aman Gupta <aman@tmm1.net> > > When using `ffprobe -show_format -show_streams -show_packets`, > it makes more sense to omit static data about the file format > and streams before the long list of packets instead of at the > end. > > Signed-off-by: Aman Gupta <aman@tmm1.net> > --- > fftools/ffprobe.c | 38 ++++++++++++++++++++------------------ > 1 file changed, 20 insertions(+), 18 deletions(-) breaks fate-ffprobe_compact [...]
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 5aaddb0308..c9c10b143d 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3003,6 +3003,26 @@ static int probe_file(WriterContext *wctx, const char *filename) ifile.fmt_ctx->streams[i]->discard = AVDISCARD_ALL; } + if (do_show_format) { + ret = show_format(wctx, &ifile); + CHECK_END; + } + + if (do_show_streams) { + ret = show_streams(wctx, &ifile); + CHECK_END; + } + + if (do_show_programs) { + ret = show_programs(wctx, &ifile); + CHECK_END; + } + + if (do_show_chapters) { + ret = show_chapters(wctx, &ifile); + CHECK_END; + } + if (do_read_frames || do_read_packets) { if (do_show_frames && do_show_packets && wctx->writer->flags & WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER) @@ -3019,24 +3039,6 @@ static int probe_file(WriterContext *wctx, const char *filename) CHECK_END; } - if (do_show_programs) { - ret = show_programs(wctx, &ifile); - CHECK_END; - } - - if (do_show_streams) { - ret = show_streams(wctx, &ifile); - CHECK_END; - } - if (do_show_chapters) { - ret = show_chapters(wctx, &ifile); - CHECK_END; - } - if (do_show_format) { - ret = show_format(wctx, &ifile); - CHECK_END; - } - end: if (ifile.fmt_ctx) close_input_file(&ifile);