| 1 | |
|---|
| 2 | ___________ ._________ |
|---|
| 3 | \_ _____/______ ____ |__\ _ \_______ |
|---|
| 4 | | __) \_ __ \_/ __ \| / /_\ \_ __ \ |
|---|
| 5 | | \ | | \/\ ___/| \ \_/ \ | \/ |
|---|
| 6 | \___ / |__| \___ >__|\_____ /__| |
|---|
| 7 | \/ \/ \/ |
|---|
| 8 | |
|---|
| 9 | Minimalistic plugin API for video effects v.1.3 |
|---|
| 10 | |
|---|
| 11 | http://frei0r.dyne.org by the Piksel Developers Union |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | Table of Contents |
|---|
| 15 | ================= |
|---|
| 16 | Introduction |
|---|
| 17 | What Frei0r is |
|---|
| 18 | What Frei0r is not |
|---|
| 19 | Current status |
|---|
| 20 | Code gallery |
|---|
| 21 | History |
|---|
| 22 | Download |
|---|
| 23 | Source code |
|---|
| 24 | Build dependencies |
|---|
| 25 | Debian / Ubuntu |
|---|
| 26 | Apple / OSX |
|---|
| 27 | Documentation |
|---|
| 28 | API explanation |
|---|
| 29 | C++ Filter example |
|---|
| 30 | Communication |
|---|
| 31 | Acknowledgments |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | Introduction |
|---|
| 35 | ~~~~~~~~~~~~~ |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | What Frei0r is |
|---|
| 39 | =============== |
|---|
| 40 | |
|---|
| 41 | Frei0r is a minimalistic plugin API for video effects. |
|---|
| 42 | |
|---|
| 43 | The main emphasis is on simplicity for an API that will round up the |
|---|
| 44 | most common video effects into simple filters, sources and mixers that |
|---|
| 45 | can be controlled by parameters. |
|---|
| 46 | |
|---|
| 47 | It's our hope that this way these simple effects can be shared between |
|---|
| 48 | many applications, avoiding their reimplementation by different |
|---|
| 49 | projects. |
|---|
| 50 | |
|---|
| 51 | What Frei0r is not |
|---|
| 52 | =================== |
|---|
| 53 | |
|---|
| 54 | Frei0r is not meant as a competing standard to more ambitious efforts |
|---|
| 55 | that try to satisfy the needs of many different applications and more |
|---|
| 56 | complex effects. |
|---|
| 57 | |
|---|
| 58 | It is not meant as a generic API for all kinds of video applications, |
|---|
| 59 | as it doesn't provides things like an extensive parameter mechanism or |
|---|
| 60 | event handling. |
|---|
| 61 | |
|---|
| 62 | Eventually the frei0r API can be wrapped by higher level APIs |
|---|
| 63 | expanding its functionalities (for instance as GStreamer, MLT, FFmpeg |
|---|
| 64 | and others do). |
|---|
| 65 | |
|---|
| 66 | Current status |
|---|
| 67 | =============== |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | If you like to peek in what's boiling in the pot, have a look at our |
|---|
| 71 | TODO |
|---|
| 72 | |
|---|
| 73 | Developers are sporadically contributing and we are happy if more |
|---|
| 74 | people like to get involved, so let us know about your creations! Code |
|---|
| 75 | and patches are well accepted, get in touch with us on the |
|---|
| 76 | mailinglist. |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | Code gallery |
|---|
| 80 | ============= |
|---|
| 81 | |
|---|
| 82 | You might want to look at the code in frei0r more in detail, then |
|---|
| 83 | browse the existing effects by visiting the Frei0r plugin gallery |
|---|
| 84 | online. |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | History |
|---|
| 88 | ======== |
|---|
| 89 | |
|---|
| 90 | Frei0r has been around since 2004, born from yearly brainstormings |
|---|
| 91 | held at the Piksel conference with the participation of various free |
|---|
| 92 | and open source video software developers. |
|---|
| 93 | |
|---|
| 94 | It is mostly adopted on GNU/Linux and OSX platforms, counts more than |
|---|
| 95 | 80 effects implemented and is used by free video applications as |
|---|
| 96 | PureData, Open Movie Editor, DVEdit, Gephex, LiVES, FreeJ, MÞB, |
|---|
| 97 | VeeJay, MLT and KDEnLive among the others. |
|---|
| 98 | |
|---|
| 99 | Wikipedia page about Frei0r: http://en.wikipedia.org/wiki/Frei0r |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | [Piksel]: http://www.piksel.no |
|---|
| 103 | [PureData]: http://www.artefacte.org/pd/ |
|---|
| 104 | [Open Movie Editor]: http://openmovieeditor.sourceforge.net/ |
|---|
| 105 | [DVEdit]: http://www.freenet.org.nz/dvedit |
|---|
| 106 | [Gephex]: http://www.gephex.org/ |
|---|
| 107 | [LiVES]: http://lives.sf.net |
|---|
| 108 | [FreeJ]: http://freej.dyne.org |
|---|
| 109 | [MÞB]: http://mob.bek.no/ |
|---|
| 110 | [VeeJay]: http://veejayhq.net |
|---|
| 111 | [MLT]: http://www.mltframework.org/ |
|---|
| 112 | [KDEnLive]: http://www.kdenlive.org/ |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | Download |
|---|
| 116 | ~~~~~~~~~ |
|---|
| 117 | |
|---|
| 118 | Source code |
|---|
| 119 | ============ |
|---|
| 120 | |
|---|
| 121 | Stable frei0r releases are packaged periodically and distributed on |
|---|
| 122 | |
|---|
| 123 | ftp://ftp.dyne.org/frei0r |
|---|
| 124 | |
|---|
| 125 | We encourage the unauthorized mirroring of this source repository by |
|---|
| 126 | all those interested, using the command |
|---|
| 127 | |
|---|
| 128 | rsync -Pr rsync.dyne.org::frei0r . |
|---|
| 129 | |
|---|
| 130 | Frei0r sourcecode is released under the terms of the GNU General |
|---|
| 131 | Public License and, eventually other compatible Free Software |
|---|
| 132 | licenses. |
|---|
| 133 | |
|---|
| 134 | The latest source for frei0r plugins can be attained using our |
|---|
| 135 | revisioning system *GIT* |
|---|
| 136 | |
|---|
| 137 | git clone git://code.dyne.org/frei0r.git |
|---|
| 138 | |
|---|
| 139 | Some clones made by developers are also found on github, but basically |
|---|
| 140 | we coalesce around this repository online to pack releases. Make sure |
|---|
| 141 | to get in touch with our mailinglist if you like to see your code in |
|---|
| 142 | there. |
|---|
| 143 | |
|---|
| 144 | Build dependencies |
|---|
| 145 | ------------------- |
|---|
| 146 | |
|---|
| 147 | + GNU autotools ( ./configure && make ) |
|---|
| 148 | or |
|---|
| 149 | + CMake ( cmake . && make ) |
|---|
| 150 | |
|---|
| 151 | Frei0r can be built on GNU/Linux, M$/Windows and Apple/OSX platforms, |
|---|
| 152 | possibly in even more environments like embedded devices/ |
|---|
| 153 | |
|---|
| 154 | * Optional Dependencies |
|---|
| 155 | |
|---|
| 156 | + [Gavl] ( required for scale0tilt and vectorscope filters ) |
|---|
| 157 | [Gavl]: http://gmerlin.sourceforge.net |
|---|
| 158 | |
|---|
| 159 | + [OpenCV] (required for facebl0r filter ) |
|---|
| 160 | [OpenCV]: http://opencvlibrary.sourceforge.net |
|---|
| 161 | |
|---|
| 162 | Debian / Ubuntu |
|---|
| 163 | ================ |
|---|
| 164 | |
|---|
| 165 | Binary packages are mantained for Debian ([QA]) and Ubuntu ([pkg]), to |
|---|
| 166 | install the stable version distributed use *apt-get* or *synaptic*: |
|---|
| 167 | |
|---|
| 168 | sudo apt-get install frei0r-plugins |
|---|
| 169 | |
|---|
| 170 | |
|---|
| 171 | [QA]: http://packages.qa.debian.org/f/frei0r.html |
|---|
| 172 | [pkg]: http://packages.ubuntu.com/search?searchon=names&keywords=frei0r |
|---|
| 173 | |
|---|
| 174 | Apple / OSX |
|---|
| 175 | ============ |
|---|
| 176 | |
|---|
| 177 | [MacPorts] provide ready to install packages for OSX: in case you have |
|---|
| 178 | this packaging system installed, you just need to open a terminal and |
|---|
| 179 | give the following command: |
|---|
| 180 | |
|---|
| 181 | sudo port install frei0r-plugins |
|---|
| 182 | |
|---|
| 183 | [MacPorts]: http://www.macports.org |
|---|
| 184 | |
|---|
| 185 | |
|---|
| 186 | Documentation |
|---|
| 187 | ~~~~~~~~~~~~~~ |
|---|
| 188 | If you are new to frei0r (but not to programming) the best thing is |
|---|
| 189 | probably to have a look at the [frei0r header], which is quite simple |
|---|
| 190 | and well documented, or the doxygen code documentation in doc/ |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | API explanation |
|---|
| 194 | ================ |
|---|
| 195 | |
|---|
| 196 | While the main source of documentation for the Frei0r API is the |
|---|
| 197 | header, the sourcecode is well commented so you can study its full |
|---|
| 198 | [doxyfied documentation] online. |
|---|
| 199 | |
|---|
| 200 | [doxyfied documentation]: http://frei0r.dyne.org/codedoc/html |
|---|
| 201 | |
|---|
| 202 | |
|---|
| 203 | C++ Filter example |
|---|
| 204 | =================== |
|---|
| 205 | |
|---|
| 206 | A simple skeleton for a frei0r video filter looks like this: |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | #include <frei0r.hpp> |
|---|
| 210 | |
|---|
| 211 | typedef struct { |
|---|
| 212 | int16_t w, h; |
|---|
| 213 | uint8_t bpp; |
|---|
| 214 | uint32_t size; |
|---|
| 215 | } ScreenGeometry; |
|---|
| 216 | |
|---|
| 217 | class MyExample: public frei0r::filter { |
|---|
| 218 | public: |
|---|
| 219 | MyExample(int wdt, int hgt); |
|---|
| 220 | ~MyExample(); |
|---|
| 221 | virtual void update(); |
|---|
| 222 | private: |
|---|
| 223 | ScreenGeometry geo; |
|---|
| 224 | void _init(int wdt, int hgt); |
|---|
| 225 | } |
|---|
| 226 | |
|---|
| 227 | MyExample::MyExample() { /* constructor */ } |
|---|
| 228 | MyExample::~MyExample() { /* destructor */ } |
|---|
| 229 | |
|---|
| 230 | void MyExample::_init(int wdt, int hgt) { |
|---|
| 231 | geo.w = wdt; |
|---|
| 232 | geo.h = hgt; |
|---|
| 233 | geo.bpp = 32; // this filter works only in RGBA 32bit |
|---|
| 234 | geo.size = geo.w*geo.h*(geo.bpp/8); // calculate the size in bytes |
|---|
| 235 | } |
|---|
| 236 | |
|---|
| 237 | void MyExample::update() { |
|---|
| 238 | // we get video input via buffer pointer (void*)in |
|---|
| 239 | uint32_t *src = (uint32_t*)in; |
|---|
| 240 | // and we give video output via buffer pointer (void*)out |
|---|
| 241 | uint32_t *dst = (uint32_t*)out; |
|---|
| 242 | // this example here does just a copy of input to output |
|---|
| 243 | memcpy(dst, src, geo.size); |
|---|
| 244 | } |
|---|
| 245 | |
|---|
| 246 | frei0r::construct<MyExample> |
|---|
| 247 | plugin("MyExample", "short and simple description for my example", |
|---|
| 248 | "Who did it", 1, 0); |
|---|
| 249 | |
|---|
| 250 | |
|---|
| 251 | |
|---|
| 252 | Communication |
|---|
| 253 | ~~~~~~~~~~~~~~ |
|---|
| 254 | |
|---|
| 255 | You can get in touch with our developer community, send your new |
|---|
| 256 | effects and share your intentions with us. |
|---|
| 257 | |
|---|
| 258 | We have a free mailinglist open to subscription on [frei0r-devel] with |
|---|
| 259 | [public archives] that are also [searchable and indexed] online. |
|---|
| 260 | |
|---|
| 261 | For effective and indexed bug reporting regarding plugin |
|---|
| 262 | implementations and platform builds, here is a publicly available |
|---|
| 263 | [issue tracker]. |
|---|
| 264 | |
|---|
| 265 | |
|---|
| 266 | [frei0r-devel]: https://piksel.no/mailman/listinfo/frei0r-devel |
|---|
| 267 | [public archives]: http://piksel.no/pipermail/frei0r-devel/ |
|---|
| 268 | [searchable and indexed]: http://blog.gmane.org/gmane.comp.video.frei0r.devel |
|---|
| 269 | [issue tracker]: http://www.piksel.no/projects/frei0r/report |
|---|
| 270 | |
|---|
| 271 | Acknowledgments |
|---|
| 272 | ~~~~~~~~~~~~~~~~ |
|---|
| 273 | |
|---|
| 274 | |
|---|
| 275 | Frei0r is the result of a collective effort in coordination with |
|---|
| 276 | several software developers meeting at [Piksel] between 2003 and 2005 |
|---|
| 277 | to find a common standard for video effect plugins to be used among |
|---|
| 278 | their applications: Andraz Tori (Cinelerra/CVS), Daniel Fischer |
|---|
| 279 | (Pakt/GStreamet), Denis Jaromil Rojo (FreeJ/Dyne), Gabriel "Salsaman" |
|---|
| 280 | Finch (LiVES), Kentaro Fukuchi (EffecTV), Niels Elburg (VeeJay), |
|---|
| 281 | Ãyvind KolÃ¥s (Gegl/Babl/Gimp), Tom Schouten (PDP/PureData), Georg |
|---|
| 282 | Seidel, Martin Bayer and Phillip Promesberger (Gephex). |
|---|
| 283 | |
|---|
| 284 | |
|---|
| 285 | We first aimed at the realisation of a comprehensive specification for |
|---|
| 286 | dynamically loaded plugins named LiViDO, which then spawned two |
|---|
| 287 | implementations: one being Frei0r, a minimalistic implementation |
|---|
| 288 | contributed by the Gephex team and the other one being the WEED |
|---|
| 289 | implementation by LiVES developer Salsaman, sporting more features for |
|---|
| 290 | GUI integration and scriptability. |
|---|
| 291 | |
|---|
| 292 | |
|---|
| 293 | Within the span of a few years, the minimalistic approach of *frei0r* |
|---|
| 294 | has been widely adopted among more applications and became a *de-facto |
|---|
| 295 | standard*. Maintenance and further refinements were contributed by |
|---|
| 296 | Carlo Prelz (MÞB/BEK), Richard Spindler (Open Movie Editor) and Dan |
|---|
| 297 | Dennedy (MLT/KDEnLive), while Debian/Ubuntu packaging and build system |
|---|
| 298 | standardization were taken care of by dyne.org developers Filippo |
|---|
| 299 | Giunchedi and Luca Bigliardi. |
|---|
| 300 | |
|---|
| 301 | --------------------------------------------------------------------- |
|---|
| 302 | |
|---|
| 303 | |
|---|