[FFmpeg-devel] [PATCH] ffprobe: show chapter and chapter metadata information

Stefano Sabatini stefasab at gmail.com
Thu Jun 6 15:57:32 CEST 2013


On date Thursday 2013-06-06 13:21:16 +0000, Paul B Mahol encoded:
> On 6/6/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> > On date Thursday 2013-06-06 11:23:13 +0200, Stefano Sabatini encoded:
> >> Address trac ticket #2636.
> >> ---
> >>  doc/ffprobe.xsd |   18 ++++++++++++++++++
> >>  ffprobe.c       |   29 +++++++++++++++++++++++++++--
> >>  2 files changed, 45 insertions(+), 2 deletions(-)
> >>      writer_print_section_footer(w);
> > [...]
> >> @@ -1770,6 +1776,24 @@ static void show_format(WriterContext *w,
> >> AVFormatContext *fmt_ctx)
> >>      else           print_str_opt("size", "N/A");
> >>      if (fmt_ctx->bit_rate > 0) print_val    ("bit_rate",
> >> fmt_ctx->bit_rate, unit_bit_per_second_str);
> >>      else                       print_str_opt("bit_rate", "N/A");
> >> +
> >> +    if (do_show_chapters) {
> >> +        int i;
> >> +
> >> +        writer_print_section_header(w, SECTION_ID_CHAPTERS);
> >> +        for (i = 0; i < fmt_ctx->nb_chapters; i++) {
> >> +            AVChapter *chapter = fmt_ctx->chapters[i];
> >> +
> >> +            writer_print_section_header(w, SECTION_ID_CHAPTER);
> >> +            print_int("id", chapter->id);
> >
> >> +            print_q  ("time_base", chapter->time_base, '/');
> >> +            print_int("start", chapter->start);
> >> +            print_int("end", chapter->end);
> >
> > Should I print start/end_time instead? Or write both fields?
> 
> Both, like in other cases.

Updated with a few differences, now chapters is not nested into the
format section.
-- 
FFmpeg = Friendly and Free Multimedia Picky Explosive Guide
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffprobe-show-chapter-and-chapter-metadata-informatio.patch
Type: text/x-diff
Size: 8236 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130606/a3bf8559/attachment.bin>


More information about the ffmpeg-devel mailing list