Added three sample video hooks. See the (rudimentary) documentation on what
[libav.git] / vhook / hooks.html
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.51
4 from hooks.texi on 20 November 2002 -->
5
6 <TITLE>Video Hook Documentation</TITLE>
7 </HEAD>
8 <BODY>
9 <H1>Video Hook Documentation</H1>
10 <P>
11 <P><HR><P>
12 <H1>Table of Contents</H1>
13 <UL>
14 <LI><A NAME="TOC1" HREF="hooks.html#SEC1">1 Introduction</A>
15 <UL>
16 <LI><A NAME="TOC2" HREF="hooks.html#SEC2">1.1 null.c</A>
17 <LI><A NAME="TOC3" HREF="hooks.html#SEC3">1.2 fish.c</A>
18 <LI><A NAME="TOC4" HREF="hooks.html#SEC4">1.3 imlib2.c</A>
19 </UL>
20 </UL>
21 <P><HR><P>
22
23 <P>
24 Video Hook Documentation
25 <P>
26
27 </P>
28
29
30
31 <H1><A NAME="SEC1" HREF="hooks.html#TOC1">1 Introduction</A></H1>
32
33 <P>
34 The video hook functionality is designed (mostly) for live video. It allows
35 the video to be modified or examined between the decoder and the encoder.
36
37 </P>
38 <P>
39 Any number of hook modules can be placed inline, and they are run in the
40 order that they were specified on the ffmpeg command line.
41
42 </P>
43 <P>
44 Three modules are provided and are described below. They are all intended to
45 be used as a base for your own modules.
46
47 </P>
48 <P>
49 Modules are loaded using the -vhook option to ffmpeg. The value of this parameter
50 is a space seperated list of arguments. The first is the module name, and the rest
51 are passed as arguments to the Configure function of the module.
52
53 </P>
54
55
56 <H2><A NAME="SEC2" HREF="hooks.html#TOC2">1.1 null.c</A></H2>
57
58 <P>
59 This does nothing. Actually it converts the input image to RGB24 and then converts
60 it back again. This is meant as a sample that you can use to test your setup.
61
62 </P>
63
64
65 <H2><A NAME="SEC3" HREF="hooks.html#TOC3">1.2 fish.c</A></H2>
66
67 <P>
68 This implements a 'fish detector'. Essentially it converts the image into HSV
69 space and tests whether more than a certain percentage of the pixels fall into
70 a specific HSV cuboid. If so, then the image is saved into a file for processing
71 by other bits of code.
72
73 </P>
74 <P>
75 Why use HSV? It turns out that HSV cuboids represent a more compact range of
76 colors than would an RGB cuboid.
77
78 </P>
79
80
81 <H2><A NAME="SEC4" HREF="hooks.html#TOC4">1.3 imlib2.c</A></H2>
82
83 <P>
84 This allows a caption to be placed onto each frame. It supports inserting the
85 time and date. By using the imlib functions, it would be easy to add your own
86 graphical logo, add a frame/border, etc.
87
88 </P>
89
90 <P><HR><P>
91 This document was generated on 20 November 2002 using the
92 <A HREF="http://wwwcn.cern.ch/dci/texi2html/">texi2html</A>
93 translator version 1.51.</P>
94 </BODY>
95 </HTML>