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

Mark Himsley mark at mdsh.com
Sat Jun 11 19:34:07 CEST 2011


On 10/06/2011 23:53, Stefano Sabatini wrote:
> 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:

It would certainty be interesting to have the option to reuse filter
chain outputs in future filter chains.

For instance, I might have an HD source I want to scale to SD to output
AND I want to scale to a proxy and output. Currently, if I inderstand
the filter chain correctly, the two filter chains would have to scale
from HD twice. But the proxy doesn't need to, it could scale from SD and
be perfectly acceptable quality.

Something like:

ffmpeg -i file -vf "scale=720:576:1" -vcodec dvvideo primary.dv -vf
"[out:0] scale=512:288" -vcodec libx264 proxy.m4v

Which brings on the though that the -map could be done away with and
mapping between streams all done in the filter chains... Sorry, I'm just
ranting now...


ffplay -r 25 -pix_fmt yuv422p -f dummy -i ignore -vf "color=bikeshed"

-- 
Mark






More information about the ffmpeg-devel mailing list