[FFmpeg-devel] On libavfilter: A Summary of Issues

Roger Pack rogerdpack2 at gmail.com
Fri Oct 19 00:22:41 CEST 2012

Sorry late joining to the party...

> Is it supposed to be an extensible filtering framework that 3rd
> party devs write filters for and use for a lot of video processing,
> like Avisynth and VapourSynth? Is it supposed to be something to
> mainly be used as a C API from others' applications? Just ffmpeg.c?
> Whats the goal and direction of libavfilter as library? I think
> it could really benefit from some sort of public statement, declaration
> or documentation of this.

http://wiki.multimedia.cx/index.php?title=Libavfilter was what I
originally read that described its purpose.

"FFmpeg's already well-known libavcodec module has become the de facto
standard library for video decoding and encoding in free software
projects. Unfortunately, no similar standard library has surfaced for
audio/video filtering and otherwise working with audio/video stream
once it has been decoded. Various multimedia projects (such as
MPlayer, Xine, GStreamer, VirtualDub, etc.) have implemented their own
filter systems to various degrees of success. What is needed is a high
quality audio and video filter API - efficient, flexible enough to
meet all the requirements which have led various projects to invent
their own filter system, and yet easy to use or develop new filters
with. This proposal is to implement a high quality video API and
filter library for FFmpeg, where it can be easily used by other
multimedia-related software projects."

It appears from that page that the goal is to be some type of
centralized filter repository/highly functional filter system?

If the goal is to provide filters that programs like mplayer/VLC/FFmpeg can use,
that would seem to be a different target than a full fledged
filter/scripting system, like
AviSynth is.

Is the goal to be as flexible/user friendly as avisynth, or to provide
filters for other programs?

I guess the OP is saying that if you try and become like AviSynth, it
could speed adoption,
since AviSynth does some "community friendly" things like easier
scripting (though still basically
creating a filtergraph) and simplified development.

At the same time, FFmpeg itself would benefit from some AviSynth like
abilities, for instance, I
have no idea how to do the equivalent of something like following in
one command in FFmpeg:

a = movie('input', :from => 10:00, :to => 10:30)
b = movie('input2')
c = fade_in(a, b, :seconds => 10, :overlap => 5)
d = add_overlay(c, :from => 1:00 => to: 200)

At the same time, I'd also note that libavfilter *is* getting better,
for instance, there's actually
a wiki page about for filters now, and the concat filter was added
recently, etc.

So it's improving.  Maybe this discussion will spur improvemenet.

> So you may ask why libavfilter was conceived and implemented in the
> first place?
> Well there are several reasons: one reason was to reduce the
> dependency on external projects (an ffmpeg which needs to link against
> avisynth or another framework for cropping or padding would suck
> hard), we wanted/needed to simplify application code (resampling,
> padding, rescaling with as few hacks as possible in the ff*
> tools/application code), we wanted to provide a filtering *and* high
> level *internal* library (for having a consistent framework, and
> leverage the cababilities already included in the codebase, e.g. DSP
> utils).

So is it just to have a high quality internal library, or does it want
to become "as useful as AviSynth"?

If it just wants to be a high quality internal library, maybe somebody
should write an AviSynth plugin that can
access/use FFmpeg's filters.  Just sayin' :)

>>Maintain ALL the things!
> No, stop the user from having to cobble things together all over the place, with half of them binary blobs that don't work any more and the other half breaking when you try to use them together.
> Maybe it doesn't make sense for lavfi, but you asked what FFmpeg generally stands for, and that very much is a framework, building blocks, and lots of flexible base implementations, with often others building the user-friendly and special-case stuff on top.
> Well, at least it is my view.

I also guess there are 2 motives:

1) give projects a filter framework they can use
2) give projects some filters they can use

does it also want to be able to 'feed' other projects, like AviSynth
does today?
Provide a quality scripting framework somehow?
Provide for "customized" distributable filters, like AviSynth does?
What's the goal?

My guess would be that it wants to be as useful as AviSynth, or does
it only want to
be more for internal use?

Also note that there is avxsynth, which is an avisynth linux port.

Though I'm not suggesting it be used to replace libavfilter :)


More information about the ffmpeg-devel mailing list