Libavfilter: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(lavfi has already croping/fps filter)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Until it is incorporated into [[FFmpeg]], you may get the libavfilter source from [[FFmpeg Summer Of Code|GSoC]] SVN repository:


svn checkout svn://svn.mplayerhq.hu/soc/libavfilter
==Reasons why a filter API is needed in FFmpeg==
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.


Please read its [http://svn.mplayerhq.hu/soc/libavfilter/README?view=co README] to discover how to integrate it with ffmpeg and ffplay.
== Possible known issues ==
* no frame rate estimation is supported (see post in -soc [http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-December/002283.html])
* make ffmpeg.c honor the aspect ratio outputted by the filter chain (thanks vdmsss for the bug report) -- '''Updated:''' probably fixed, but maybe not printing the right PAR in the terminal


==Reasons why a audio API is needed in FFmpeg==
== Feature wish list ==
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.
'''Warning:''' This is not an official wish list. Before implementing any one of these items, ask first in the ffmpeg-devel mailing-list.


== Features needed ==
* See the [http://svn.mplayerhq.hu/soc/libavfilter/TODO?view=co TODO file] in SoC SVN tree
* See the [http://svn.mplayerhq.hu/soc/libavfilter/TODO?view=co TODO file] in SoC SVN tree
* ?
== Feature wish list ==
*Create a SDK (Software Development Kit) with templates for the A/V filter APIs
*Create a SDK (Software Development Kit) with templates for the A/V filter APIs
*Add support for audio filters
** See [[FFmpeg audio API]]
*Add support for subtitle filters
** Add a subtitle drawing support to simplify ffplay.c
* Create (or port) additional pre-process and post-process video filters to FFmpeg:
* Create (or port) additional pre-process and post-process video filters to FFmpeg:
** General post-proc sources are [http://svn.mplayerhq.hu/mplayer/trunk/DOCS/tech/libmpcodecs.txt?revision=15625&view=markup MPlayer (libmpcodecs vf_*.c filters)], [http://xinehq.de/index.php/hackersguide#AEN864 Xine], [[ffdshow|FFdshow]], [[VLC media player|VLC]], [http://www.virtualdub.org/filtersdk VirtualDub], [http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html GStreamer], [http://www.foobar2000.org foobar], and [http://www.xmms.org/ XMMS]
** General post-proc sources are [http://svn.mplayerhq.hu/mplayer/trunk/DOCS/tech/libmpcodecs.txt?revision=15625&view=markup MPlayer (libmpcodecs vf_*.c filters)], [http://xinehq.de/index.php/hackersguide#AEN864 Xine], [[ffdshow|FFdshow]], [[VLC media player|VLC]], [http://www.virtualdub.org/filtersdk VirtualDub], [http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html GStreamer], [http://www.foobar2000.org foobar], and [http://www.xmms.org/ XMMS], vhook
**More [http://en.wikipedia.org/wiki/Image_scaling image scaling] methods:
**More [http://en.wikipedia.org/wiki/Image_scaling image scaling] methods:
***[http://en.wikipedia.org/wiki/Linear_interpolation linear interpolation]
***[http://en.wikipedia.org/wiki/Linear_interpolation linear interpolation]
Line 36: Line 37:
*** Possible sources: [http://sourceforge.net/projects/deinterlace DScaler] or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscale]?
*** Possible sources: [http://sourceforge.net/projects/deinterlace DScaler] or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscale]?
** NTSC => PAL, and PAL => NTSC frame-rate (FPS) adjust and reclock filter for NTSC <=> PAL conversion
** NTSC => PAL, and PAL => NTSC frame-rate (FPS) adjust and reclock filter for NTSC <=> PAL conversion
== Current ideas ==
Threads with previous discussions in the subject:
* Possible adopt MPlayer's A/V filter system or create a new API 'from scratch' for pre-process and post-process audio/video filters:
** See http://article.gmane.org/gmane.comp.video.ffmpeg.devel/39130 for michaelni's idea of what to do.
***Also read this discussion thread on MPlayer's mailing-list:
****http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/051142.html
*****http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/thread.html#51142
*Take a look at other eixsting players API for filter plugins, like for example;
** [http://svn.mplayerhq.hu/mplayer/trunk/DOCS/tech/libmpcodecs.txt?revision=15625&view=markup MPlayer (libmpcodecs vf_*.c filters)], [http://xinehq.de/index.php/hackersguide#AEN864 Xine], [[ffdshow|FFdshow]], [[VLC media player|VLC]], [http://www.virtualdub.org/filtersdk VirtualDub], [http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html GStreamer], [http://www.foobar2000.org foobar], and [http://www.xmms.org/ XMMS]
==Mentors==
A'rpi (has expressed interest of possibly helping with implementing a filter API in FFmpeg, he also volunteering to help porting the MPlayer filters too if a such API becomes available http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/051164.html)''


== See also ==
== See also ==
* [[FFmpeg filter howto]]
* [[FFmpeg filter howto]]
* [[FFmpeg audio API]]
* [[FFmpeg audio API]]
 
* [http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide FFmpeg filtering Guide]


[[Category:FFmpeg]]
[[Category:FFmpeg]]

Latest revision as of 17:13, 15 July 2012

Reasons why a filter API is needed in FFmpeg

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.

Possible known issues

  • no frame rate estimation is supported (see post in -soc [1])
  • make ffmpeg.c honor the aspect ratio outputted by the filter chain (thanks vdmsss for the bug report) -- Updated: probably fixed, but maybe not printing the right PAR in the terminal

Feature wish list

Warning: This is not an official wish list. Before implementing any one of these items, ask first in the ffmpeg-devel mailing-list.

See also