[FFmpeg-devel] Output to text file from filter

Stefano Sabatini stefasab at gmail.com
Wed Jul 11 00:11:59 CEST 2012


On date Tuesday 2012-07-10 16:21:18 +0200, Nicolas George encoded:
> Le tridi 23 messidor, an CCXX, Mark Himsley a écrit :
> > I want to put BBC R&D's shot change detector into FFmpeg as a filter.
> > but, I need to know the frame number of the frames that were picked.
> > 

> > I'm not sure that just outputting to the log output is right for
> > that, so I'm thinking I should output to a "sidecar" file.

You could add an option to select a file, and use the
libavformat/avio.h interface for writing to it.

For improving parsing, we could consider to adopt the ffprobe writers
at the library level, but that may need some rework of the design, to
make them more generic (right now writers are rather customized
towards the specific chapters and sections expected by ffprobe).

> > 
> > I've had a look, but I haven't found examples of that in FFmpeg.
> > Does anyone have a pointer to a file I can reference to ensure I do
> > it the FFmpeg way? Or suggest why I'm a mad-man?
> 

> We currently have blackframe and blackdetect (why two of them? there is
> something fishy here)

Different licenses (blackframe is GPL), and I needed something more
flexible when creating blackdetect, so I rejected the possibility to
extend it, I suppose I could extend blackdetect and drop blackframe.
-- 
FFmpeg = Freak and Funny Multimedia Philosophical Elitarian Game


More information about the ffmpeg-devel mailing list