libavfilter

15

Click here to load reader

Upload: stefano-sabatini

Post on 25-May-2015

1.522 views

Category:

Technology


0 download

DESCRIPTION

PDF of the presentation held at the VideoLAN Dev Days meeting of 3 September 2011, Paris. Short introduction to libavfilter, current development status and future developments.

TRANSCRIPT

Page 1: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Introduction to Libavfilter

Stefano Sabatinimailto:[email protected]

VideoLAN

Video LAN Dev Days - 03 September 2011

1 / 15

Page 2: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Summary

1 Project Introduction

2 Introduction to libavfilter architecture

3 Examples

4 Future Development

5 Appendixes

2 / 15

Page 3: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Objectives - Why?

provide a media filtering layer to FFmpeg+clientlibraries/apps, replace VHOOKsimplify the design of ff* tools, enhance flexibilityextend the testing framework with ad-hoc filters/sources

3 / 15

Page 4: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Libavfilter dependencies

4 / 15

Page 5: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

High level features

focus on performance (avoid unnecessary memcpies /unnecessary conversions)support all formats supported by FFmpegimplement a sophisticated negotiation formatmechanism, minimize the number of pixel/sampleformat conversionsinteractive features for processing interactivecommands/eventsallow graphs of filters vs. linear chainsallow media sources/sinksallow transmedia filtering

5 / 15

Page 6: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Development status

video filtering integrated into ffmpeg.c in May 2010,included in latest FFmpeg/Libav formal releases(0.7/0.8)API/ABI still considered unstableaudio integration is a work in progress

6 / 15

Page 7: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Filter node anatomy

A filter contains one or more input/output padsEach pad is bound to a specific media type, supportsone or more input/output formatsinput and output pads are tied together by a linkfilters can be connected together to form a grapha filtergraph is represented through a simple textualdescription

7 / 15

Page 8: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Filtering model

a filter processes buffers, a buffer can contain a videoframe or audio samplesthe properties of each buffer (e.g. frame type,timestamp, file position) can be accessed andmanipulated during the filtering processmixed pull/push model

8 / 15

Page 9: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Filters

scale - based on libswscalepad, crop, vflip, hflipfrei0r / frei0r_src wrappermp wrapper (MPlayer filters)more: boxblur, delogo, drawtext, lutyuv, lutrgb, yadif,select, unsharp...currently 60 filters+sources+sinks implemented (check-filters option)

9 / 15

Page 10: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Misc examples

Example

color=pink,hflip,nullsink

Example

movie=logo.png [logo]; color=bikeshed [color];[color][logo] overlay [out]

10 / 15

Page 11: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Future development - 1

audio filtering integration completion (possibly finishedin a few months), sox+ladspa wrappersmore framework changes - e.g. stricter integration withlibavcodec for allowing direct rendering

11 / 15

Page 12: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Future development - 2

transmedia filteringsubtitles filteringtransmedia+subtitle filtering: speech recognition / voicesynthesis / subtitles video rendering

12 / 15

Page 13: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

How to contribute

bug reports/feature requestspatches are welcome!money/food/postcards/stuff

13 / 15

Page 14: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Resources

http://ffmpeg.org/libavfilter.html

libavfilter/*.{h,c}doc/examples/filtering.cffmpeg-devel mailing-list

14 / 15

Page 15: Libavfilter

ProjectIntroduction

Introduction tolibavfilterarchitecture

Examples

FutureDevelopment

Appendixes

Licence of this document

Released with Creative Commons licenseAttribution-NonCommercial-ShareAlike (see: http://creativecommons.org/licenses/by-nc-sa/3.0/)

15 / 15