[FFmpeg-devel] [PATCH] Add programs to ffprobe

Stefano Sabatini stefasab at gmail.com
Tue Jul 16 16:33:53 CEST 2013


On date Friday 2013-07-12 17:38:26 +0200, Florent Tribouilloy encoded:
> On 07/12/2013 04:36 PM, Stefano Sabatini wrote:
[...]
> >>Does the program will be printed without the stream information?
> >>Something like :
> >>
> >>programs:
> >>    program:1:
> >>         data program1
> >>         program1_stream_id1
> >>    end_program
> >>    program:2:
> >>         data program2
> >>         program2_stream_id2
> >>         program2_stream_id3
> >>    end_program
> >>programs
> >>streams:
> >>    stream:1:
> >>         data stream1
> >>    end_stream
> >>    stream:2:
> >>         data stream2
> >>    end_stream
> >>    stream:3:
> >>         data stream3
> >>    end_stream
> >>streams
> >
> >Looks fine, I'm assuming we have one stream per program, but I may
> >easily be wrong (I never dealt directly with "programs"), an example
> >of a file with programs would be helpful.
> http://xhq.me/m3u8/all.m3u8 (first found on Google with HLS programs)
> 
> >>?
> Question mark is here :)
> 
> >>Or directly print the streams section inside the program?
> >>programs:
> >>     program:1:
> >>         data program1
> >>         stream:1
> >>             data stream1
> >>         end_stream
> >>     end_program
> >>     program:2:
> >>         data program2
> >>         stream:2
> >>             data stream2
> >>         end_stream
> >>         stream:3
> >>             data stream3
> >>         end_stream
> >>     end_program
> >>programs
> >
> >I like this less, because this requires to print program information
> >in order to get stream data. But I think you want to print stream info
> >in the streams section as well, in this case you have duplication,
> >which is not necessarily bad since it would avoid a two-pass
> >processing in case you need to extract the stream information related
> >to a given program.
> The final goal was to print only the programs section with the
> stream inside when we use the option -show_programs and print only
> the streams section with the stream inside when we use the option
> -show_streams.
> (or both if we use all of them).

> That's why I used the have_show_streams|programs in opt_show_##

I don't like the special casing assumed by have_show_*, you could
simply add the new sections:
programs
  program
    program_streams
      program_stream

and adopt the usual machinery. Stream data would be duplicated in case
of -show_streams -show_programs, but that should not be really a
problem.
-- 
FFmpeg = Forgiving Fostering Murdering Pitiless Enlightened Geisha


More information about the ffmpeg-devel mailing list