[FFmpeg-devel] [RFC] Reading from a lavfi source

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Jun 17 02:15:29 CEST 2011


On date Thursday 2011-06-16 21:17:02 +0200, Michael Niedermayer encoded:
> On Sat, Jun 11, 2011 at 10:58:49PM +0200, Stefano Sabatini wrote:
> > On date Saturday 2011-06-11 00:53:23 +0200, Stefano Sabatini encoded:
> > > Hi,
> > > 
> > > I want to experiment with lavfi sources so I would like to directly
> > > read from them. Acutally, e.g. if I need to read from the color
> > > source, I use the overlay on top of the input video (same could be
> > > done for audio by implementing a mixer filter).
> > > 
> > > Now I wonder what could be a more direct way to achieve the same
> > > result. A possibility would be to make ffmpeg/ffplay directly read
> > > from libavfilter sources (by converting each input file to a movie
> > > source), but this requires a major rework so doesn't look very
> > > feasible to me.
> > > 
> > > So I'm thinking to implement a sort of lavfi virtual input
> > > device/demuxer, which takes in input a filtergraph description with
> > > exactly one output which is passed to the input (we may have two
> > > distinct filtergraphs for audio and video), something like:
> > > 
> > > ffplay -f lavfi -graph "color=bikeshed [video_out]; notes=AC#E [audio_out]" dummy 
> > > 
> > > This should also provide a nice example of how to integrate lavfi into
> > > a libav* application.
> > > 
> > > Do you consider this approach feasible? Better ideas?
> > 
> > First proof of concept attached (audio still not supported, for that
> > we need the asink_buffer, and some audio source...).
> 
> If it works and doesnt break anything it might make sense to commit
> and work in git on it. that way users can easier  test and other devs
> can easier contribute

No it still has a bunch of problems, ffplay crashes randomly when
switching streams with "v", I suspect there are still problems with
timestamps, and the syntax needs to be changed as well, so committing
is still premature.

I'll work through it though as it looks like a very useful tool for
testing lavfi sources, multi-streams files, transmedia filtering, A/V
synch and timestamp handling.
-- 
FFmpeg = Forgiving Fundamental Meaningless Prodigious Extended Gospel


More information about the ffmpeg-devel mailing list